test(e2e): widen recurrence due-date tolerance to 5s

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.
This commit is contained in:
kolaente 2026-04-21 12:18:08 +02:00 committed by kolaente
parent c3b86b2102
commit c0101afb59
1 changed files with 3 additions and 1 deletions

View File

@ -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}) => {