| 1 |
'use strict'; |
| 2 |
|
| 3 |
const assert = require( 'assert' ), |
| 4 |
Api = require( 'wdio-mediawiki/Api' ), |
| 5 |
MathPage = require( '../pageobjects/math.page' ); |
| 6 |
|
| 7 |
describe( 'Math', () => { |
| 8 |
let bot; |
| 9 |
|
| 10 |
before( async () => { |
| 11 |
bot = await Api.bot(); |
| 12 |
} ); |
| 13 |
|
| 14 |
it( 'should work for addition', async () => { |
| 15 |
|
| 16 |
|
| 17 |
const pageName = Math.random().toString(); |
| 18 |
|
| 19 |
|
| 20 |
await bot.edit( pageName, '<math>3 + 2</math>' ); |
| 21 |
|
| 22 |
await MathPage.openTitle( pageName ); |
| 23 |
|
| 24 |
|
| 25 |
assert( await MathPage.mathml.isExisting() ); |
| 26 |
|
| 27 |
} ); |
| 28 |
|
| 29 |
} ); |