From 046bc33b8ac8e1ea70a09495eee1815374de9a81 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 1 Oct 2026 13:15:37 +0000 Subject: [PATCH] E2E: schedule the social post a week ahead, not on a fixed date social-publish-consumers.spec.ts:269 filled the schedule field with '2026-10-01T12:00'. From 12:00 UTC on 2026-10-01 that is a past time, which the studio rightly refuses, so the test fails on every branch, main included (01b2c380 passed at 10:35 UTC; the same commit fails after 12:00, 1 failed / 11 passed locally, pinned Chromium 149). The time is now computed in the page as a week ahead, in the browser's own local time, which is what a datetime-local field takes. No assertion changed. Pinned Chromium, retries 0: 36/36 (x3). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01TRY21ZKsFrfB3qtoP972A4 --- tests/e2e/social-publish-consumers.spec.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/e2e/social-publish-consumers.spec.ts b/tests/e2e/social-publish-consumers.spec.ts index 4be412212..dbdabc205 100644 --- a/tests/e2e/social-publish-consumers.spec.ts +++ b/tests/e2e/social-publish-consumers.spec.ts @@ -268,7 +268,14 @@ test('a lost action response does not offer a duplicate create after the provide test('a saved schedule links to its existing record and does not schedule or publish a second copy', async ({ page }) => { const { state } = await fixture(page); await compose(page); - await page.locator('input[type="datetime-local"]').fill('2026-10-01T12:00'); + // A week ahead, in the browser's own local time: a fixed date becomes a + // past schedule the day it arrives, and a past time is not schedulable. + const nextWeek = await page.evaluate(() => { + const d = new Date(Date.now() + 7 * 24 * 60 * 60 * 1000); + const two = (n: number) => String(n).padStart(2, '0'); + return `${d.getFullYear()}-${two(d.getMonth() + 1)}-${two(d.getDate())}T${two(d.getHours())}:${two(d.getMinutes())}`; + }); + await page.locator('input[type="datetime-local"]').fill(nextWeek); await page.getByRole('button', { name: messages['studio.schedule'], exact: true }).click(); await resultCount(page, 1); expect(state.rows.social_posts).toHaveLength(1); expect(state.rows.social_schedules).toHaveLength(1); expect(state.rows.social_calendar_items).toHaveLength(1); expect(state.providerCalls).toBe(0);