mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-21 03:42:46 +00:00
89e45815e8
Update test to find MathML element instead of image. This is required since the default in labs in now MathML. Bug: T372872 Change-Id: I4e9500effaca9cef704f06ec003a0e01bdcfb3f1
30 lines
602 B
JavaScript
30 lines
602 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.mathml.isExisting() );
|
|
|
|
} );
|
|
|
|
} );
|