Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions apps/api-e2e/src/api/core-time-violations.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ describe('Violations — gap-based core-time detection', () => {
},
});

const token = await login(ctx.http, anna.email);
const res = await ctx.http
.get(`/api/violations?employeeId=${anna.id}`)
.set('Authorization', `Bearer ${token}`)
.expect(200);
expect(res.body).toEqual([]);
});
Expand All @@ -221,8 +223,10 @@ describe('Violations — gap-based core-time detection', () => {
},
});

const token = await login(ctx.http, anna.email);
const res = await ctx.http
.get(`/api/violations?employeeId=${anna.id}`)
.set('Authorization', `Bearer ${token}`)
.expect(200);
expect(res.body).toHaveLength(1);
expect(res.body[0]).toMatchObject({ boundary: '10:00–11:00', deltaMinutes: 60 });
Expand Down Expand Up @@ -290,8 +294,10 @@ describe('Violations — gap-based core-time detection', () => {
],
});

const token = await login(ctx.http, anna.email);
const res = await ctx.http
.get(`/api/violations?employeeId=${anna.id}`)
.set('Authorization', `Bearer ${token}`)
.expect(200);

// Only yesterday's violation surfaces — today is in progress.
Expand Down
Loading
Loading