File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
tests/integration/support Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ Cypress.Commands.add(
55 return cy
66 . get ( 'div.monaco-editor' )
77 . find ( 'textarea[aria-roledescription="editor"]' )
8- . filter ( ':visible' )
98 . eq ( monacoCount )
109 . focus ( ) ;
1110 } ,
@@ -17,16 +16,21 @@ Cypress.Commands.add(
1716 ( content , monacoCount ) => {
1817 // Ignore Cypress issue with Monaco on CI
1918 cy . handleExceptions ( ) ;
20-
21- cy . findMonaco ( monacoCount ) . should ( 'be.visible' ) ;
22-
2319 cy . wait ( 1000 ) ;
2420
25- cy . findMonaco ( monacoCount ) . click ( { force : true } ) ;
21+ cy . findMonaco ( monacoCount ) . then ( monaco => {
22+ if ( monaco . is ( ':visible' ) ) {
23+ monaco . click ( { force : true } ) ;
24+ }
25+ } ) ;
2626
27- cy . findMonaco ( monacoCount )
28- . should ( 'have.focus' )
29- . clearInput ( )
30- . paste ( { pastePayload : content } ) ;
27+ cy . findMonaco ( monacoCount ) . then ( monaco => {
28+ if ( monaco . is ( ':visible' ) ) {
29+ monaco
30+ . should ( 'have.focus' )
31+ . clearInput ( )
32+ . paste ( { pastePayload : content } ) ;
33+ }
34+ } ) ;
3135 } ,
3236) ;
You can’t perform that action at this time.
0 commit comments