From 5c4b70f22e39b181abcc138a4dd4153cc6e26e9c Mon Sep 17 00:00:00 2001 From: Omkar Karnik Date: Tue, 16 Apr 2024 23:10:17 -0400 Subject: [PATCH] Update pots.spec.js test case for "learn more button should redirect to wtfisqr.com" --- playwright-tests/tests/pots.spec.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/playwright-tests/tests/pots.spec.js b/playwright-tests/tests/pots.spec.js index ee9bac1..6bd1339 100644 --- a/playwright-tests/tests/pots.spec.js +++ b/playwright-tests/tests/pots.spec.js @@ -48,8 +48,14 @@ test.describe("Admin is logged in", () => { }); }); -test("clicking learn more button should...", async ({ page }) => { - // TODO: +test("clicking learn more button should redirect to wtfisqr.com", async ({ page }) => { + const newTabPromise = page.waitForEvent("popup"); + + await page.getByText("Learn More").click(); + const newTab = await newTabPromise; + await newTab.waitForLoadState(); + + await expect(newTab).toHaveURL("https://www.wtfisqf.com/"); }); test("should show active pots", async ({ page }) => {