mirror of https://github.com/apache/superset.git
test: Fix act errors in ResultsPaneOnDashboard test (#21404)
This commit is contained in:
parent
fdae29b0f0
commit
295de2d098
|
@ -22,9 +22,10 @@ import userEvent from '@testing-library/user-event';
|
|||
import {
|
||||
render,
|
||||
waitForElementToBeRemoved,
|
||||
waitFor,
|
||||
} from 'spec/helpers/testing-library';
|
||||
import { exploreActions } from 'src/explore/actions/exploreActions';
|
||||
import { ChartMetadata, ChartPlugin, promiseTimeout } from '@superset-ui/core';
|
||||
import { ChartMetadata, ChartPlugin } from '@superset-ui/core';
|
||||
import { ResultsPaneOnDashboard } from '../components';
|
||||
import { createResultsPaneOnDashboardProps } from './fixture';
|
||||
|
||||
|
@ -133,9 +134,9 @@ describe('ResultsPaneOnDashboard', () => {
|
|||
},
|
||||
);
|
||||
|
||||
await promiseTimeout(() => {
|
||||
await waitFor(() => {
|
||||
expect(setForceQuery).toHaveBeenCalledTimes(1);
|
||||
}, 10);
|
||||
});
|
||||
expect(queryByText('2 rows')).toBeVisible();
|
||||
expect(queryByText('Action')).toBeVisible();
|
||||
expect(queryByText('Horror')).toBeVisible();
|
||||
|
|
Loading…
Reference in New Issue