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: I8c31444538670e1500574415cec3a4d54d3798b4
This commit is contained in:
Željko Filipin 2024-11-07 17:01:38 +01:00
parent 0a50bd16cd
commit 23ac1201a5

View file

@ -1,8 +1,7 @@
'use strict';
const assert = require( 'assert' ),
NotificationsPage = require( '../pageobjects/notifications.page' ),
UserLoginPage = require( 'wdio-mediawiki/LoginPage' );
const NotificationsPage = require( '../pageobjects/notifications.page' );
const UserLoginPage = require( 'wdio-mediawiki/LoginPage' );
describe( 'Notifications', () => {
@ -11,7 +10,7 @@ describe( 'Notifications', () => {
await UserLoginPage.login( browser.config.mwUser, browser.config.mwPwd );
await NotificationsPage.open();
assert.strictEqual( await NotificationsPage.notificationHeading.getText(), 'Notifications' );
await expect( await NotificationsPage.notificationHeading ).toHaveText( 'Notifications' );
} );