From b25ddf832997d084a5a4acbda5d96f11d2007e6e Mon Sep 17 00:00:00 2001 From: Quick <31828688+Quick104@users.noreply.github.com> Date: Tue, 11 Aug 2026 12:16:19 -0400 Subject: [PATCH] fix(web): defuse date time bomb in push-relay admin settings test (#589) The fixture hardcoded push_relay_expires_at as 2026-08-10, so once the calendar reached that date the component rendered the "Expired" branch and the "renews automatically" assertion failed on every branch's CI. Use a relative +30d expiration so the not-yet-expired branch stays stable. Co-authored-by: Claude Fable 5 --- .../pages/admin-settings/NotificationsAdminSettings.test.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web/src/pages/admin-settings/NotificationsAdminSettings.test.tsx b/web/src/pages/admin-settings/NotificationsAdminSettings.test.tsx index e3c9ac8c..4e661c86 100644 --- a/web/src/pages/admin-settings/NotificationsAdminSettings.test.tsx +++ b/web/src/pages/admin-settings/NotificationsAdminSettings.test.tsx @@ -36,7 +36,10 @@ function makeForm() { case "notifications.push_relay_key_prefix": return "cap_v1_test"; case "notifications.push_relay_expires_at": - return "2026-08-10T00:00:00Z"; + // Relative so the "renews automatically" (not-yet-expired) branch + // stays stable — a hardcoded date turned into a time bomb once the + // calendar passed it. + return new Date(Date.now() + 30 * 24 * 60 * 60 * 1000).toISOString(); default: return ""; }