Skip to content

fix(site): gracefully handle reselection of the same preset #17014

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Mar 20, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add a story to ensure that reselection of the same preset doesn't break
  • Loading branch information
SasSwart committed Mar 20, 2025
commit f60d618243a9f732fc0eaf0713b42e707265e944
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,21 @@ export const PresetSelected: Story = {
},
};

export const PresetReselected: Story = {
args: PresetsButNoneSelected.args,
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);

// First selection of Preset 1
await userEvent.click(canvas.getByLabelText("Preset"));
await userEvent.click(canvas.getByText("Preset 1"));

// Reselect the same preset
await userEvent.click(canvas.getByLabelText("Preset"));
await userEvent.click(canvas.getByText("Preset 1"));
},
};

export const ExternalAuth: Story = {
args: {
externalAuth: [
Expand Down
Loading