mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
test(dashboard): eliminate race condition in FiltersConfigModal test (#35717)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -337,19 +337,21 @@ test.skip('validates the default value', async () => {
|
||||
|
||||
test('validates the pre-filter value', async () => {
|
||||
jest.useFakeTimers();
|
||||
try {
|
||||
defaultRender();
|
||||
|
||||
defaultRender();
|
||||
await userEvent.click(screen.getByText(FILTER_SETTINGS_REGEX));
|
||||
await userEvent.click(getCheckbox(PRE_FILTER_REGEX));
|
||||
|
||||
userEvent.click(screen.getByText(FILTER_SETTINGS_REGEX));
|
||||
userEvent.click(getCheckbox(PRE_FILTER_REGEX));
|
||||
jest.runAllTimers();
|
||||
} finally {
|
||||
jest.useRealTimers();
|
||||
}
|
||||
|
||||
jest.runOnlyPendingTimers();
|
||||
jest.useRealTimers();
|
||||
|
||||
expect(
|
||||
await screen.findByText(PRE_FILTER_REQUIRED_REGEX),
|
||||
).toBeInTheDocument();
|
||||
}, 50000); // Slow-running test, increase timeout to 50 seconds.
|
||||
await waitFor(() => {
|
||||
expect(screen.getByText(PRE_FILTER_REQUIRED_REGEX)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
// eslint-disable-next-line jest/no-disabled-tests
|
||||
test.skip("doesn't render time range pre-filter if there are no temporal columns in datasource", async () => {
|
||||
|
||||
Reference in New Issue
Block a user