|
7 | 7 | } from 'test/__mocks__/query'; |
8 | 8 | import { useSchemaTreeMock } from 'test/__mocks__/useSchemaTreeMock'; |
9 | 9 | import { act } from 'react'; |
10 | | -import { flushAntdPortals, render, screen, waitFor, within } from 'test/testUtils'; |
| 10 | +import { render, screen, waitFor, withAntdPortalCleanup, within } from 'test/testUtils'; |
11 | 11 | import SQLEditorSchemaTree from './SQLEditorSchemaTree'; |
12 | 12 | import { postFetch } from 'src/swr/jwt/useSchemaTree'; |
13 | 13 |
|
@@ -52,9 +52,8 @@ const setup = async () => { |
52 | 52 |
|
53 | 53 | describe('The SQLEditorSchemaTree component', () => { |
54 | 54 | beforeEach(() => { vi.useFakeTimers({ shouldAdvanceTime: true }); }); |
55 | | - afterEach(async () => { |
| 55 | + afterEach(() => { |
56 | 56 | vi.useRealTimers(); |
57 | | - await flushAntdPortals(); |
58 | 57 | }); |
59 | 58 |
|
60 | 59 | describe('the schemas', () => { |
@@ -138,6 +137,8 @@ describe('The SQLEditorSchemaTree component', () => { |
138 | 137 | }); |
139 | 138 |
|
140 | 139 | describe('the context menu', () => { |
| 140 | + withAntdPortalCleanup(); |
| 141 | + |
141 | 142 | describe('the Copy SELECT button', () => { |
142 | 143 | it('copies the SELECT statement', async () => { |
143 | 144 | const schema = schemaTableColumns.find( |
|
0 commit comments