Fixed the bugs that the automation tests found

This commit is contained in:
tidusjar 2021-03-25 09:55:44 +00:00
commit 130efd8216
3 changed files with 8 additions and 4 deletions

View file

@ -44,7 +44,11 @@ export class DiscoverCard {
}
get requestButton(): Cypress.Chainable<any> {
return cy.get(`#requestButton${this.id}${this.movie ? '1' : '0'}${this.type}`);
if (this.type) {
return cy.get(`#requestButton${this.id}${this.movie ? '1' : '0'}${this.type}`);
}
return cy.get(`#requestButton${this.id}${this.movie ? '1' : '0'}`);
}
verifyTitle(expected: string): Cypress.Chainable<any> {