[core] Add Storybook stories for MulitstepDialog#8039
[core] Add Storybook stories for MulitstepDialog#8039cameronjoyner wants to merge 16 commits intodevelopfrom
Conversation
Generate changelog in
|
Revert "removed multistep dialog"Build artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
lint fixBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
set isOpen={true} && set title to title:Core/Overlays/MultistepDialogBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
mm-wang
left a comment
There was a problem hiding this comment.
One suggestion here for the ineraction, otherwise LGTM
| export const OpenDialog: Story = { | ||
| render: renderMultistepDialog(), | ||
| play: async ({ canvas, userEvent, step }) => { | ||
| await step("Dialog is not visible initially", async () => { |
There was a problem hiding this comment.
suggestion: This is no longer true if you are setting isOpen to true on open. You will want to set the arg for isOpen to false for this test.
There was a problem hiding this comment.
What I ended up doing here is keeping this test, but ensuring a precursor step of exiting the default-open dialog. I did that because they all default to open.
export const OpenDialog: Story = {
render: renderMultistepDialog(),
play: async ({ canvas, userEvent, step }) => {
// dialog is open on all example on render
await step("Escape key closes dialog", async () => {
await userEvent.keyboard("{Escape}");
await waitFor(() => expect(screen.queryByText("This is the content for step 1.")).toBeNull());
});
await step("Click open button shows dialog at step 1", async () => {
await userEvent.click(canvas.getByText("Open Multistep Dialog"));
await waitFor(() => expect(screen.getByText("This is the content for step 1.")).toBeVisible());
const selectStep = screen.getByText("Select items").closest(".bp6-dialog-step-container");
await expect(selectStep).toHaveClass("bp6-active");
});
},
};
wrong syntaxBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
adding not.toBeInTheDocument()Build artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
Merge branch 'develop' into stories/multistep-dialogBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
Merge branch 'develop' into stories/multistep-dialogBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
Summary
MultistepDialogcomponentFiles
MultistepDialog.stories.tsxTest plan
pnpm install && pnpm -w run storybook🤖 Generated with Claude Code