castodius commented on code in PR #32958:
URL: https://github.com/apache/superset/pull/32958#discussion_r2028598999
##########
superset-frontend/src/dashboard/components/gridComponents/Chart.test.jsx:
##########
@@ -122,17 +122,80 @@ test('should render a ChartContainer', () => {
expect(getByTestId('chart-container')).toBeInTheDocument();
});
-test('should render a description if it has one and isExpanded=true', () => {
- const { container } = setup(
- {},
- {
- dashboardState: {
- ...defaultState.dashboardState,
- expandedSlices: { [props.id]: true },
- },
- },
- );
- expect(container.querySelector('.slice_description')).toBeInTheDocument();
+describe('no description set', () => {
Review Comment:
I wanted to cover all 18 (three cases for expand slice, three for expand all
and two for description existing - multiplied) test cases but did not want to
create 18 tests cases. Therefore I went with code that creates tests. I will of
course happily switch to individual test cases if required!
--
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]