diff --git a/openmetadata-ui/src/main/resources/ui/cypress/common/Entities/UserClass.ts b/openmetadata-ui/src/main/resources/ui/cypress/common/Entities/UserClass.ts index 548ebad1025..903c469e99d 100644 --- a/openmetadata-ui/src/main/resources/ui/cypress/common/Entities/UserClass.ts +++ b/openmetadata-ui/src/main/resources/ui/cypress/common/Entities/UserClass.ts @@ -197,14 +197,11 @@ class UsersTestClass { cy.get('[data-testid="inline-save-btn"]').click(); verifyResponseStatusCode('@updateTeam', 200); - cy.get('.ant-collapse-expand-icon > .anticon > svg').click(); cy.get('[data-testid="edit-description"]').click(); cy.get(descriptionBox).clear(); interceptURL('PATCH', '/api/v1/users/*', 'patchDescription'); cy.get('[data-testid="save"]').should('be.visible').click(); verifyResponseStatusCode('@patchDescription', 200); - cy.get('.ant-collapse-expand-icon > .anticon > svg').scrollIntoView(); - cy.get('.ant-collapse-expand-icon > .anticon > svg').click(); } } diff --git a/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts b/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts index 4a297ab61b4..a0cd98f71f7 100644 --- a/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts +++ b/openmetadata-ui/src/main/resources/ui/playwright/utils/user.ts @@ -143,11 +143,11 @@ export const restoreUserProfilePage = async (page: Page, fqn: string) => { await restoreResponse; - await expect(page.getByRole('alert')).toHaveText( + await expect(page.getByRole('alert').first()).toHaveText( /User restored successfully/ ); - await page.getByLabel('close').click(); + await page.getByLabel('close').first().click(); await nonDeletedUserChecks(page); }; @@ -175,9 +175,9 @@ export const hardDeleteUserProfilePage = async ( await deleteResponse; - await expect(page.locator('.Toastify__toast-body')).toHaveText( + await expect(page.getByRole('alert').first()).toHaveText( /deleted successfully!/ ); - await page.click('.Toastify__close-button'); + await page.getByLabel('close').first().click(); };