Skip to content

Commit

Permalink
8 act errors removed from SamplesPane test
Browse files Browse the repository at this point in the history
  • Loading branch information
lyndsiWilliams committed Sep 9, 2022
1 parent 71459a6 commit be108c0
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import userEvent from '@testing-library/user-event';
import {
render,
waitForElementToBeRemoved,
waitFor,
} from 'spec/helpers/testing-library';
import { exploreActions } from 'src/explore/actions/exploreActions';
import { promiseTimeout } from '@superset-ui/core';
import { SamplesPane } from '../components';
import { createSamplesPaneProps } from './fixture';

Expand Down Expand Up @@ -72,9 +72,9 @@ describe('SamplesPane', () => {
expect(
await findByText('No samples were returned for this dataset'),
).toBeVisible();
await promiseTimeout(() => {
await waitFor(() => {
expect(setForceQuery).toHaveBeenCalledTimes(0);
}, 10);
});
});

test('error response', async () => {
Expand All @@ -100,9 +100,9 @@ describe('SamplesPane', () => {
},
);

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 be108c0

Please sign in to comment.