fix notifications without waits (#1449)

This commit is contained in:
mfrances17 2021-11-02 17:00:42 -04:00 committed by GitHub
parent 8e6f6fb40b
commit d1e45dabde
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 14 deletions

View file

@ -151,39 +151,33 @@ describe("User Fed LDAP mapper tests", () => {
listingPage.itemExist(creationDateMapper).deleteItem(creationDateMapper);
modalUtils.checkModalTitle(mapperDeleteTitle).confirmModal();
masthead.checkNotificationMessage(mapperDeletedSuccess);
masthead.checkNotificationMessage(mapperDeletedSuccess, true);
listingPage.itemExist(creationDateMapper, false);
cy.wait(5000);
listingPage.itemExist(emailMapper).deleteItem(emailMapper);
modalUtils.checkModalTitle(mapperDeleteTitle).confirmModal();
masthead.checkNotificationMessage(mapperDeletedSuccess);
masthead.checkNotificationMessage(mapperDeletedSuccess, true);
listingPage.itemExist(emailMapper, false);
cy.wait(5000);
listingPage.itemExist(lastNameMapper).deleteItem(lastNameMapper);
modalUtils.checkModalTitle(mapperDeleteTitle).confirmModal();
masthead.checkNotificationMessage(mapperDeletedSuccess);
masthead.checkNotificationMessage(mapperDeletedSuccess, true);
listingPage.itemExist(lastNameMapper, false);
cy.wait(5000);
listingPage.itemExist(modifyDateMapper).deleteItem(modifyDateMapper);
modalUtils.checkModalTitle(mapperDeleteTitle).confirmModal();
masthead.checkNotificationMessage(mapperDeletedSuccess);
masthead.checkNotificationMessage(mapperDeletedSuccess, true);
listingPage.itemExist(modifyDateMapper, false);
cy.wait(5000);
listingPage.itemExist(usernameMapper).deleteItem(usernameMapper);
modalUtils.checkModalTitle(mapperDeleteTitle).confirmModal();
masthead.checkNotificationMessage(mapperDeletedSuccess);
masthead.checkNotificationMessage(mapperDeletedSuccess, true);
listingPage.itemExist(usernameMapper, false);
cy.wait(5000);
listingPage.itemExist(firstNameMapper).deleteItem(firstNameMapper);
modalUtils.checkModalTitle(mapperDeleteTitle).confirmModal();
masthead.checkNotificationMessage(mapperDeletedSuccess);
masthead.checkNotificationMessage(mapperDeletedSuccess, true);
listingPage.itemExist(firstNameMapper, false);
cy.wait(5000);
listingPage
.itemExist(MsadAccountControlsMapper)

View file

@ -50,9 +50,11 @@ export default class Masthead {
cy.get("#manage-account").click();
}
checkNotificationMessage(message: string) {
checkNotificationMessage(message: string, closeNotification?: boolean) {
cy.contains(message).should("exist");
if (closeNotification) {
cy.get(".pf-c-alert__action").click();
}
return this;
}