Skip to content

Commit

Permalink
test(automation): 🧪 Fixed flakey tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tidusjar committed Oct 11, 2021
1 parent 10f5e05 commit 2fe41f3
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/cypress/tests/discover/discover-cards-requests.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { discoverPage as Page } from "@/integration/page-objects";
import { DiscoverType } from "@/integration/page-objects/shared/DiscoverCard";
import { discoverPage as Page } from "@/integration/page-objects";

describe("Discover Cards Requests Tests", () => {
beforeEach(() => {
Expand Down Expand Up @@ -288,9 +288,15 @@ describe("Discover Cards Requests Tests", () => {
var expectedId = body[3].id;
var title = body[3].title;

cy.wait(3000);

const card = Page.popularCarousel.getCard(expectedId, false, DiscoverType.Popular);
card.title.realHover();

cy.waitUntil(() => {
return card.requestButton.should("be.visible");
});

card.verifyTitle(title);
card.requestButton.should("be.visible");
card.requestButton.click();
Expand Down Expand Up @@ -335,9 +341,15 @@ describe("Discover Cards Requests Tests", () => {
var expectedId = body[5].id;
var title = body[5].title;

cy.wait(3000);

const card = Page.popularCarousel.getCard(expectedId, false, DiscoverType.Popular);
card.title.realHover();

cy.waitUntil(() => {
return card.requestButton.should("be.visible");
});

card.verifyTitle(title);
card.requestButton.should("be.visible");
card.requestButton.click();
Expand Down

0 comments on commit 2fe41f3

Please sign in to comment.