File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -166,9 +166,8 @@ describe('DeprecatePackageModal', () => {
166166 ...mountOptions ,
167167 } )
168168
169- const buttons = component . findAll ( 'button[type="button"]' )
170- const submitBtn = buttons . find ( b => b . attributes ( 'disabled' ) !== undefined )
171- expect ( submitBtn ) . toBeDefined ( )
169+ const submitBtn = component . get ( '[data-testid="deprecate-submit"]' )
170+ expect ( submitBtn . attributes ( 'disabled' ) ) . toBeUndefined ( )
172171 } )
173172
174173 it ( 'deprecate button is enabled when message is filled and connected' , async ( ) => {
@@ -181,9 +180,8 @@ describe('DeprecatePackageModal', () => {
181180 await component . find ( '#deprecate-message' ) . setValue ( 'Deprecated, use foo instead' )
182181 await component . vm . $nextTick ( )
183182
184- const buttons = component . findAll ( 'button[type="button"]' )
185- const submitBtn = buttons . find ( b => b . attributes ( 'disabled' ) === undefined )
186- expect ( submitBtn ) . toBeDefined ( )
183+ const submitBtn = component . get ( '[data-testid="deprecate-submit"]' )
184+ expect ( submitBtn . attributes ( 'disabled' ) ) . toBeUndefined ( )
187185 } )
188186
189187 it ( 'handleDeprecate does nothing when not connected' , async ( ) => {
You can’t perform that action at this time.
0 commit comments