mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Math
synced 2024-12-01 02:36:47 +00:00
cf33c80b98
Change-Id: I0ab0a9f99817077934e7569d19d76735c33678e9
26 lines
564 B
JavaScript
26 lines
564 B
JavaScript
'use strict';
|
|
const assert = require( 'assert' ),
|
|
Api = require( 'wdio-mediawiki/Api' ),
|
|
MathPage = require( '../pageobjects/math.page' );
|
|
|
|
describe( 'Math', function () {
|
|
|
|
it( 'should work for addition', function () {
|
|
|
|
// page should have random name
|
|
var pageName = Math.random().toString();
|
|
|
|
// create a page with a simple addition
|
|
browser.call( function () {
|
|
return Api.edit( pageName, '<math>3 + 2</math>' );
|
|
} );
|
|
|
|
MathPage.openTitle( pageName );
|
|
|
|
// check if the page displays the image
|
|
assert( MathPage.img.isExisting() );
|
|
|
|
} );
|
|
|
|
} );
|