import { BasePage } from "../base.page"; class ProfileTab { get languageSelectBox(): Cypress.Chainable { return cy.get('#langSelect'); } languageSelectBoxOption(lang: string): Cypress.Chainable { return cy.get('#langSelect'+lang); } get streamingSelectBox(): Cypress.Chainable { return cy.get('#streamingSelect'); } streamingSelectBoxOption(country: string): Cypress.Chainable { return cy.get('#streamingSelect'+country); } } class SecurityTab { get currentPassword(): Cypress.Chainable { return cy.get('#currentPassword'); } get email(): Cypress.Chainable { return cy.get('#email'); } get newPassword(): Cypress.Chainable { return cy.get('#newPassword'); } get confirmPassword(): Cypress.Chainable { return cy.get('#confirmPassword'); } get submitButton(): Cypress.Chainable { return cy.get('#submitSecurity'); } } class UserPreferencesPage extends BasePage { get username(): Cypress.Chainable { return cy.get('#usernameTitle'); } get email(): Cypress.Chainable { return cy.get('#emailTitle'); } get profileTab(): Cypress.Chainable { return cy.get('#mat-tab-label-0-0'); } get securityTab(): Cypress.Chainable { cy.waitUntil(() => { return cy.get('#mat-tab-label-0-1').should('be.visible'); }); return cy.get('#mat-tab-label-0-1'); } profile = new ProfileTab(); security = new SecurityTab(); constructor() { super(); } visit(options: Cypress.VisitOptions): Cypress.Chainable; visit(): Cypress.Chainable; visit(id: string): Cypress.Chainable; visit(id: string, options: Cypress.VisitOptions): Cypress.Chainable; visit(id?: any, options?: any) { return cy.visit(`/user-preferences`, options); } } export const userPreferencesPage = new UserPreferencesPage();