chore: revert jsdom update (#31353)

This commit is contained in:
Stephen Zhou
2026-01-21 18:30:04 +08:00
committed by yyh
parent ef97352f71
commit 03f53f2282
3 changed files with 44 additions and 44 deletions

View File

@ -2089,7 +2089,7 @@ describe('Integration: Hit Testing Flow', () => {
isLoading: false,
} as unknown as ReturnType<typeof useDatasetTestingRecords>)
const { container } = renderWithProviders(<HitTestingPage datasetId="dataset-1" />)
renderWithProviders(<HitTestingPage datasetId="dataset-1" />)
// Type query
const textarea = screen.getByRole('textbox')
@ -2101,8 +2101,11 @@ describe('Integration: Hit Testing Flow', () => {
if (submitButton)
fireEvent.click(submitButton)
// Verify the component is still rendered after submission
expect(container.firstChild).toBeInTheDocument()
// Wait for the component to update
await waitFor(() => {
// Verify the component is still rendered
expect(screen.getByRole('textbox')).toBeInTheDocument()
})
})
it('should render ResultItem components for non-external results', async () => {
@ -2127,7 +2130,7 @@ describe('Integration: Hit Testing Flow', () => {
isLoading: false,
} as unknown as ReturnType<typeof useDatasetTestingRecords>)
const { container } = renderWithProviders(<HitTestingPage datasetId="dataset-1" />)
renderWithProviders(<HitTestingPage datasetId="dataset-1" />)
// Submit a query
const textarea = screen.getByRole('textbox')
@ -2138,8 +2141,10 @@ describe('Integration: Hit Testing Flow', () => {
if (submitButton)
fireEvent.click(submitButton)
// Verify component is rendered after submission
expect(container.firstChild).toBeInTheDocument()
await waitFor(() => {
// Verify component is rendered
expect(screen.getByRole('textbox')).toBeInTheDocument()
})
})
it('should render external results when dataset is external', async () => {