rusackas commented on a change in pull request #18822:
URL: https://github.com/apache/superset/pull/18822#discussion_r819049257
##########
File path: superset-frontend/src/components/TableView/TableView.test.tsx
##########
@@ -191,3 +191,12 @@ test('should render the right page', () => {
expect(screen.getByText('Kate')).toBeInTheDocument();
expect(screen.queryByText('Emily')).not.toBeInTheDocument();
});
+
+test('should render the right wrap content text by columnsForWrapText', () => {
+ const props = {
+ ...mockedProps,
+ columnsForWrapText: ['Name'],
+ };
+ render(<TableView {...props} />);
+ expect(screen.getByTestId('table-row-cell__wrap')).toBeInTheDocument();
Review comment:
This assertion could be a bit enhanced a bit (and the data-test
attribute removed) if you did something like:
```js
expect(within(screen.getByTestId('table-row-table-row')).getAllByRole('cell')[3])toHaveClass('table-cell__wrap');
expect(within(screen.getByTestId('table-row-table-row')).getAllByRole('cell')[2])toHaveClass('table-cell__nowrap');
```
--
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]