test(dashboard): give the visual fixture an Unassigned count (SH-392)

This commit is contained in:
Alexandre Brandizzi 2026-09-24 21:48:16 -03:00
parent ed931ea2eb
commit fca87b67cb

View file

@ -191,7 +191,11 @@ async function mockDashboardApi(page: Page, userRoles: string) {
return;
}
if (pathname.includes("/Dashboard/Stats")) return fulfillJson(route, { data: STATS });
if (pathname.includes("/Dashboard/Stats")) {
// The server reports no unassigned work for a dispatcher-scoped view (SH-392).
const unassigned = userRoles === "Dispatcher" ? 0 : 11;
return fulfillJson(route, { data: { ...STATS, unassigned } });
}
if (pathname.includes("/Dashboard/Workload")) return fulfillJson(route, { data: WORKLOAD });
if (pathname.includes("/Dashboard/Performance"))
return fulfillJson(route, { data: PERFORMANCE });