mediawiki-extensions-Math/tests/selenium/specs/basic.js
Ed Sanders cf33c80b98 eslint: Use in all folders (including tests/selenium)
Change-Id: I0ab0a9f99817077934e7569d19d76735c33678e9
2018-11-12 17:08:22 +00:00

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() );
} );
} );