multiple: fix selectable card onChange

The `onChange` event for the selectable cards needed to be placed
inside the `selectableActions` of the `CardHeader`. Since the
`onChange` action was not implemented we were getting warnings
in the test output for that a component was changing an uncontrolled
input to controlled.
This commit is contained in:
Gianluca Zuccarelli 2025-06-18 16:13:30 +01:00 committed by Klara Simickova
parent bac647ded6
commit c2998306cf
3 changed files with 15 additions and 3 deletions

View file

@ -177,16 +177,20 @@ describe('Step Image output', () => {
const awsTile = await screen.findByTestId('upload-aws');
user.click(awsTile); // select
await waitFor(() => expect(nextButton).toBeEnabled());
user.click(awsTile); // deselect
await waitFor(() => expect(nextButton).toBeDisabled());
const googleTile = await screen.findByTestId('upload-google');
user.click(googleTile); // select
await waitFor(() => expect(nextButton).toBeEnabled());
user.click(googleTile); // deselect
await waitFor(() => expect(nextButton).toBeDisabled());
const azureTile = await screen.findByTestId('upload-azure');
user.click(azureTile); // select
await waitFor(() => expect(nextButton).toBeEnabled());
user.click(azureTile); // deselect
await waitFor(() => expect(nextButton).toBeDisabled());
});