From a0cf46e7209f95bfe7ce9286bec22a347d036639 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8jberg?= Date: Sat, 18 Oct 2025 09:43:19 -0400 Subject: [PATCH 1/2] Fix notifications playwright test --- tests/e2e/TestHelpers/Api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/TestHelpers/Api.ts b/tests/e2e/TestHelpers/Api.ts index 95a34f7c..afd18149 100644 --- a/tests/e2e/TestHelpers/Api.ts +++ b/tests/e2e/TestHelpers/Api.ts @@ -611,7 +611,7 @@ async function getNotificationsHub( }; return get(page, { - url: `/users/${handle.replace("@", "")}/notifications/hub?status=read%2Cunread&limit=12`, + url: `/users/${handle.replace("@", "")}/notifications/hub?status=read%2Cunread&limit=24`, status: 200, data: data, }); From 550ebc40e8d2af8868d7d56c8fb9f8ef3fde908f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8jberg?= Date: Sat, 18 Oct 2025 10:02:17 -0400 Subject: [PATCH 2/2] Avoid archived in notifications tests --- tests/e2e/TestHelpers/Data.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/e2e/TestHelpers/Data.ts b/tests/e2e/TestHelpers/Data.ts index 83c32b2c..386dbdd7 100644 --- a/tests/e2e/TestHelpers/Data.ts +++ b/tests/e2e/TestHelpers/Data.ts @@ -675,6 +675,10 @@ function notificationStatus(): NotificationStatus { return faker.helpers.arrayElement(["unread", "read", "archived"]); } +function notificationStatusWithoutArchived(): NotificationStatus { + return faker.helpers.arrayElement(["unread", "read"]); +} + type Notification = { id: string; event: NotificationEvent; @@ -688,7 +692,7 @@ function notification(notif?: { return { event: notificationEvent(notif?.kind), id: faker.string.uuid(), - status: notif?.status || notificationStatus(), + status: notif?.status || notificationStatusWithoutArchived(), }; }