diff --git a/artifacts/api-server/src/routes/executive-meetings.ts b/artifacts/api-server/src/routes/executive-meetings.ts index dda64cff..936e8a3d 100644 --- a/artifacts/api-server/src/routes/executive-meetings.ts +++ b/artifacts/api-server/src/routes/executive-meetings.ts @@ -1000,7 +1000,10 @@ router.post( } if ( startMin + body.minutes >= 24 * 60 || - endMin + body.minutes > 24 * 60 + // Treat 24:00 (1440) the same as 00:00 the next day — both wrap + // the day boundary, so the end-time guard is `>=`, matching the + // start-time guard. + endMin + body.minutes >= 24 * 60 ) { return { ok: false, diff --git a/artifacts/tx-os/tests/executive-meetings-upcoming-alert.spec.mjs b/artifacts/tx-os/tests/executive-meetings-upcoming-alert.spec.mjs index 9f82cd21..0fec6142 100644 --- a/artifacts/tx-os/tests/executive-meetings-upcoming-alert.spec.mjs +++ b/artifacts/tx-os/tests/executive-meetings-upcoming-alert.spec.mjs @@ -456,11 +456,17 @@ test("Upcoming-meeting alert: Cancel removes the meeting from today's schedule v .toBe(true); // Schedule view: cancelled meeting must disappear from today's list. + // Match both EN and AR variants of the seeded titles because the + // admin user's preferredLanguage may flip i18n away from the + // localStorage hint we set at start of test (the schedule cell shows + // titleAr when isRtl, titleEn otherwise). await page.goto("/executive-meetings"); - await expect(page.getByText(`${TEST_TAG} renum-B EN`)).toBeVisible({ - timeout: 10_000, - }); - await expect(page.getByText(`${TEST_TAG} renum-A EN`)).toBeHidden(); + await expect( + page.getByText(new RegExp(`${TEST_TAG} renum-B (EN|AR)`)), + ).toBeVisible({ timeout: 10_000 }); + await expect( + page.getByText(new RegExp(`${TEST_TAG} renum-A (EN|AR)`)), + ).toBeHidden(); }); test("Upcoming-meeting alert: Arabic locale renders the RTL alert with Arabic title", async ({