File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed
templates/delete-wizard/src Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 22import React from 'react' ;
33import { faker } from '@faker-js/faker' ;
44import { StoryObj } from '@storybook/react' ;
5+ import { userEvent , within } from '@storybook/test' ;
56
67import { css } from '@leafygreen-ui/emotion' ;
78import 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+ } ;
You can’t perform that action at this time.
0 commit comments