mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2025-01-09 05:14:09 +00:00
e489beac5b
Change-Id: I9c2de727e1a4c7657ccca4dd22a175bfad06a852
32 lines
631 B
JavaScript
32 lines
631 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', function () {
|
|
|
|
// page should have random name
|
|
const pageName = Math.random().toString();
|
|
|
|
// create a page with a simple addition
|
|
browser.call( async () => {
|
|
await bot.edit( pageName, '<math>3 + 2</math>' );
|
|
} );
|
|
|
|
MathPage.openTitle( pageName );
|
|
|
|
// check if the page displays the image
|
|
assert( MathPage.img.isExisting() );
|
|
|
|
} );
|
|
|
|
} );
|