mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-28 09:20:42 +00:00
099e327cc6
WebdriverIO has dropped support of sync mode due to breaking changes in Chromium, hence all tests have been changed to async. Update npm packages: @wdio/*, wdio-mediawiki and webdriverio because async mode needs at least webdriverio v7.9. Remove npm package: @wdio/sync. Bug: T293076 Change-Id: I35b3b29c09e80306d14a12c5194efeead22a9804
30 lines
611 B
JavaScript
30 lines
611 B
JavaScript
'use strict';
|
|
|
|
const assert = require( 'assert' ),
|
|
Api = require( 'wdio-mediawiki/Api' ),
|
|
MathPage = require( '../pageobjects/math.page' );
|
|
|
|
describe( 'Math', function () {
|
|
let bot;
|
|
|
|
before( async () => {
|
|
bot = await Api.bot();
|
|
} );
|
|
|
|
it( 'should work for addition', async function () {
|
|
|
|
// 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() );
|
|
|
|
} );
|
|
|
|
} );
|