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> {

View file

@ -79,7 +79,7 @@ describe("Search Tests", () => {
card.requestButton.should('exist');
});
it("No TV results, enabling movies filter we get results", () => {
it.only("No TV results, enabling movies filter we get results", () => {
Page.navbar.searchFilter.applyFilter(true, false, false);
Page.visit("half blood prince");