M54: harden operations and demo resilience
MobilityOps acceptance / backend (push) Failing after 19s
MobilityOps acceptance / frontend (push) Successful in 25s
MobilityOps acceptance / e2e (push) Skipped

This commit is contained in:
NuklearRabbit
2026-08-24 03:31:03 +02:00
parent b0706989db
commit 81e3fd63bd
101 changed files with 5641 additions and 828 deletions
+59 -1
View File
@@ -26,11 +26,69 @@ test("Engineering Story exposes architecture, reliability and honest integration
await expect(page.getByRole("heading", { name: "Controle, betrouwbaarheid en uitlegbaarheid" }).first()).toBeVisible();
await expect(page.getByText("Commit eerst, orkestreer daarna")).toBeVisible();
await expect(page.getByText("AI moet bewijs tonen")).toBeVisible();
await expect(page.getByText("PostgreSQL + audittrail")).toBeVisible();
await expect(page.locator(".architecture-step", { hasText: "PostgreSQL + audittrail" }).getByRole("button")).toBeVisible();
const outboxStep = page.locator(".architecture-step", { hasText: "Betrouwbare outbox" }).getByRole("button");
await outboxStep.click();
await expect(outboxStep).toHaveAttribute("aria-pressed", "true");
await expect(page.locator("#architecture-active-detail")).toContainText("Post-commit aflevering");
const architectureTypeMinimums = [
[".architecture-zones > span", 12],
[".architecture-step button > small", 13],
[".architecture-zone-tag", 12],
[".architecture-commit-note", 12],
[".architecture-interaction-hint", 13],
[".architecture-active-copy p", 13],
[".architecture-active-evidence dt", 12],
[".architecture-active-evidence dd", 13],
] as const;
for (const [selector, minimumPixels] of architectureTypeMinimums) {
const fontSize = await page.locator(selector).first().evaluate((element) =>
Number.parseFloat(window.getComputedStyle(element).fontSize));
expect(fontSize, `${selector} font-size`).toBeGreaterThanOrEqual(minimumPixels);
}
await expect(page.getByText(/nog niet live gekoppeld/)).toHaveCount(0);
await expect(page.getByText(/unknown procedures/)).toHaveCount(0);
});
test("dashboard load failure offers an in-place retry and recovers", async ({ page }) => {
await loginAsOperationsManager(page);
let dashboardAttempts = 0;
let allowDashboardRecovery = false;
await page.route("**/api/v1/dashboard", async (route) => {
dashboardAttempts += 1;
if (!allowDashboardRecovery) {
await route.fulfill({ status: 503, contentType: "application/json", body: "{}" });
return;
}
await route.continue();
});
await page.reload();
const retryButton = page.getByRole("button", { name: "Opnieuw proberen" });
await expect(retryButton).toBeVisible();
allowDashboardRecovery = true;
await retryButton.click();
await expect(page.getByRole("heading", { name: "Wagenparkstatus" })).toBeVisible();
expect(dashboardAttempts).toBeGreaterThanOrEqual(2);
});
test("dashboard header stacks a full-width touch target on mobile", async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 });
await loginAsOperationsManager(page);
const header = page.locator(".page-header");
const action = page.locator(".page-actions .button");
const [headerBox, actionBox] = await Promise.all([header.boundingBox(), action.boundingBox()]);
expect(headerBox).not.toBeNull();
expect(actionBox).not.toBeNull();
expect(actionBox!.width).toBeGreaterThanOrEqual(headerBox!.width - 1);
expect(Math.round(actionBox!.height)).toBeGreaterThanOrEqual(44);
expect(await page.evaluate(() => document.documentElement.scrollWidth)).toBeLessThanOrEqual(
await page.evaluate(() => document.documentElement.clientWidth + 1),
);
});
test("mobile recruiter surfaces remain readable without horizontal overflow", async ({ page }) => {
await page.setViewportSize({ width: 390, height: 844 });
await page.goto("/login");