mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
fix: ensure page stability after project creation by waiting for network to be idle
This commit is contained in:
@@ -83,6 +83,10 @@ test.describe("Monitor Creation", () => {
|
||||
timeout: 30000,
|
||||
});
|
||||
|
||||
// Wait for the page to fully settle after project creation
|
||||
// The app may perform internal redirects after project setup
|
||||
await page.waitForLoadState("networkidle");
|
||||
|
||||
// Extract the project ID from the URL
|
||||
const projectUrl: string = page.url();
|
||||
const projectIdMatch: RegExpMatchArray | null = projectUrl.match(
|
||||
@@ -96,6 +100,7 @@ test.describe("Monitor Creation", () => {
|
||||
URL.fromString(BASE_URL.toString())
|
||||
.addRoute(`/dashboard/${projectId}/monitors/create`)
|
||||
.toString(),
|
||||
{ waitUntil: "networkidle" },
|
||||
);
|
||||
|
||||
// Wait for the create monitor form to load
|
||||
|
||||
Reference in New Issue
Block a user