@@ -79,8 +79,11 @@ describe('VersionUpdate', () => {
7979
8080 await fireEvent . change ( screen . getByRole ( 'combobox' ) , { target : { value : '2.0.0' } } ) ;
8181
82- const [ moreLink , checkBtn , cancelBtn , updateBtnDisabled ] = screen . getAllByRole ( 'button' ) ;
83- expect ( moreLink . textContent ) . eq ( 'more' ) ;
82+ const [ moreLink1 , moreLink2 , moreLink3 , checkBtn , cancelBtn , updateBtnDisabled ] =
83+ screen . getAllByRole ( 'button' ) ;
84+ expect ( moreLink1 . textContent ) . eq ( 'more' ) ;
85+ expect ( moreLink2 . textContent ) . eq ( 'more' ) ;
86+ expect ( moreLink3 . textContent ) . eq ( 'more' ) ;
8487 expect ( checkBtn . textContent ) . eq ( 'Check' ) ;
8588 expect ( cancelBtn . textContent ) . eq ( 'Cancel' ) ;
8689 expect ( updateBtnDisabled . textContent ) . eq ( 'Update' ) ;
@@ -92,9 +95,9 @@ describe('VersionUpdate', () => {
9295
9396 const list = screen . getAllByRole ( 'listitem' ) ;
9497 expect ( list . length ) . eq ( 3 ) ;
95- expect ( list [ 0 ] . textContent . trim ( ) ) . eq ( "must have required property 'new_property'" ) ;
96- expect ( list [ 1 ] . textContent . trim ( ) ) . eq ( "must NOT have additional property 'extra_property'" ) ;
97- expect ( list [ 2 ] . textContent . trim ( ) ) . contain ( '/changed_property: must be boolean' ) ;
98+ expect ( list [ 0 ] . textContent ) . contain ( "must have required property 'new_property'" ) ;
99+ expect ( list [ 1 ] . textContent ) . contain ( "must NOT have additional property 'extra_property'" ) ;
100+ expect ( list [ 2 ] . textContent ) . contain ( '/changed_property: must be boolean' ) ;
98101
99102 await fireEvent . input ( screen . getByRole ( 'textbox' ) , {
100103 target : { value : '{"changed_property": true, "new_property": "test"}' }
@@ -140,8 +143,9 @@ describe('VersionUpdate', () => {
140143
141144 await fireEvent . change ( screen . getByRole ( 'combobox' ) , { target : { value : '2.0.0' } } ) ;
142145
143- const [ checkBtn , updateBtnDisabled ] = screen . getAllByRole ( 'button' ) ;
144- expect ( updateBtnDisabled . disabled ) . eq ( true ) ;
146+ const checkBtn = screen . getByRole ( 'button' , { name : 'Check' } ) ;
147+ const updateBtn = screen . getByRole ( 'button' , { name : 'Update' } ) ;
148+ expect ( updateBtn . disabled ) . eq ( true ) ;
145149
146150 await fireEvent . input ( screen . getByRole ( 'textbox' ) , {
147151 target : { value : '}{' }
0 commit comments