You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2022/09/09 11:33:26 UTC

[superset] branch master updated: test: Fix act errors in SamplesPane test (#21406)

This is an automated email from the ASF dual-hosted git repository.

michaelsmolina pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new bd1abd3b6e test: Fix act errors in SamplesPane test (#21406)
bd1abd3b6e is described below

commit bd1abd3b6e3d3a6a8892905f7faab8d79fd1bdb0
Author: Lyndsi Kay Williams <55...@users.noreply.github.com>
AuthorDate: Fri Sep 9 06:33:14 2022 -0500

    test: Fix act errors in SamplesPane test (#21406)
---
 .../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();