Skip to content

Commit 0b230ab

Browse files
committed
test(solid-query-devtools/devtoolsPanel): add a case for preserving the default container height when 'style' omits 'height'
1 parent fe4c335 commit 0b230ab

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

packages/solid-query-devtools/src/__tests__/devtoolsPanel.test.tsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,23 @@ describe('SolidQueryDevtoolsPanel', () => {
121121
expect(setClient).toHaveBeenCalledWith(queryClient)
122122
})
123123

124+
it('should preserve the default container height when "style" omits "height"', () => {
125+
const queryClient = new QueryClient()
126+
127+
const { container } = render(() => (
128+
<SolidQueryDevtoolsPanel
129+
client={queryClient}
130+
style={{ width: '300px' }}
131+
/>
132+
))
133+
const panel = container.querySelector(
134+
'.tsqd-parent-container',
135+
) as HTMLElement
136+
137+
expect(panel.style.height).toBe('500px')
138+
expect(panel.style.width).toBe('300px')
139+
})
140+
124141
it('should let "style" override the default container height on the rendered element', () => {
125142
const queryClient = new QueryClient()
126143

0 commit comments

Comments
 (0)