398ca19ec1
* Allow app to run as a WAR on Keycloak server. * New client creation json that works for both dev and prod * fixed tests * Try Mark's trick to get realm_test to run. * Make tests use keycloakBefore() * Fix duplicate import * fix github actions Co-authored-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
29 lines
765 B
TypeScript
29 lines
765 B
TypeScript
import LoginPage from "../support/pages/LoginPage";
|
|
import Masthead from "../support/pages/admin_console/Masthead";
|
|
import { keycloakBefore } from "../support/util/keycloak_before";
|
|
|
|
const username = "admin";
|
|
const password = "admin";
|
|
|
|
const loginPage = new LoginPage();
|
|
const masthead = new Masthead();
|
|
|
|
describe("Logging In", function () {
|
|
beforeEach(function () {
|
|
keycloakBefore();
|
|
});
|
|
|
|
it("displays errors on wrong credentials", function () {
|
|
loginPage.logIn("wrong", "user{enter}");
|
|
|
|
loginPage.checkErrorMessage("Invalid username or password.").isLogInPage();
|
|
});
|
|
|
|
it("logs in", function () {
|
|
loginPage.logIn(username, password);
|
|
|
|
masthead.isAdminConsole();
|
|
|
|
cy.getCookie("KEYCLOAK_SESSION_LEGACY").should("exist");
|
|
});
|
|
});
|