You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/09/08 19:34:06 UTC
[GitHub] [superset] hughhhh commented on a diff in pull request #21189: feat: Create dataset header component
hughhhh commented on code in PR #21189:
URL: https://github.com/apache/superset/pull/21189#discussion_r966350627
##########
superset-frontend/src/views/CRUD/data/dataset/DatasetLayout/DatasetLayout.test.tsx:
##########
@@ -33,10 +33,21 @@ describe('DatasetLayout', () => {
expect(layoutWrapper).toHaveTextContent('');
});
- it('renders a Header when passed in', () => {
- render(<DatasetLayout header={Header()} />);
+ const mockSetDataset = jest.fn();
- expect(screen.getByText(/header/i)).toBeVisible();
+ const waitForRender = () =>
+ waitFor(() =>
+ render(<Header setDataset={mockSetDataset} datasetName="" />),
Review Comment:
nit: add a test to make sure if `datasetName` is set that value of the textbox renders
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org