2021-03-18 12:48:14 +00:00
|
|
|
export const keycloakBefore = () => {
|
|
|
|
/*
|
|
|
|
Prevent unpredictable 401 errors from failing individual tests.
|
|
|
|
These are most often occurring during the login process:
|
|
|
|
GET /admin/serverinfo/
|
|
|
|
GET /admin/master/console/whoami
|
|
|
|
*/
|
2021-09-16 10:24:21 +00:00
|
|
|
cy.on("uncaught:exception", (err) => {
|
2021-03-18 12:48:14 +00:00
|
|
|
console.log("-------------------");
|
|
|
|
console.log(err);
|
|
|
|
console.log("--------------------");
|
|
|
|
return false;
|
|
|
|
});
|
|
|
|
cy.visit("");
|
2022-02-16 16:34:54 +00:00
|
|
|
cy.get('[role="progressbar"]').should("not.exist");
|
2021-03-18 12:48:14 +00:00
|
|
|
};
|
2022-01-07 07:27:58 +00:00
|
|
|
|
|
|
|
export const keycloakBeforeEach = () => {
|
|
|
|
Cypress.Cookies.preserveOnce("KEYCLOAK_SESSION", "KEYCLOAK_IDENTITY");
|
|
|
|
};
|