mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix: update project dashboard URL regex to include optional home path
This commit is contained in:
@@ -3,7 +3,8 @@ import { Page, expect, test, Response, Locator } from "@playwright/test";
|
|||||||
import URL from "Common/Types/API/URL";
|
import URL from "Common/Types/API/URL";
|
||||||
import Faker from "Common/Utils/Faker";
|
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.describe("Monitor Creation", () => {
|
||||||
test("should be able to create a new monitor", async ({
|
test("should be able to create a new monitor", async ({
|
||||||
@@ -134,9 +135,12 @@ test.describe("Monitor Creation", () => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
await page.waitForURL(new RegExp(`/dashboard/${projectId}(?:/)?$`), {
|
await page.waitForURL(
|
||||||
timeout: 30000,
|
new RegExp(`/dashboard/${projectId}(?:/home/?)?$`),
|
||||||
});
|
{
|
||||||
|
timeout: 30000,
|
||||||
|
},
|
||||||
|
);
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import { Page, expect, test, Response, Locator } from "@playwright/test";
|
|||||||
import URL from "Common/Types/API/URL";
|
import URL from "Common/Types/API/URL";
|
||||||
import Faker from "Common/Utils/Faker";
|
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.describe("Project Creation", () => {
|
||||||
test("should be able to create a new project", async ({
|
test("should be able to create a new project", async ({
|
||||||
|
|||||||
Reference in New Issue
Block a user