Fix Stuffbox popup completion and preflight storage before file selection

Hop-State: A_06FP87Y83XVM00YY2RB0X2G
Hop-Proposal: R_06FP87XN1TX5B0CW1ZFDEK8
Hop-Task: T_06FP86NZGXSMEX63FZDAS70
Hop-Attempt: AT_06FP86NZGYZEGPH937G3WK8
This commit is contained in:
2026-07-14 21:53:52 -07:00
committed by Hop
parent 270d5437f0
commit 67b96d6725
9 changed files with 224 additions and 70 deletions
+13
View File
@@ -0,0 +1,13 @@
import { describe, expect, it } from 'vitest';
import { renderStuffboxPopupResponse } from './popup-response';
describe('renderStuffboxPopupResponse', () => {
it('notifies the main tab without navigating the popup into Synapsis', () => {
const html = renderStuffboxPopupResponse('https://synapsis.example', true, 'Stuffbox connected.');
expect(html).toContain("new BroadcastChannel('synapsis:stuffbox')");
expect(html).toContain("localStorage.setItem('synapsis:stuffbox:result'");
expect(html).toContain('window.close()');
expect(html).not.toContain('window.location.replace');
});
});