test(e2e): update landing redirect assertions for dashboard landing page (#109)
This commit is contained in:
parent
95e95d48cb
commit
0d654c06e6
@ -181,11 +181,11 @@ export async function openDomainOverview(page: Page, tab: DomainTab) {
|
|||||||
window.sessionStorage.setItem("domain-overview-e2e-cleared", "1");
|
window.sessionStorage.setItem("domain-overview-e2e-cleared", "1");
|
||||||
});
|
});
|
||||||
await page.goto("/");
|
await page.goto("/");
|
||||||
await page.waitForURL(/\/p\/([^/]+)\/keywords(?:\?.*)?$/, {
|
await page.waitForURL(/\/p\/([^/]+)\/?$/, {
|
||||||
timeout: 30_000,
|
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()}`);
|
if (!match) throw new Error(`Could not read project id from ${page.url()}`);
|
||||||
|
|
||||||
const params = new URLSearchParams({
|
const params = new URLSearchParams({
|
||||||
|
|||||||
@ -2,11 +2,11 @@ import { expect, test, type Page } from "@playwright/test";
|
|||||||
|
|
||||||
async function getProjectId(page: Page) {
|
async function getProjectId(page: Page) {
|
||||||
await page.goto("/");
|
await page.goto("/");
|
||||||
await page.waitForURL(/\/p\/([^/]+)\/keywords(?:\?.*)?$/, {
|
await page.waitForURL(/\/p\/([^/]+)\/?$/, {
|
||||||
timeout: 30_000,
|
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()}`);
|
if (!match) throw new Error(`Could not read project id from ${page.url()}`);
|
||||||
return match[1];
|
return match[1];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user