File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -391,21 +391,21 @@ export class BaseMethods {
391391 return ;
392392 }
393393
394- if ( parentSelector ) {
395- cy . get ( parentSelector )
396- . find ( selector )
397- . contains ( text )
398- . invoke ( attr , prop )
399- . should ( isInclude ? 'include' : 'not.include' , value )
394+ if ( parentSelector && index ) {
395+ cy . get ( parentSelector )
396+ . find ( selector )
397+ . eq ( index )
398+ . contains ( text )
399+ . invoke ( attr , prop )
400+ . should ( isInclude ? 'include' : 'not.include' , value )
400401
401- // @ts -ignore
402- return ;
402+ // @ts -ignore
403+ return ;
403404 }
404405
405- if ( parentSelector && index ) {
406+ if ( parentSelector ) {
406407 cy . get ( parentSelector )
407408 . find ( selector )
408- . eq ( index )
409409 . contains ( text )
410410 . invoke ( attr , prop )
411411 . should ( isInclude ? 'include' : 'not.include' , value )
You can’t perform that action at this time.
0 commit comments