diff --git a/packages/odyssey-storybook/src/components/odyssey-mui/Checkbox/Checkbox.stories.tsx b/packages/odyssey-storybook/src/components/odyssey-mui/Checkbox/Checkbox.stories.tsx index 20fc536a2f..655d62fc29 100644 --- a/packages/odyssey-storybook/src/components/odyssey-mui/Checkbox/Checkbox.stories.tsx +++ b/packages/odyssey-storybook/src/components/odyssey-mui/Checkbox/Checkbox.stories.tsx @@ -155,7 +155,7 @@ export default storybookMeta; const checkTheBox = ({ canvasElement, step }: PlaywrightProps) => async (actionName: string) => { - await step("check the box", async () => { + await step("check the box", async ({ args }) => { const canvas = within(canvasElement); const checkBox = canvas.getByRole("checkbox") as HTMLInputElement; if (checkBox) { @@ -163,6 +163,8 @@ const checkTheBox = } userEvent.tab(); expect(checkBox).toBeChecked(); + userEvent.click(canvasElement); + expect(args.onBlur).toHaveBeenCalled(); axeRun(actionName); }); }; diff --git a/packages/odyssey-storybook/src/components/odyssey-mui/Radio/Radio.stories.tsx b/packages/odyssey-storybook/src/components/odyssey-mui/Radio/Radio.stories.tsx index 65935ba119..f8b5bb0e49 100644 --- a/packages/odyssey-storybook/src/components/odyssey-mui/Radio/Radio.stories.tsx +++ b/packages/odyssey-storybook/src/components/odyssey-mui/Radio/Radio.stories.tsx @@ -100,13 +100,15 @@ export default storybookMeta; export const Default: StoryObj = { play: async ({ canvasElement, step }) => { - await step("select the radio button", async () => { + await step("select the radio button", async ({ args }) => { const canvas = within(canvasElement); const radio = canvas.getByRole("radio") as HTMLInputElement; if (radio) { userEvent.click(radio); } expect(radio).toBeChecked(); + userEvent.click(canvasElement); + expect(args.onBlur).toHaveBeenCalled(); axeRun("Radio Default"); }); },