From 9dda48d010c009d857f3e1575a53e49369d56fc1 Mon Sep 17 00:00:00 2001 From: sgauruseu Date: Thu, 23 Jan 2025 22:27:20 +0300 Subject: [PATCH] fix for failed tests --- testing/tests/role.wizard.spec.js | 4 ++-- testing/tests/wizard.toolbar.shortcut.spec.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/testing/tests/role.wizard.spec.js b/testing/tests/role.wizard.spec.js index 8dfaa7cf..d68e3789 100644 --- a/testing/tests/role.wizard.spec.js +++ b/testing/tests/role.wizard.spec.js @@ -46,8 +46,8 @@ describe('Role Wizard and Statistics Panel spec', function () { await roleWizard.pause(1000); await roleWizard.waitAndClickOnSave(); // Verify the notification message: - let actualMessage = await roleWizard.waitForNotificationMessage(); - assert.equal(actualMessage, 'Role was created', "Expected and actual messages are equal"); + let actualMessages = await roleWizard.waitForNotificationMessages(); + assert.ok(actualMessages.includes('Role was created'), "'Role was created' message should appear"); }); // verifies: xp-apps#93 Incorrect message appears when try to create a role with name that already in use #93 diff --git a/testing/tests/wizard.toolbar.shortcut.spec.js b/testing/tests/wizard.toolbar.shortcut.spec.js index e9e936be..8fcde772 100644 --- a/testing/tests/wizard.toolbar.shortcut.spec.js +++ b/testing/tests/wizard.toolbar.shortcut.spec.js @@ -77,8 +77,8 @@ describe(`wizard.toolbar.shortcut.spec, wizard's toolbar shortcut specification` await groupWizard.hotKeySave(); await testUtils.saveScreenshot('group_shortcut_save'); // 4. Verify the notification message - let message = await groupWizard.waitForNotificationMessage(); - assert.equal(message, appConst.NOTIFICATION_MESSAGE.GROUP_WAS_CREATED, "Group was created - message should appear"); + let messages = await groupWizard.waitForNotificationMessages(); + assert.ok(messages.includes(appConst.NOTIFICATION_MESSAGE.GROUP_WAS_CREATED), "Group was created - message should appear"); }); it(`GIVEN existing group is opened WHEN 'Ctrl+del' has been pressed THEN confirmation modal dialog should appear`,