From 7432f921ba490ff2a0b7905a5afee181bf9d08b0 Mon Sep 17 00:00:00 2001 From: Bobbykumar706584 Date: Tue, 14 Nov 2023 12:40:13 +0530 Subject: [PATCH] test for updated license --- e2e-tests/common.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/e2e-tests/common.js b/e2e-tests/common.js index 7a27c3f70..6a13e671a 100644 --- a/e2e-tests/common.js +++ b/e2e-tests/common.js @@ -171,10 +171,12 @@ export const searchProject = async (window, expect, projectname, searchtext) => await itemSearch.click() if(await rows.count() >= 4){ await itemSearch.fill("translation") + await window.waitForTimeout(1000) expect(await rows.count() > 1).toBe(true) } await window.waitForTimeout(500) await itemSearch.fill(searchtext) + await window.waitForTimeout(1000) expect(await rows.count()).toBe(1) const projectName = await window.locator(`//*[@id="${projectname}"]`).innerHTML() //expecting project name @@ -416,9 +418,8 @@ export const checkingUpdatedLicense = async (window, expect, projectname, newLic } const license = await window.locator(`//*[@id="${newLicense}"]`).textContent() await expect(license).toBe(newLicense) - await expect(window.locator('//*[@aria-label="save-edit-project"]')).toBeVisible(); - // Click the "Save" button. - await window.locator('//*[@aria-label="save-edit-project"]').click(); + await window.locator('//*[@aria-label="cancel-edit-project"]').click() + await projectPageExpect(window, expect) } // Adds or edits custom target languages. @@ -470,6 +471,7 @@ export const customProjectTargetLanguage = async (window, expect, projectname, f export const clickUserImage = async (window, expect, itemClick) => { // Ensure the user profile image is visible and click on it. + await window.waitForSelector('//*[@id="user-profile-image"]') expect(await window.locator('//*[@id="user-profile-image"]')).toBeVisible(); await window.locator('//*[@id="user-profile-image"]').click(); // Verify that the user profile is visible and click on it.