add wait for page navigation to applicable tests

This commit is contained in:
Arthur Lu 2022-11-18 19:21:53 -08:00
parent b75e4172b4
commit 82be561bfe

View File

@ -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");