This is an automated email from the ASF dual-hosted git repository. lyndsi pushed a commit to branch lyndsi/SamplesPane-act-cleanup in repository https://gitbox.apache.org/repos/asf/superset.git
commit be108c0175810cba58a9208182d96bf5dc862154 Author: lyndsiWilliams <[email protected]> AuthorDate: Fri Sep 9 01:33:23 2022 -0500 8 act errors removed from SamplesPane test --- .../components/DataTablesPane/test/SamplesPane.test.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/superset-frontend/src/explore/components/DataTablesPane/test/SamplesPane.test.tsx b/superset-frontend/src/explore/components/DataTablesPane/test/SamplesPane.test.tsx index 391540f4d8..eed6e84808 100644 --- a/superset-frontend/src/explore/components/DataTablesPane/test/SamplesPane.test.tsx +++ b/superset-frontend/src/explore/components/DataTablesPane/test/SamplesPane.test.tsx @@ -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'; @@ -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 () => { @@ -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();
