mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-11-14 11:15:13 +00:00
97126ba46f
Assertions from Expect library are more readable that assertions from Assert library. Bug: T325740 Change-Id: I62ccf128e21eb49cbdc97546c643887105bf2c64
29 lines
579 B
JavaScript
29 lines
579 B
JavaScript
'use strict';
|
|
|
|
const Api = require( 'wdio-mediawiki/Api' );
|
|
const 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
|
|
await expect( await MathPage.mathml ).toExist();
|
|
|
|
} );
|
|
|
|
} );
|