57 lines
2.1 KiB
TypeScript
57 lines
2.1 KiB
TypeScript
import { expect, test } from "@playwright/test";
|
|
|
|
test("opens the RPKI Explorer overview prototype", async ({ page }) => {
|
|
const consoleErrors: string[] = [];
|
|
page.on("console", (message) => {
|
|
if (message.type() === "error") {
|
|
const text = message.text();
|
|
if (!text.includes("Failed to load resource")) {
|
|
consoleErrors.push(text);
|
|
}
|
|
}
|
|
});
|
|
|
|
await page.goto("/");
|
|
|
|
await expect(page.getByRole("heading", { name: "RPKI Explorer" })).toBeVisible();
|
|
await expect(page.getByRole("heading", { name: "Global RPKI validation health" })).toBeVisible();
|
|
await expect(page.getByRole("button", { name: /Overview/i })).toBeVisible();
|
|
await expect(page.getByText("Top repositories by workload")).toBeVisible();
|
|
await expect(page.getByText("Recent validation issues")).toBeVisible();
|
|
await expect(page.getByRole("cell", { name: /RRDP|RSYNC/i }).first()).toBeVisible();
|
|
await page.screenshot({
|
|
path: "../../../../specs/develop/20260617/m2_playwright/rpki-explorer-overview.png",
|
|
fullPage: true
|
|
});
|
|
expect(consoleErrors).toEqual([]);
|
|
});
|
|
|
|
test("opens the RPKI Explorer object detail prototype", async ({ page }) => {
|
|
test.setTimeout(90_000);
|
|
const consoleErrors: string[] = [];
|
|
page.on("console", (message) => {
|
|
if (message.type() === "error") {
|
|
const text = message.text();
|
|
if (!text.includes("Failed to load resource")) {
|
|
consoleErrors.push(text);
|
|
}
|
|
}
|
|
});
|
|
|
|
await page.goto("/");
|
|
await page.getByRole("button", { name: /Objects/i }).click();
|
|
|
|
await expect(page.getByRole("heading", { name: "MFT object" })).toBeVisible({ timeout: 70_000 });
|
|
await expect(page.getByText("Object detail · live query service")).toBeVisible();
|
|
await expect(page.getByText("File and chain checks")).toBeVisible();
|
|
await expect(page.getByRole("tab", { name: "Validation" })).toBeVisible();
|
|
await page.getByRole("tab", { name: "Validation" }).click();
|
|
await expect(page.getByText("Final status: valid")).toBeVisible();
|
|
|
|
await page.screenshot({
|
|
path: "../../../../specs/develop/20260617/m2_playwright/rpki-explorer-object-detail.png",
|
|
fullPage: true
|
|
});
|
|
expect(consoleErrors).toEqual([]);
|
|
});
|