Update Masthead tests (#1820)
This commit is contained in:
parent
e6d8ffb202
commit
23b11eb879
3 changed files with 4 additions and 6 deletions
|
@ -22,7 +22,7 @@ describe("Logging In", () => {
|
||||||
it("logs in", () => {
|
it("logs in", () => {
|
||||||
loginPage.logIn(username, password);
|
loginPage.logIn(username, password);
|
||||||
|
|
||||||
masthead.isAdminConsole();
|
masthead.checkIsAdminConsole();
|
||||||
|
|
||||||
cy.getCookie("KEYCLOAK_SESSION_LEGACY").should("exist");
|
cy.getCookie("KEYCLOAK_SESSION_LEGACY").should("exist");
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,7 +19,7 @@ const goToAcctMgtTest = () => {
|
||||||
masthead.accountManagement();
|
masthead.accountManagement();
|
||||||
cy.contains("Welcome to Keycloak Account Management");
|
cy.contains("Welcome to Keycloak Account Management");
|
||||||
cy.get("#landingReferrerLink").click({ force: true });
|
cy.get("#landingReferrerLink").click({ force: true });
|
||||||
masthead.isAdminConsole();
|
masthead.checkIsAdminConsole();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -5,9 +5,8 @@ export default class Masthead {
|
||||||
|
|
||||||
private userDrpDwn = "#user-dropdown";
|
private userDrpDwn = "#user-dropdown";
|
||||||
private userDrpDwnKebab = "#user-dropdown-kebab";
|
private userDrpDwnKebab = "#user-dropdown-kebab";
|
||||||
private isMobile = false;
|
|
||||||
|
|
||||||
isAdminConsole() {
|
checkIsAdminConsole() {
|
||||||
cy.get(this.logoBtn).should("exist");
|
cy.get(this.logoBtn).should("exist");
|
||||||
cy.get(this.userDrpDwn).should("exist");
|
cy.get(this.userDrpDwn).should("exist");
|
||||||
|
|
||||||
|
@ -15,11 +14,10 @@ export default class Masthead {
|
||||||
}
|
}
|
||||||
|
|
||||||
get isMobileMode() {
|
get isMobileMode() {
|
||||||
return this.isMobile;
|
return window.parent[0].innerWidth < 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
setMobileMode(isMobileMode: boolean) {
|
setMobileMode(isMobileMode: boolean) {
|
||||||
this.isMobile = isMobileMode;
|
|
||||||
if (isMobileMode) {
|
if (isMobileMode) {
|
||||||
cy.viewport("iphone-6");
|
cy.viewport("iphone-6");
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue