File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
src/molecules/accessible-list Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -66,20 +66,16 @@ describe("AccessibleList", () => {
6666 const handleClick = ( ) => {
6767 isChecked = true ;
6868 } ;
69- const buttonText1 = faker . random . word ( ) ;
70- const buttonText2 = faker . random . words ( ) ;
69+ const buttonText = faker . random . word ( ) ;
7170
7271 // Act
7372 const { getByText } = render (
7473 < AccessibleList focusFirstItem = { true } >
75- < button onClick = { handleClick } > { buttonText1 } </ button >
76- < button onClick = { handleClick } > { buttonText2 } </ button >
74+ < button onClick = { handleClick } > { buttonText } </ button >
7775 </ AccessibleList >
7876 ) ;
7977
80- fireEvent . keyDown ( getByText ( buttonText1 ) , {
81- key : KeyboardKeys . DownArrow ,
82- } ) ;
78+ fireEvent . click ( getByText ( buttonText ) ) ;
8379
8480 // Assert
8581 expect ( isChecked ) . toBeTrue ( ) ;
You can’t perform that action at this time.
0 commit comments