From 0d654c06e6521b8d3fc4d4d320d748a186b5c193 Mon Sep 17 00:00:00 2001 From: Xiaonan Cui Date: Thu, 23 Jul 2026 21:50:09 +0800 Subject: [PATCH] test(e2e): update landing redirect assertions for dashboard landing page (#109) --- e2e/domain-overview-test-utils.ts | 4 ++-- e2e/keyword-research-navigation.spec.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/domain-overview-test-utils.ts b/e2e/domain-overview-test-utils.ts index 7cfd65d..89774b0 100644 --- a/e2e/domain-overview-test-utils.ts +++ b/e2e/domain-overview-test-utils.ts @@ -181,11 +181,11 @@ export async function openDomainOverview(page: Page, tab: DomainTab) { window.sessionStorage.setItem("domain-overview-e2e-cleared", "1"); }); await page.goto("/"); - await page.waitForURL(/\/p\/([^/]+)\/keywords(?:\?.*)?$/, { + await page.waitForURL(/\/p\/([^/]+)\/?$/, { timeout: 30_000, }); - const match = page.url().match(/\/p\/([^/]+)\/keywords/); + const match = page.url().match(/\/p\/([^/]+)/); if (!match) throw new Error(`Could not read project id from ${page.url()}`); const params = new URLSearchParams({ diff --git a/e2e/keyword-research-navigation.spec.ts b/e2e/keyword-research-navigation.spec.ts index 0da192c..c4cc95b 100644 --- a/e2e/keyword-research-navigation.spec.ts +++ b/e2e/keyword-research-navigation.spec.ts @@ -2,11 +2,11 @@ import { expect, test, type Page } from "@playwright/test"; async function getProjectId(page: Page) { await page.goto("/"); - await page.waitForURL(/\/p\/([^/]+)\/keywords(?:\?.*)?$/, { + await page.waitForURL(/\/p\/([^/]+)\/?$/, { timeout: 30_000, }); - const match = page.url().match(/\/p\/([^/]+)\/keywords/); + const match = page.url().match(/\/p\/([^/]+)/); if (!match) throw new Error(`Could not read project id from ${page.url()}`); return match[1]; }