From 3056788d5aaa22f6547ab3790706f0332dca73d3 Mon Sep 17 00:00:00 2001 From: tidusjar Date: Mon, 11 Oct 2021 12:49:51 +0100 Subject: [PATCH] test(automation): :white_check_mark: Fixed the user security automation tests --- .../user-preferences/user-preferences.page.ts | 27 ++++--------------- 1 file changed, 5 insertions(+), 22 deletions(-) diff --git a/tests/cypress/integration/page-objects/user-preferences/user-preferences.page.ts b/tests/cypress/integration/page-objects/user-preferences/user-preferences.page.ts index 83f6a8bc5..bf0c501b6 100644 --- a/tests/cypress/integration/page-objects/user-preferences/user-preferences.page.ts +++ b/tests/cypress/integration/page-objects/user-preferences/user-preferences.page.ts @@ -18,17 +18,6 @@ class ProfileTab { } } -class MobileTab { - - get qrCode(): Cypress.Chainable { - return cy.get('#qrCode'); - } - - get noQrCode(): Cypress.Chainable { - return cy.get('#noQrCode'); - } -} - class SecurityTab { get currentPassword(): Cypress.Chainable { return cy.get('#currentPassword'); @@ -62,23 +51,17 @@ class UserPreferencesPage extends BasePage { } get profileTab(): Cypress.Chainable { - return cy.get('[role="tab"]').eq(0); + return cy.get('#mat-tab-label-0-0'); } get securityTab(): Cypress.Chainable { - return cy.get('[role="tab"]').eq(1); - } - - get preferencesTab(): Cypress.Chainable { - return cy.get('[role="tab"]').eq(2); - } - - get mobileTab(): Cypress.Chainable { - return cy.get('[role="tab"]').eq(3); + cy.waitUntil(() => { + return cy.get('#mat-tab-label-0-1').should('be.visible'); + }); + return cy.get('#mat-tab-label-0-1'); } profile = new ProfileTab(); - mobile = new MobileTab(); security = new SecurityTab(); constructor() {