fixes identity provider cypress tests

This commit is contained in:
mfrances 2021-05-07 10:46:50 -04:00
parent 84bc7e8091
commit d780ef2d0c

View file

@ -24,7 +24,7 @@ describe("Identity provider test", () => {
sidebarPage.goToIdentityProviders(); sidebarPage.goToIdentityProviders();
}); });
/*it("should create provider", () => { it("should create provider", () => {
createProviderPage.checkGitHubCardVisible().clickGitHubCard(); createProviderPage.checkGitHubCardVisible().clickGitHubCard();
createProviderPage.checkAddButtonDisabled(); createProviderPage.checkAddButtonDisabled();
@ -59,6 +59,8 @@ describe("Identity provider test", () => {
.clickCard("facebook") .clickCard("facebook")
.fill("facebook", "123") .fill("facebook", "123")
.clickAdd(); .clickAdd();
sidebarPage.goToIdentityProviders();
listingPage.itemExist("facebook"); listingPage.itemExist("facebook");
createProviderPage createProviderPage
@ -66,12 +68,19 @@ describe("Identity provider test", () => {
.clickItem(identityProviderName) .clickItem(identityProviderName)
.fill(identityProviderName, "123") .fill(identityProviderName, "123")
.clickAdd(); .clickAdd();
sidebarPage.goToIdentityProviders();
listingPage.itemExist(identityProviderName);
createProviderPage createProviderPage
.clickCreateDropdown() .clickCreateDropdown()
.clickItem("bitbucket") .clickItem("bitbucket")
.fill("bitbucket", "123") .fill("bitbucket", "123")
.clickAdd(); .clickAdd();
sidebarPage.goToIdentityProviders();
listingPage.itemExist(identityProviderName);
orderDialog.openDialog().checkOrder(providers); orderDialog.openDialog().checkOrder(providers);
orderDialog.moveRowTo("facebook", identityProviderName); orderDialog.moveRowTo("facebook", identityProviderName);
@ -81,7 +90,7 @@ describe("Identity provider test", () => {
masthead.checkNotificationMessage( masthead.checkNotificationMessage(
"Successfully changed display order of identity providers" "Successfully changed display order of identity providers"
); );
});*/ });
it("should create a oidc provider using discovery url", () => { it("should create a oidc provider using discovery url", () => {
const oidcProviderName = "oidc"; const oidcProviderName = "oidc";
@ -114,10 +123,13 @@ describe("Identity provider test", () => {
modalUtils.checkModalTitle("Delete provider?").confirmModal(); modalUtils.checkModalTitle("Delete provider?").confirmModal();
masthead.checkNotificationMessage("Provider successfully deleted"); masthead.checkNotificationMessage("Provider successfully deleted");
cy.wait(100);
listingPage.deleteItem("github"); listingPage.deleteItem("github");
modalUtils.checkModalTitle("Delete provider?").confirmModal(); modalUtils.checkModalTitle("Delete provider?").confirmModal();
masthead.checkNotificationMessage("Provider successfully deleted"); masthead.checkNotificationMessage("Provider successfully deleted");
listingPage.deleteItem("oidc");
modalUtils.checkModalTitle("Delete provider?").confirmModal();
masthead.checkNotificationMessage("Provider successfully deleted");
}); });
}); });
}); });