File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
src/components/fields/TextInputMapper Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change 11import { StoryFn } from '@storybook/react' ;
2+ import { userEvent , within } from '@storybook/test' ;
23
34import { baseProps } from '../../../stories/lists/baseProps' ;
45import { Submit } from '../../actions' ;
@@ -49,5 +50,15 @@ Default.args = {};
4950export const WithValue = Template . bind ( { } ) ;
5051WithValue . args = { value : { name : 'value' } } ;
5152
53+ export const WithValueAndNewMapping = Template . bind ( { } ) ;
54+ WithValueAndNewMapping . args = { value : { name : 'value' } } ;
55+
56+ WithValueAndNewMapping . play = async ( { canvasElement } ) => {
57+ const canvas = within ( canvasElement ) ;
58+ const button = await canvas . getByText ( 'Mapping' ) ;
59+
60+ await userEvent . click ( button ) ;
61+ } ;
62+
5263export const WithinForm = FormTemplate . bind ( { } ) ;
5364WithinForm . args = { } ;
Original file line number Diff line number Diff line change @@ -242,6 +242,7 @@ function TextInputMapperInput(props: CubeTextInputMapperInputProps) {
242242
243243 return (
244244 < TextInput
245+ qa = "AddMapping"
245246 width = "auto"
246247 { ...rest }
247248 id = { undefined }
You can’t perform that action at this time.
0 commit comments