L12 Zeiterfassung: Tests und authentifizierter Smoke

test-zeiterfassung-service (78 Prüfungen) und test-zeiterfassung-sync (29 Prüfungen),
Rollen-Matrix um field:record_own_time und time:approve ergänzt, smoke-auth um
/m/time, /m/time/new, /m/approvals, Uhr-Leiste und /work-orders/time-approvals.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 09:29:46 +02:00
co-authored by Claude Opus 5
parent fe3eba6e44
commit 9f4eecf6e2
4 changed files with 409 additions and 1 deletions
+15 -1
View File
@@ -81,6 +81,9 @@ function plans(x: Awaited<ReturnType<typeof ids>>): Plan[] {
...tabs.map((t) => ({ path: wo(x.d07, `?tab=${t}`), mustContain: x.d07.number })),
{ path: wo(x.d18, "?tab=reports"), mustContain: x.d18.number },
{ path: "/work-orders/conflicts" },
// L12 Zeiterfassung
{ path: "/work-orders/time-approvals", mustContain: "Zeiten zur Freigabe" },
{ path: "/dashboard", mustContain: "Zeiten zur Freigabe" },
{ path: "/work-orders/emergency-review", mustContain: x.emergency?.number },
...(x.emergency ? [{ path: `/work-orders/emergency-review/${x.emergency.id}`, mustContain: x.emergency.number }] : []),
{ path: "/imports" },
@@ -113,6 +116,10 @@ function plans(x: Awaited<ReturnType<typeof ids>>): Plan[] {
{ path: "/reports" },
...(x.inReview ? [{ path: `/reports/${x.inReview.id}`, mustContain: x.d16?.number }] : []),
{ path: m(x.d08), expect: [404] },
// L12 Zeiterfassung
{ path: "/m/time", mustContain: ["Meine Zeiten", "Zeit nachtragen"] },
{ path: "/m/approvals", mustContain: "Zeiten freigeben" },
{ path: "/m/profile", mustContain: "Zeiten freigeben" },
],
},
{
@@ -136,7 +143,14 @@ function plans(x: Awaited<ReturnType<typeof ids>>): Plan[] {
{ path: "/m/emergency" },
{ path: "/m/sync" },
{ path: "/m/offline" },
{ path: "/m/profile", mustContain: "Max Monteur" },
{ path: "/m/profile", mustContain: ["Max Monteur", "Meine Zeiten"] },
// L12 Zeiterfassung
{ path: "/m", mustContain: ["Laufende Zeiterfassung", "Für heute beenden"] },
{ path: "/m/time", mustContain: ["Meine Zeiten", "Zeit nachtragen"] },
{ path: `/m/time?date=${new Date(Date.now() - 86400_000).toISOString().slice(0, 10)}`, mustContain: "Meine Zeiten" },
{ path: "/m/time/new", mustContain: ["Zeit nachtragen", "Begründung"] },
{ path: "/m/approvals", mustContain: "nicht freigeschaltet" },
{ path: m(x.d07, "/time"), mustContain: x.d07.number },
...(x.photo ? [{ path: `/files/${x.photo.documentId}`, expect: [200] }] : []),
{ path: m(x.d08), expect: [404] },
{ path: `/customers/${x.foreignCustomer.id}`, expect: [404, 307] },