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", () => {
|
||||
loginPage.logIn(username, password);
|
||||
|
||||
masthead.isAdminConsole();
|
||||
masthead.checkIsAdminConsole();
|
||||
|
||||
cy.getCookie("KEYCLOAK_SESSION_LEGACY").should("exist");
|
||||
});
|
||||
|
|
|
@ -19,7 +19,7 @@ const goToAcctMgtTest = () => {
|
|||
masthead.accountManagement();
|
||||
cy.contains("Welcome to Keycloak Account Management");
|
||||
cy.get("#landingReferrerLink").click({ force: true });
|
||||
masthead.isAdminConsole();
|
||||
masthead.checkIsAdminConsole();
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
@ -5,9 +5,8 @@ export default class Masthead {
|
|||
|
||||
private userDrpDwn = "#user-dropdown";
|
||||
private userDrpDwnKebab = "#user-dropdown-kebab";
|
||||
private isMobile = false;
|
||||
|
||||
isAdminConsole() {
|
||||
checkIsAdminConsole() {
|
||||
cy.get(this.logoBtn).should("exist");
|
||||
cy.get(this.userDrpDwn).should("exist");
|
||||
|
||||
|
@ -15,11 +14,10 @@ export default class Masthead {
|
|||
}
|
||||
|
||||
get isMobileMode() {
|
||||
return this.isMobile;
|
||||
return window.parent[0].innerWidth < 1024;
|
||||
}
|
||||
|
||||
setMobileMode(isMobileMode: boolean) {
|
||||
this.isMobile = isMobileMode;
|
||||
if (isMobileMode) {
|
||||
cy.viewport("iphone-6");
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue