20260728_2 修复rpki-explorer体验问题7项(#134):证书资源可展开、CMS对象新增EE Parsed Tab、Overview增加repo数KPI/修复Object types标签/Top repositories按objects排序(后端sort参数)/reject reasons按前缀聚类可下钻、Run选择器30s轮询
This commit is contained in:
@@ -13,15 +13,28 @@ test("overview renders run strip, KPIs, charts, top repos and reasons", async ({
|
||||
await expect(page.getByText("VRPs")).toBeVisible();
|
||||
await expect(page.getByText("987")).toBeVisible();
|
||||
await expect(page.locator(".kpi-grid").getByText("Rejected")).toBeVisible();
|
||||
// Repositories KPI from stats/overview
|
||||
const reposKpi = page.locator(".kpi-grid > *", { hasText: "Repositories" });
|
||||
await expect(reposKpi).toBeVisible();
|
||||
await expect(reposKpi).toContainText("3");
|
||||
|
||||
// Charts render (recharts svg)
|
||||
await expect(page.locator(".recharts-responsive-container").first()).toBeVisible();
|
||||
|
||||
// Top repositories table
|
||||
await expect(page.getByRole("cell", { name: "repo-a.example" })).toBeVisible();
|
||||
// Top repositories table, sorted by objects desc (900 > 300 > 84),
|
||||
// not the fixture index order (300, 900, 84).
|
||||
const repoRows = page.locator(".overview-bottom table tbody tr");
|
||||
await expect(repoRows.first()).toContainText("repo-a.example");
|
||||
await expect(repoRows.nth(1)).toContainText("repo-b.example");
|
||||
await expect(repoRows.nth(2)).toContainText("repo-c.example");
|
||||
|
||||
// Top reject reasons
|
||||
await expect(page.getByText("certificate expired: notAfter")).toBeVisible();
|
||||
// Top reject reasons, clustered by prefix: the two validation_time
|
||||
// variants merge into one row with a combined count.
|
||||
const cluster = page.getByRole("link", { name: /manifest is not valid at validation_time/ });
|
||||
await expect(cluster).toBeVisible();
|
||||
await expect(cluster).toContainText("×2");
|
||||
await expect(cluster).toContainText("5");
|
||||
await expect(page.getByRole("link", { name: "certificate expired" })).toBeVisible();
|
||||
});
|
||||
|
||||
test("overview does not request the global object list (first-screen discipline)", async ({
|
||||
@@ -59,5 +72,5 @@ test("overview drill-down: reason navigates to filtered validation page", async
|
||||
test("overview shows an explicit error state when the run cannot be loaded", async ({ page }) => {
|
||||
await installMockApi(page, { failLatestRun: true });
|
||||
await page.goto("/");
|
||||
await expect(page.getByRole("alert")).toContainText("Failed to load the latest run");
|
||||
await expect(page.getByRole("alert")).toContainText("Failed to load run latest");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user