test(e2e): stabilize login/feed tests and isolate relays (agent)

- Updated `tests/e2e/helpers/bitvidTestFixture.ts` to inject `__bitvidTestRelays__` into `localStorage` and `window` for reliable isolation.
- Updated `js/relayManager.js` to respect test relays in both `loadFromStorage` and defaults construction, preventing production fallback on profile load.
- Updated `tests/e2e/login-flows.spec.ts` to click the "nsec" provider button before assertions.
- Updated `tests/e2e/feed-pagination-stress.spec.ts` to correctly query title attributes.
- Added `scripts/check-hex.js` fix for log files.
- Added onboarding audit log.

Co-authored-by: PR0M3TH3AN <[email protected]>
This commit is contained in:
google-labs-jules[bot]andPR0M3TH3AN committed 2026-02-22 15:31:09 +00:00
1 parent 7944c3f040
commit e9ca94e89d
4 files changed
+62 -8

No files matched your search

+8 -2
View File
@@ -115,10 +115,16 @@ async function gotoWithTestMode(page: Page, relayUrl: string, path = "/") {
const testUrl = `${path}${separator}__test__=1&__testRelays__=${encodeURIComponent(relayUrl)}`;
// Set up localStorage before navigation
await page.addInitScript(() => {
await page.addInitScript((url) => {
localStorage.setItem("hasSeenDisclaimer", "true");
localStorage.setItem("__bitvidTestMode__", "1");
});
// Ensure network isolation by injecting test relays directly into storage
localStorage.setItem("__bitvidTestRelays__", JSON.stringify([url]));
// Also set on window for robustness against storage clearing
(window as any).__bitvidTestRelays__ = [url];
// Disable whitelist mode so seeded test users work correctly
localStorage.setItem("bitvid_admin_whitelist_mode", "false");
}, relayUrl);
await page.goto(testUrl);