Skip to content

Commit

Permalink
test: Fix act errors in ResultsPaneOnDashboard test (#21404)
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams authored Sep 9, 2022
1 parent fdae29b commit 295de2d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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();
Expand Down

0 comments on commit 295de2d

Please sign in to comment.