Skip to content

Commit e42d85c

Browse files
authored
test(query-devtools/Devtools): remove PiP auto-open and popup-blocker cases now covered by 'PiPContext.test.tsx' (TanStack#10805)
1 parent 9a1aa92 commit e42d85c

1 file changed

Lines changed: 0 additions & 37 deletions

File tree

packages/query-devtools/src/__tests__/Devtools.test.tsx

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -465,43 +465,6 @@ describe('Devtools', () => {
465465
)
466466
})
467467

468-
it('should automatically open a PiP window when "pip_open" is "true" in "localStorage"', () => {
469-
const { open } = stubPipWindow()
470-
471-
renderDevtools(
472-
{ initialIsOpen: true },
473-
{ 'TanstackQueryDevtools.pip_open': 'true' },
474-
)
475-
476-
expect(open).toHaveBeenCalled()
477-
})
478-
479-
it('should log and reset "pip_open" when the browser blocks the popup', () => {
480-
vi.stubGlobal(
481-
'open',
482-
vi.fn(() => null),
483-
)
484-
const consoleError = vi
485-
.spyOn(console, 'error')
486-
.mockImplementation(() => {})
487-
488-
try {
489-
renderDevtools(
490-
{ initialIsOpen: true },
491-
{ 'TanstackQueryDevtools.pip_open': 'true' },
492-
)
493-
494-
expect(consoleError).toHaveBeenCalledWith(
495-
expect.stringContaining('Failed to open popup'),
496-
)
497-
expect(localStorage.getItem('TanstackQueryDevtools.pip_open')).toBe(
498-
'false',
499-
)
500-
} finally {
501-
consoleError.mockRestore()
502-
}
503-
})
504-
505468
it('should hide the in-page panel while a PiP window is open', () => {
506469
stubPipWindow()
507470
const rendered = renderDevtools({ initialIsOpen: true })

0 commit comments

Comments
 (0)