File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11{
22 "name" : " @equinor/amplify-component-lib" ,
3- "version" : " 11.0.4 " ,
3+ "version" : " 11.0.5 " ,
44 "description" : " Frontend Typescript components for the Amplify team" ,
55 "main" : " dist/index.js" ,
66 "types" : " dist/index.d.ts" ,
Original file line number Diff line number Diff line change @@ -171,6 +171,7 @@ export const SearchBar = <T extends SelectOptionRequired>({
171171 autoComplete = "off"
172172 onChange = { handleOnSearchChange }
173173 onKeyDownCapture = { handleOnSearchKeyDown }
174+ aria-invalid = { variant === 'error' ? true : undefined }
174175 />
175176 { loading && (
176177 < SkeletonField
Original file line number Diff line number Diff line change @@ -286,6 +286,23 @@ export const TestDirtyVariant: Story = {
286286 } ,
287287} ;
288288
289+ export const TestErrorVariant : Story = {
290+ tags : [ 'test-only' ] ,
291+ args : {
292+ items : FAKE_ITEMS ,
293+ value : undefined ,
294+ variant : 'error' ,
295+ helperText : 'This is the helper text' ,
296+ onSelect : fn ( ) ,
297+ } ,
298+ play : async ( { canvas } ) => {
299+ await expect ( canvas . getByRole ( 'combobox' ) ) . toHaveAttribute (
300+ 'aria-invalid' ,
301+ 'true'
302+ ) ;
303+ } ,
304+ } ;
305+
289306export const TestRendersPlaceholder : Story = {
290307 tags : [ 'test-only' ] ,
291308 args : {
You can’t perform that action at this time.
0 commit comments