M15: synchronize contracts and acceptance

This commit is contained in:
NuklearRabbit
2026-08-10 05:39:19 +02:00
parent 58fb515337
commit 2ee8b2d82b
38 changed files with 5091 additions and 1727 deletions
+9 -2
View File
@@ -88,11 +88,18 @@ test("attention queue row opens the correct record on a mobile viewport tap", as
await page.goto("/dashboard");
const row = page.locator(".attention-list li.row-clickable").first();
await expect(row).toBeVisible();
const box = await row.boundingBox();
const link = row.locator(".row-link");
const [rowBox, linkBox] = await Promise.all([row.boundingBox(), link.boundingBox()]);
expect(rowBox).not.toBeNull();
expect(linkBox).not.toBeNull();
// The stretched link itself must cover the whole mobile row. Locator.click handles
// scrolling and fixed mobile chrome before clicking the link's empty right-hand area.
expect(Math.abs(linkBox!.width - rowBox!.width)).toBeLessThanOrEqual(1);
expect(Math.abs(linkBox!.height - rowBox!.height)).toBeLessThanOrEqual(1);
// A real touch context needs `hasTouch`, which this shared spec file doesn't opt into;
// a mouse click at the same mobile viewport size still exercises the same CSS layout
// and click-target logic, since the app has no touch-specific event handling.
await page.mouse.click(box!.x + box!.width - 10, box!.y + box!.height / 2);
await link.click({ position: { x: linkBox!.width - 10, y: linkBox!.height / 2 } });
await expect(page).toHaveURL(/\/(data-quality|vehicles)\//);
});