diff --git a/.changeset/proud-emus-speak.md b/.changeset/proud-emus-speak.md new file mode 100644 index 000000000..2efff232e --- /dev/null +++ b/.changeset/proud-emus-speak.md @@ -0,0 +1,5 @@ +--- +'@cube-dev/ui-kit': patch +--- + +Pass `qa` prop for fields. diff --git a/src/components/forms/Checkbox/Checkbox.tsx b/src/components/forms/Checkbox/Checkbox.tsx index 40525829e..f1f6b241d 100644 --- a/src/components/forms/Checkbox/Checkbox.tsx +++ b/src/components/forms/Checkbox/Checkbox.tsx @@ -228,13 +228,14 @@ function Checkbox( isHidden={isHidden} mods={mods} styles={{ position: 'relative' }} + qa="CheckboxWrapper" > - + {markIcon} {children && {children}} diff --git a/src/components/forms/FieldWrapper/FieldWrapper.tsx b/src/components/forms/FieldWrapper/FieldWrapper.tsx index 5998913c4..be678d6c9 100644 --- a/src/components/forms/FieldWrapper/FieldWrapper.tsx +++ b/src/components/forms/FieldWrapper/FieldWrapper.tsx @@ -77,6 +77,7 @@ export const FieldWrapper = forwardRef(function FieldWrapper( ) { const { as, + qa, labelPosition = 'top', label, extra, @@ -157,6 +158,7 @@ export const FieldWrapper = forwardRef(function FieldWrapper( <> ( props: T, ) { let { + qa, label, extra, labelPosition = 'top', @@ -40,8 +41,9 @@ export function wrapWithField( return ( /** An optional keyboard delegate implementation, to override the default. */ keyboardDelegate?: KeyboardDelegate; loadingState?: LoadingState; + wrapperProps?: Props; /** * The filter function used to determine if a option should be included in the combo box list. * Has no effect when `items` is provided. @@ -179,6 +181,7 @@ export const ComboBox = forwardRef(function ComboBox( filter, styles, labelSuffix, + wrapperProps, ...otherProps } = props; @@ -333,16 +336,17 @@ export const ComboBox = forwardRef(function ComboBox( let comboBoxField = ( inputProps?: Props; type?: 'secondary' | 'clear' | 'primary' | (string & {}); suffixPosition?: 'before' | 'after'; + wrapperProps?: Props; } export interface CubeSelectProps extends CubeSelectBaseProps { @@ -328,6 +329,7 @@ function Select( labelSuffix, ellipsis, suffixPosition = 'before', + wrapperProps, ...otherProps } = props; let state = useSelectState(props); @@ -414,12 +416,13 @@ function Select( let selectField = ( (