refactoring some of the tests

This commit is contained in:
tidusjar 2021-03-10 16:49:23 +00:00
commit e4ab1447aa
14 changed files with 1702 additions and 65 deletions

View file

@ -0,0 +1,37 @@
import { BasePage } from "../base.page";
class CarouselComponent {
private id: string;
get combinedButton(): Cypress.Chainable<any> {
return cy.get(`#${this.id}Combined-button`);
}
get movieButton(): Cypress.Chainable<any> {
return cy.get(`#${this.id}Movie-button`);
}
get tvButton(): Cypress.Chainable<any> {
return cy.get(`#${this.id}Tv-button`);
}
constructor(id: string) {
this.id = id;
}
}
class DiscoverPage extends BasePage {
popularCarousel = new CarouselComponent('popular');
constructor() {
super();
}
visit(options?: Cypress.VisitOptions): Cypress.Chainable<Cypress.AUTWindow> {
return cy.visit(`/discover`, options);
}
}
export const discoverPage = new DiscoverPage();