mirror of https://github.com/Ombi-app/Ombi
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
81 lines
2.1 KiB
81 lines
2.1 KiB
import { BasePage } from "../base.page";
|
|
|
|
class ProfileTab {
|
|
get languageSelectBox(): Cypress.Chainable<any> {
|
|
return cy.get('#langSelect');
|
|
}
|
|
|
|
languageSelectBoxOption(lang: string): Cypress.Chainable<any> {
|
|
return cy.get('#langSelect'+lang);
|
|
}
|
|
|
|
get streamingSelectBox(): Cypress.Chainable<any> {
|
|
return cy.get('#streamingSelect');
|
|
}
|
|
|
|
streamingSelectBoxOption(country: string): Cypress.Chainable<any> {
|
|
return cy.get('#streamingSelect'+country);
|
|
}
|
|
}
|
|
|
|
class SecurityTab {
|
|
get currentPassword(): Cypress.Chainable<any> {
|
|
return cy.get('#currentPassword');
|
|
}
|
|
|
|
get email(): Cypress.Chainable<any> {
|
|
return cy.get('#email');
|
|
}
|
|
|
|
get newPassword(): Cypress.Chainable<any> {
|
|
return cy.get('#newPassword');
|
|
}
|
|
|
|
get confirmPassword(): Cypress.Chainable<any> {
|
|
return cy.get('#confirmPassword');
|
|
}
|
|
|
|
get submitButton(): Cypress.Chainable<any> {
|
|
return cy.get('#submitSecurity');
|
|
}
|
|
}
|
|
|
|
class UserPreferencesPage extends BasePage {
|
|
|
|
|
|
get username(): Cypress.Chainable<any> {
|
|
return cy.get('#usernameTitle');
|
|
}
|
|
get email(): Cypress.Chainable<any> {
|
|
return cy.get('#emailTitle');
|
|
}
|
|
|
|
get profileTab(): Cypress.Chainable<any> {
|
|
return cy.get('#mat-tab-label-0-0');
|
|
}
|
|
|
|
get securityTab(): Cypress.Chainable<any> {
|
|
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<Cypress.AUTWindow>;
|
|
visit(): Cypress.Chainable<Cypress.AUTWindow>;
|
|
visit(id: string): Cypress.Chainable<Cypress.AUTWindow>;
|
|
visit(id: string, options: Cypress.VisitOptions): Cypress.Chainable<Cypress.AUTWindow>;
|
|
visit(id?: any, options?: any) {
|
|
return cy.visit(`/user-preferences`, options);
|
|
}
|
|
}
|
|
|
|
export const userPreferencesPage = new UserPreferencesPage();
|