mediawiki-extensions-Math/tests/selenium/specs/basic.js
Željko Filipin 97126ba46f selenium: Replace Node.js Assert library with WebdriverIO Expect library
Assertions from Expect library are more readable that assertions from Assert library.

Bug: T325740
Change-Id: I62ccf128e21eb49cbdc97546c643887105bf2c64
2024-10-16 14:11:24 +02:00

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