Skip to content

Commit

Permalink
Fix for tests failing (#62)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrii Onufriichuk <andrii.onufriichuk@rvvup.com>
  • Loading branch information
andrii-onufriichuk and Andrii Onufriichuk authored Aug 14, 2024
1 parent 2457151 commit 618315a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Test/End-2-End/card-modal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ test.skip("Can place an order using the credit card modal", async ({

await page.getByLabel("Pay by Card").click();

/** Add timeout to prevent clicking 'Place Order' too fast, which will result in
* failure to open popup modal
*/
await page.waitForTimeout(3000);

await page.getByRole("button", { name: "Place order" }).click();

// Credit card form
Expand Down
5 changes: 5 additions & 0 deletions Test/End-2-End/clearpay.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ test.skip("Can place an order", async ({ page, browser }) => {

await page.getByLabel("Clearpay").click();

/** Add timeout to prevent clicking 'Place Order' too fast, which will result in
* failure to open popup modal
*/
await page.waitForTimeout(3000);

await page.getByRole("button", { name: "Place order" }).click();

await visitCheckoutPayment.loadersShouldBeHidden();
Expand Down
5 changes: 4 additions & 1 deletion Test/End-2-End/pay_by_bank.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ test("Can place an order using pay by bank", async ({ page, browser }) => {
await visitCheckoutPayment.visit();

await page.getByLabel("Pay by Bank").click();

/** Add timeout to prevent clicking 'Place Order' too fast, which will result in
* failure to open popup modal
*/
await page.waitForTimeout(3000);
await page.getByRole("button", { name: "Place order" }).click();

// Credit card form
Expand Down

0 comments on commit 618315a

Please sign in to comment.