Remove Cypress test to check login (#4019)
This commit is contained in:
parent
ea80b0f872
commit
2e36e4c3fe
2 changed files with 0 additions and 43 deletions
|
@ -1,29 +0,0 @@
|
|||
import LoginPage from "../support/pages/LoginPage";
|
||||
import Masthead from "../support/pages/admin-ui/Masthead";
|
||||
import { keycloakBefore } from "../support/util/keycloak_hooks";
|
||||
|
||||
const username = "admin";
|
||||
const password = "admin";
|
||||
|
||||
const loginPage = new LoginPage();
|
||||
const masthead = new Masthead();
|
||||
|
||||
describe("Logging In", () => {
|
||||
beforeEach(() => {
|
||||
keycloakBefore();
|
||||
});
|
||||
|
||||
it("displays errors on wrong credentials", () => {
|
||||
loginPage.logIn("wrong", "user{enter}");
|
||||
|
||||
loginPage.checkErrorMessage("Invalid username or password.").isLogInPage();
|
||||
});
|
||||
|
||||
it("logs in", () => {
|
||||
loginPage.logIn(username, password);
|
||||
|
||||
masthead.checkIsAdminUI();
|
||||
|
||||
cy.getCookie("KEYCLOAK_SESSION_LEGACY").should("exist");
|
||||
});
|
||||
});
|
|
@ -2,9 +2,7 @@ export default class LoginPage {
|
|||
private userNameInput = "#username";
|
||||
private passwordInput = "#password";
|
||||
private submitBtn = "#kc-login";
|
||||
private userDrpDwn = "#user-dropdown";
|
||||
|
||||
private errorText = ".kc-feedback-text";
|
||||
private oldLoadContainer = "#loading";
|
||||
private loadContainer = "div.keycloak__loading-container";
|
||||
|
||||
|
@ -32,16 +30,4 @@ export default class LoginPage {
|
|||
});
|
||||
cy.get('[role="progressbar"]').should("not.exist");
|
||||
}
|
||||
|
||||
checkErrorIsDisplayed() {
|
||||
cy.get(this.userDrpDwn).should("exist");
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
checkErrorMessage(message: string) {
|
||||
cy.get(this.errorText).invoke("text").should("contain", message);
|
||||
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue