Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(notifications): add diagnostic logging to feed opening

Steven Enamakel1b5581b6b11c
diff --git a/app/test/playwright/specs/notifications-feed-interaction.spec.ts b/app/test/playwright/specs/notifications-feed-interaction.spec.ts
index caa940022c..0094941c62 100644
--- a/app/test/playwright/specs/notifications-feed-interaction.spec.ts
+++ b/app/test/playwright/specs/notifications-feed-interaction.spec.ts
@@ -165,6 +165,25 @@ async function openFeedWith(page: Page, items: SeedItem[]): Promise<void> {
// Notifications now opens on its Welcome view. Enter the real feed through
// its user-facing action before asserting the persisted system-event rows.
await page.getByTestId('notifications-welcome-cta-view').click();
+ console.log(
+ '[notifications seed diagnostic]',
+ JSON.stringify(
+ await page.evaluate(user => {
+ const state = (
+ window as unknown as {
+ __OPENHUMAN_STORE__?: { getState?: () => { notifications?: { items?: unknown[] } } };
+ }
+ ).__OPENHUMAN_STORE__?.getState?.();
+ return {
+ hash: window.location.hash,
+ activeUser: localStorage.getItem('OPENHUMAN_ACTIVE_USER_ID'),
+ expectedUser: user,
+ scoped: localStorage.getItem(`${user}:persist:notifications`),
+ notifications: state?.notifications?.items,
+ };
+ }, user)
+ )
+ );
await expect(page.getByTestId('system-events-section')).toBeVisible({ timeout: 20_000 });
}