FrancescoCastaldi commented on code in PR #44945:
URL: https://github.com/apache/superset/pull/44945#discussion_r4401600614


##########
superset-frontend/packages/superset-ui-chart-controls/test/shared-controls/components/RadioButtonControl.test.tsx:
##########
@@ -107,10 +117,10 @@ test('handles multiple clicks correctly', () => {
   fireEvent.click(screen.getByText('Option 3'));
   fireEvent.click(screen.getByText('Option 1'));
 
-  expect(onChange).toHaveBeenCalledWith('option2');
-  expect(onChange).toHaveBeenCalledWith('option3');
-  expect(onChange).toHaveBeenCalledWith('option1');
-  expect(onChange.mock.calls.length).toBeGreaterThanOrEqual(3);
+  expect(onChange).toHaveBeenCalledTimes(3);

Review Comment:
   Updated in 5f95b1bee8: introduced setupStateful wrapping RadioButtonControl 
with local state management across value changes. This ensures that 'handles 
multiple clicks correctly' properly exercises transitions across all three 
clicks (including returning to Option 1), and that the null and single-option 
normalization tests start with distinct initial values to trigger real 
selection transitions.



-- 
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