Initial Commit

This commit is contained in:
2026-05-27 23:29:53 +01:00
commit fbc70f96e6
10000 changed files with 1102152 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import { test, expect } from "@playwright/test";
import { attachNetworkMonitor } from "@suaveplan/testing-e2e/network-monitor";
test.describe("Network Baseline", () => {
test("home page loads without network failures", async ({ page }) => {
const monitor = attachNetworkMonitor(page);
await page.goto("/");
await expect(page.locator('[data-testid="page-title"]')).toBeVisible();
// Filter out WebSocket attempts (expected to fail in test env)
const failures = monitor.failures.filter(
(f) => !f.url.includes("/api/ws") && !f.url.includes("stun:"),
);
expect(failures).toHaveLength(0);
});
test("crypto page loads without network failures", async ({ page }) => {
const monitor = attachNetworkMonitor(page);
await page.goto("/crypto");
await expect(page.locator('[data-testid="page-title"]')).toBeVisible();
const failures = monitor.failures.filter(
(f) => !f.url.includes("/api/ws"),
);
expect(failures).toHaveLength(0);
});
test("storage-s3 status check is made on page load", async ({ page }) => {
const requests: string[] = [];
page.on("request", (req) => requests.push(req.url()));
await page.goto("/storage-s3");
await expect(page.locator('[data-testid="demo-card"]')).toBeVisible();
expect(requests.some((r) => r.includes("/api/storage/status"))).toBe(true);
});
test("surrealdb status check is made on page load", async ({ page }) => {
const requests: string[] = [];
page.on("request", (req) => requests.push(req.url()));
await page.goto("/surrealdb");
await expect(page.locator('[data-testid="demo-card"]')).toBeVisible();
expect(requests.some((r) => r.includes("/api/database/status"))).toBe(true);
});
});