From 274a05fdc231008de058c4277e109ebe12c34cab Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Fri, 18 Nov 2022 20:43:55 -0800 Subject: [PATCH] convert page.click() to button.click() --- source/assets/scripts/main.e2e.test.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/source/assets/scripts/main.e2e.test.js b/source/assets/scripts/main.e2e.test.js index 3ce874f..43817ff 100644 --- a/source/assets/scripts/main.e2e.test.js +++ b/source/assets/scripts/main.e2e.test.js @@ -52,7 +52,8 @@ describe("test App end to end", async () => { rating_select.click(); // Click the save button to save updates - page.click("#save-btn"); + let save_btn = await page.$("#save-btn"); + save_btn.click(); await page.waitForNavigation(); }); @@ -122,7 +123,8 @@ describe("test App end to end", async () => { rating_select.click(); // Click the save button to save updates - page.click("#save-btn"); + let save_btn = await page.$("#save-btn"); + save_btn.click(); await page.waitForNavigation(); }); @@ -164,7 +166,6 @@ describe("test App end to end", async () => { // Click the button to return to the home page let home_btn = await page.$("#home-btn"); home_btn.click(); - await page.waitForNavigation(); // Get the review card again and get its shadowRoot @@ -211,10 +212,12 @@ describe("test App end to end", async () => { // Get the only review card and click it let review_card = await page.$("review-card"); await review_card.click(); + await page.waitForNavigation(); // Get the delete button and click it let delete_btn = await page.$("#delete-btn"); await delete_btn.click(); + await page.waitForNavigation(); // Check that the card was correctly removed (there should be no remaining cards) review_card = await page.$("#review-card");