From 82be561bfe7597212a428ffa2f583982dbe6c768 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Fri, 18 Nov 2022 19:21:53 -0800 Subject: [PATCH] add wait for page navigation to applicable tests --- source/assets/scripts/main.e2e.test.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/source/assets/scripts/main.e2e.test.js b/source/assets/scripts/main.e2e.test.js index d2b9753..620ca20 100644 --- a/source/assets/scripts/main.e2e.test.js +++ b/source/assets/scripts/main.e2e.test.js @@ -61,6 +61,8 @@ describe("test App end to end", async () => { let review_card = await page.$("review-card"); await review_card.click(); + await page.waitForNavigation(); + // Click the button to show update form let update_btn = await page.$("update-btn"); await update_btn.click(); @@ -133,6 +135,8 @@ describe("test App end to end", async () => { let home_btn = await page.$("#home-btn"); home_btn.click(); + await page.waitForNavigation(); + // Get the review card again and get its shadowRoot let review_card = await page.$("review-card"); let shadowRoot = await review_card.getProperty("shadowRoot");