From c0101afb5913d1dde81b0a887d2cb20988a547b5 Mon Sep 17 00:00:00 2001 From: kolaente Date: Tue, 21 Apr 2026 12:18:08 +0200 Subject: [PATCH] test(e2e): widen recurrence due-date tolerance to 5s MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI shard 4 hit a ~996ms skew between the JS-constructed originalDue and the backend's advanced due date, enough to bust the <500ms precision bound. Bump precision to -4 (<5s) — still tight enough to confirm the regeneration advanced by ~1 day, loose enough to absorb sub-second round-tripping through Date → ISO → Go time.Time → JSON. --- frontend/tests/e2e/task/recurrence.spec.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frontend/tests/e2e/task/recurrence.spec.ts b/frontend/tests/e2e/task/recurrence.spec.ts index 76101c250..e748869f8 100644 --- a/frontend/tests/e2e/task/recurrence.spec.ts +++ b/frontend/tests/e2e/task/recurrence.spec.ts @@ -56,7 +56,9 @@ test.describe('Task recurrence', () => { const newDue = new Date(refreshed.due_date).getTime() // addRepeatIntervalToTime: when the original due date is still in the // future, the backend advances it by exactly one interval (86400s here). - expect(newDue - originalDue.getTime()).toBeCloseTo(86_400_000, -3) + // Tolerance of <5s absorbs sub-second timestamp round-tripping between + // the JS Date → ISO string → backend time.Time → JSON response path. + expect(newDue - originalDue.getTime()).toBeCloseTo(86_400_000, -4) }) test('monthly repeat mode hides the amount field', async ({authenticatedPage: page}) => {