mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-19 02:50:44 +00:00
39c15f76f9
Change-Id: I02045047af1f392ae6d6f08e422024b0e9386ccf
30 lines
599 B
JavaScript
30 lines
599 B
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
Api = require( 'wdio-mediawiki/Api' ),
|
|
MathPage = require( '../pageobjects/math.page' );
|
|
|
|
describe( 'Math', () => {
|
|
let bot;
|
|
|
|
before( async () => {
|
|
bot = await Api.bot();
|
|
} );
|
|
|
|
it( 'should work for addition', async () => {
|
|
|
|
// page should have random name
|
|
const pageName = Math.random().toString();
|
|
|
|
// create a page with a simple addition
|
|
await bot.edit( pageName, '<math>3 + 2</math>' );
|
|
|
|
await MathPage.openTitle( pageName );
|
|
|
|
// check if the page displays the image
|
|
assert( await MathPage.img.isExisting() );
|
|
|
|
} );
|
|
|
|
} );
|