diff --git a/components/popout/__tests__/popout-host.test.tsx b/components/popout/__tests__/popout-host.test.tsx index a7629b043..4defd25c8 100644 --- a/components/popout/__tests__/popout-host.test.tsx +++ b/components/popout/__tests__/popout-host.test.tsx @@ -55,7 +55,7 @@ beforeEach(() => { FakeBroadcastChannel.reset(); vi.stubGlobal('BroadcastChannel', FakeBroadcastChannel); // The bridge makes pop-outs available without stubbing the display mode. - window.bulwarkDesktop = { windows: {} }; + window.bulwarkDesktop = { version: 1, platform: 'win32', windows: {} }; stubLocks(); sessionStorage.clear(); heard = []; diff --git a/lib/__tests__/desktop-window-sync.test.ts b/lib/__tests__/desktop-window-sync.test.ts index 260c8f788..7ff38a7fc 100644 --- a/lib/__tests__/desktop-window-sync.test.ts +++ b/lib/__tests__/desktop-window-sync.test.ts @@ -72,7 +72,7 @@ describe('state across windows', () => { }); it('also runs in the desktop app\'s main window', async () => { - window.bulwarkDesktop = { windows: {} }; + window.bulwarkDesktop = { version: 1, platform: 'win32', windows: {} }; stop = startWindowSync(); writeFromAnotherWindow('locale-storage', { locale: 'fr' }); await settle(); @@ -140,7 +140,7 @@ describe('the app-like behaviour', () => { }); it('marks the page before the first paint when the bridge is there', () => { - window.bulwarkDesktop = {}; + window.bulwarkDesktop = { version: 1, platform: 'win32' }; runBoot(); expect(document.documentElement.hasAttribute('data-desktop')).toBe(true); }); diff --git a/lib/__tests__/popout-windows.test.ts b/lib/__tests__/popout-windows.test.ts index 0832f163e..f3675c552 100644 --- a/lib/__tests__/popout-windows.test.ts +++ b/lib/__tests__/popout-windows.test.ts @@ -101,7 +101,7 @@ describe('popoutsAvailable', () => { it('asks the bridge too: display-mode is `browser` in Electron', async () => { stubDisplay({ standalone: false }); - window.bulwarkDesktop = { windows: {} }; + window.bulwarkDesktop = { version: 1, platform: 'win32', windows: {} }; expect(await available()).toBe(true); }); @@ -168,7 +168,7 @@ describe('opening windows', () => { it('leaves it to the bridge when the bridge opens windows, under the same name', async () => { const { openMessageWindow } = await import('@/lib/popout/open'); const bridgeOpen = vi.fn(); - window.bulwarkDesktop = { windows: { open: bridgeOpen } }; + window.bulwarkDesktop = { version: 1, platform: 'win32', windows: { open: bridgeOpen } }; const open = vi.spyOn(window, 'open'); expect(openMessageWindow({ emailId: 'bridged' })).toBe(true); expect(openMessageWindow({ emailId: 'bridged' })).toBe(true);