Compare commits

...
Author SHA1 Message Date
kristianwindandClaude Opus 5 711fb4838b test(e2e): the calendar test counted other tests' tasks as its own
The calendar test asserted `[data-date=day] .tevent` had a count of exactly one —
the mocked meeting — after dragging its task to the next day. That count assumed
the day held nothing but this test's own events. It does not: the suite shares one
database, and an earlier test drags a task across a month boundary, which on some
dates lands a timed task on this very day. A timed task renders as a `.tevent`
too, so the count was two, and the test failed — but only in the full run, and
only when the date arithmetic put the two tests on the same cell. Alone it passed,
which is exactly the shape of a shared-state collision rather than a real bug.

Named, not counted: assert the meeting is still there and the task is no longer in
the day's column, which is what "the events stayed, the task moved" actually
means — and is true however full another test left the day. Same for the all-day
band. No product code changed; the drag and everything it checks are untouched.

Co-Authored-By: Claude Opus 5 <[email protected]>
2026-08-24 08:19:17 +02:00
Kristian Wind 15be5d2165 Merge pull request #14 from kristianwind/security-hardening-headers
CI / OpenAPI is valid (push) Successful in 10s
CI / End-to-end (push) Successful in 8m30s
CI / Docker image builds (push) Successful in 1m27s
CI / Go (push) Failing after 14m29s
Security hardening: HSTS, forwarded-IP trust, single-use TOTP
2026-08-23 23:41:44 +02:00
+12 -2
View File
@@ -1202,8 +1202,18 @@ test('kalenderen viser Googles begivenheder over egne opgaver, og kun opgaven ka
await expect(page.locator(`[data-date="${next}"] .tevent`).getByText('vande blomster')).toBeVisible();
await expect(band.getByText('vande blomster')).toBeHidden();
// The events stayed where they were; a rescheduled task moves nothing else.
await expect(cell.locator('.tevent')).toHaveCount(1);
await expect(band.locator('.event')).toHaveCount(1);
//
// Named, not counted. A raw `.tevent` count here assumes this day holds nothing
// but this test's own events — and it does not: the suite shares one database,
// so an earlier test that drags a task across a month boundary can leave a timed
// task on this very day, and a timed task is a `.tevent` too. Counting them all
// made this pass alone and fail in the full run, on whatever date the arithmetic
// happened to land the two tests on the same cell. Asserting the meeting stayed
// and the task left is the thing the test actually means, and it is true however
// full somebody else left the day.
await expect(cell.locator('.tevent').filter({ hasText: 'Bestyrelsesmøde' })).toHaveCount(1);
await expect(cell.locator('.tevent').filter({ hasText: 'vande blomster' })).toHaveCount(0);
await expect(band.locator('.event').filter({ hasText: 'Feriedag' })).toHaveCount(1);
expect(trouble).toEqual([]);
});