From 8338156cb8e32102663ef81c40c7dfdaadfcadef Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Sat, 19 Nov 2022 12:16:03 -0800 Subject: [PATCH] fix delete test issue with alert handling Signed-off-by: Arthur Lu --- source/assets/scripts/main.e2e.test.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/assets/scripts/main.e2e.test.js b/source/assets/scripts/main.e2e.test.js index 48ec53c..e9c93b8 100644 --- a/source/assets/scripts/main.e2e.test.js +++ b/source/assets/scripts/main.e2e.test.js @@ -364,6 +364,11 @@ describe("test App end to end", async () => { await review_card.click(); await page.waitForNavigation(); + page.on('dialog', async dialog => { + console.log(dialog.message()); + await dialog.accept(); + }); + // Get the delete button and click it let delete_btn = await page.$("#delete-btn"); await delete_btn.click();