From 7f0b9edcf0539d72fa4d51ee6fa853c2a7f971a1 Mon Sep 17 00:00:00 2001 From: Jon Koops Date: Mon, 10 Oct 2022 14:02:28 +0200 Subject: [PATCH] Fix users test by awaiting credentials API call (#3536) --- .../pages/admin_console/manage/users/CredentialsPage.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/admin-ui/cypress/support/pages/admin_console/manage/users/CredentialsPage.ts b/apps/admin-ui/cypress/support/pages/admin_console/manage/users/CredentialsPage.ts index fbf2203c29..6675ff10d2 100644 --- a/apps/admin-ui/cypress/support/pages/admin_console/manage/users/CredentialsPage.ts +++ b/apps/admin-ui/cypress/support/pages/admin_console/manage/users/CredentialsPage.ts @@ -24,7 +24,10 @@ export default class CredentialsPage { private readonly closeDataDialogBtn = '.pf-c-modal-box [aria-label^="Close"]'; goToCredentialsTab() { + cy.intercept("/admin/realms/*/users/*/credentials").as("load"); cy.findByTestId(this.credentialsTab).click(); + cy.wait("@load"); + cy.wait(200); return this; } @@ -108,9 +111,7 @@ export default class CredentialsPage { } clickShowDataDialogBtn() { - cy.findByTestId(this.showDataDialogBtn) - .should("be.visible") - .click({ force: true }); + cy.findByTestId(this.showDataDialogBtn).click(); return this; }