From 9a49107afe8cf7104ea7da1638e680518fa55bb8 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 7 Oct 2026 08:10:17 -0700 Subject: Profile tests: reach the feed and chats through the bottom nav, start on Following, follow today's onboarding - avatar-profile, profile-open: a new wallet opens the feed on Popular, so seed this wallet's last feed as Following; profile-open opens Feed from the nav - profile-feed: a mainnet import offers a username first (Not now), Messages is a bottom-nav button - profile-draft, profile-recovery: the import button reads 'Have an existing seed or entropy to import?'; profile batches stream through queryStreamOn, so the recovery test answers that too Co-Authored-By: Claude Opus 5.5 --- tools/profile-recovery-test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'tools/profile-recovery-test.js') diff --git a/tools/profile-recovery-test.js b/tools/profile-recovery-test.js index b2c871a..2f6ae90 100644 --- a/tools/profile-recovery-test.js +++ b/tools/profile-recovery-test.js @@ -46,7 +46,9 @@ const bundle = await Bun.build({ entrypoints: ['profile-test-entry'], target: 'b build.onLoad({ filter: /src\/features\/messages\.js$/ }, async ({ path }) => ({ contents: (await Bun.file(path).text()) .replace("id: 'messages',", "id: 'messages', testFetch: fetchFullProfile, testView: profileScreen, testApply: applyProfile, testLight: (pk) => profiles.get(pk), testFull: (pk) => fullProfiles.get(pk),"), loader: 'js' })); build.onLoad({ filter: /src\/nostr\.js$/ }, async ({ path }) => ({ contents: (await Bun.file(path).text()) - .replace('export async function queryOn(relays, filter, maxWait = 1500) {', 'export async function queryOn(relays, filter, maxWait = 1500) { if (globalThis.__profileQuery) return globalThis.__profileQuery(relays, filter);'), loader: 'js' })); + .replace('export async function queryOn(relays, filter, maxWait = 1500) {', 'export async function queryOn(relays, filter, maxWait = 1500) { if (globalThis.__profileQuery) return globalThis.__profileQuery(relays, filter);') + // profile batches stream each answer as it lands (our relays and the indexes at once) + .replace('export async function queryStreamOn(relays, filter, onEvent, maxWait = 1500) {', 'export async function queryStreamOn(relays, filter, onEvent, maxWait = 1500) { if (globalThis.__profileQuery) { const evs = await globalThis.__profileQuery(relays, filter); for (const ev of evs || []) onEvent(ev); return; }'), loader: 'js' })); } }] }); assert(bundle.success, bundle.logs.join('\n')); const css = await Bun.file('src/style.css').text(); -- cgit v1.2.3