mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-21 05:43:19 -07:00
refactoring some of the tests
This commit is contained in:
parent
43e22acaca
commit
e4ab1447aa
14 changed files with 1702 additions and 65 deletions
|
@ -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();
|
Loading…
Add table
Add a link
Reference in a new issue