Fixed up tests to be aware of the new dialog

This commit is contained in:
tidusjar 2021-03-25 08:54:35 +00:00
commit 5678f43f41
6 changed files with 168 additions and 38 deletions

View file

@ -1,13 +1,22 @@
import { EpisodeRequestModal } from "./EpisodeRequestModal";
export enum DiscoverType {
Upcoming,
Trending,
Popular,
RecentlyRequested,
}
export class DiscoverCard {
private id: string;
private movie: boolean;
private type: DiscoverType;
episodeRequestModal = new EpisodeRequestModal();
constructor(id: string, movie: boolean) {
constructor(id: string, movie: boolean, type?: DiscoverType) {
this.id = id;
this.movie = movie;
this.type = type;
}
get topLevelCard(): Cypress.Chainable<any> {
@ -35,7 +44,7 @@ export class DiscoverCard {
}
get requestButton(): Cypress.Chainable<any> {
return cy.get(`#requestButton${this.id}${this.movie ? '1' : '0'}`);
return cy.get(`#requestButton${this.id}${this.movie ? '1' : '0'}${this.type}`);
}
verifyTitle(expected: string): Cypress.Chainable<any> {