From 97126ba46ffad1695bc26f5750d901b8fe605380 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDeljko=20Filipin?= Date: Wed, 16 Oct 2024 14:11:13 +0200 Subject: [PATCH] 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 --- tests/selenium/specs/basic.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/selenium/specs/basic.js b/tests/selenium/specs/basic.js index 00d4b411f..46e72742a 100644 --- a/tests/selenium/specs/basic.js +++ b/tests/selenium/specs/basic.js @@ -1,8 +1,7 @@ 'use strict'; -const assert = require( 'assert' ), - Api = require( 'wdio-mediawiki/Api' ), - MathPage = require( '../pageobjects/math.page' ); +const Api = require( 'wdio-mediawiki/Api' ); +const MathPage = require( '../pageobjects/math.page' ); describe( 'Math', () => { let bot; @@ -22,7 +21,7 @@ describe( 'Math', () => { await MathPage.openTitle( pageName ); // check if the page displays the image - assert( await MathPage.mathml.isExisting() ); + await expect( await MathPage.mathml ).toExist(); } );