fix: update project dashboard URL regex to include optional home path

This commit is contained in:
Nawaz Dhandala
2026-04-03 16:33:55 +01:00
parent 0502eb5ebe
commit 37e4f28e57
2 changed files with 10 additions and 5 deletions

View File

@@ -3,7 +3,8 @@ import { Page, expect, test, Response, Locator } from "@playwright/test";
import URL from "Common/Types/API/URL";
import Faker from "Common/Utils/Faker";
const projectDashboardUrlRegex: RegExp = /\/dashboard\/([a-f0-9-]+)(?:\/)?$/;
const projectDashboardUrlRegex: RegExp =
/\/dashboard\/([a-f0-9-]+)(?:\/home\/?)?$/;
test.describe("Monitor Creation", () => {
test("should be able to create a new monitor", async ({
@@ -134,9 +135,12 @@ test.describe("Monitor Creation", () => {
break;
}
await page.waitForURL(new RegExp(`/dashboard/${projectId}(?:/)?$`), {
timeout: 30000,
});
await page.waitForURL(
new RegExp(`/dashboard/${projectId}(?:/home/?)?$`),
{
timeout: 30000,
},
);
await page.waitForTimeout(1000);
}
}

View File

@@ -3,7 +3,8 @@ import { Page, expect, test, Response, Locator } from "@playwright/test";
import URL from "Common/Types/API/URL";
import Faker from "Common/Utils/Faker";
const projectDashboardUrlRegex: RegExp = /\/dashboard\/([a-f0-9-]+)(?:\/)?$/;
const projectDashboardUrlRegex: RegExp =
/\/dashboard\/([a-f0-9-]+)(?:\/home\/?)?$/;
test.describe("Project Creation", () => {
test("should be able to create a new project", async ({