Fix users test by awaiting credentials API call (#3536)

This commit is contained in:
Jon Koops 2022-10-10 14:02:28 +02:00 committed by GitHub
parent dc3c08aa59
commit 7f0b9edcf0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}