Skip to content

Commit 5f74d60

Browse files
committed
add stories
1 parent 51228b9 commit 5f74d60

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

templates/delete-wizard/src/DeleteWizard.stories.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import React from 'react';
33
import { faker } from '@faker-js/faker';
44
import { StoryObj } from '@storybook/react';
5+
import { userEvent, within } from '@storybook/test';
56

67
import { css } from '@leafygreen-ui/emotion';
78
import BeakerIcon from '@leafygreen-ui/icon/Beaker';
@@ -33,6 +34,9 @@ export const LiveExample: StoryObj<typeof DeleteWizard> = {
3334
controls: {
3435
exclude: ['children', 'onStepChange'],
3536
},
37+
chromatic: {
38+
disableSnapshot: true,
39+
},
3640
},
3741
args: {
3842
activeStep: undefined,
@@ -111,3 +115,30 @@ export const LiveExample: StoryObj<typeof DeleteWizard> = {
111115
);
112116
},
113117
};
118+
119+
export const Step1: StoryObj<typeof DeleteWizard> = {
120+
args: {
121+
activeStep: 0,
122+
},
123+
render: LiveExample.render,
124+
};
125+
126+
export const Step2Default: StoryObj<typeof DeleteWizard> = {
127+
args: {
128+
activeStep: 1,
129+
},
130+
render: LiveExample.render,
131+
};
132+
133+
export const Step2Acknowledged: StoryObj<typeof DeleteWizard> = {
134+
args: {
135+
activeStep: 1,
136+
},
137+
play: ({ canvasElement }) => {
138+
const checkbox = within(canvasElement).getByTestId(
139+
'acknowledgement-checkbox',
140+
);
141+
userEvent.click(checkbox);
142+
},
143+
render: LiveExample.render,
144+
};

0 commit comments

Comments
 (0)