kgabryje commented on code in PR #22364:
URL: https://github.com/apache/superset/pull/22364#discussion_r1043630758


##########
superset-frontend/src/dashboard/components/nativeFilters/FilterCard/FilterCard.test.tsx:
##########
@@ -217,90 +225,116 @@ const getTextInHTMLTags =
     return nodeHasText && childrenDontHaveText;
   };
 
+const hidePopover = jest.fn();
+
 const renderContent = (filter = baseFilter, initialState = baseInitialState) =>
-  render(<FilterCardContent filter={filter} />, {
+  render(<FilterCardContent filter={filter} hidePopover={hidePopover} />, {
     useRedux: true,
     initialState,
   });
 
-describe('Filter Card', () => {
-  it('Basic', () => {
-    renderContent();
-    expect(screen.getByText('Native filter 1')).toBeVisible();
-    expect(screen.getByLabelText('filter-small')).toBeVisible();
+test('filter card title, type, scope, dependencies', () => {
+  renderContent();
+  expect(screen.getByText('Native filter 1')).toBeVisible();
+  expect(screen.getByLabelText('filter-small')).toBeVisible();
 
-    expect(screen.getByText('Filter type')).toBeVisible();
-    expect(screen.getByText('Select filter')).toBeVisible();
+  expect(screen.getByText('Filter type')).toBeVisible();
+  expect(screen.getByText('Select filter')).toBeVisible();
 
-    expect(screen.getByText('Scope')).toBeVisible();
-    expect(screen.getByText('All charts')).toBeVisible();
+  expect(screen.getByText('Scope')).toBeVisible();
+  expect(screen.getByText('All charts')).toBeVisible();
 
-    expect(screen.queryByText('Dependencies')).not.toBeInTheDocument();
-  });
+  expect(screen.queryByText('Dependencies')).not.toBeInTheDocument();
+  screen.logTestingPlaygroundURL();

Review Comment:
   do we need that?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to