@@ -52,16 +52,17 @@ describe('Dashboard refresh', () => {
5252 const query1 = `from(bucket: "schmucket")
5353|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
5454|> filter(fn: (r) => r["container_name"] == "cool")`
55- cy . getByTestID ( 'flux-editor' )
56- . should ( 'be.visible' )
57- . click ( )
58- . focused ( )
59- . type ( query1 )
55+ cy . getByTestID ( 'flux-editor' ) . within ( ( ) => {
56+ cy . get ( '.monaco-editor .view-line:last' )
57+ . click ( { force : true } )
58+ . focused ( )
59+ . type ( query1 , { force : true , delay : 1 } )
60+ } )
6061 cy . getByTestID ( 'overlay' ) . within ( ( ) => {
6162 cy . getByTestID ( 'page-title' ) . click ( )
6263 cy . getByTestID ( 'renamable-page-title--input' )
6364 . clear ( )
64- . type ( 'blah{enter}' )
65+ . type ( 'blah{enter}' , { force : true , delay : 1 } )
6566 cy . getByTestID ( 'save-cell--button' ) . click ( )
6667 } )
6768 } )
@@ -73,7 +74,7 @@ describe('Dashboard refresh', () => {
7374 cy . getByTestID ( 'enable-auto-refresh-button' ) . click ( )
7475 cy . getByTestID ( 'auto-refresh-input' )
7576 . clear ( )
76- . type ( '2s' )
77+ . type ( '2s' , { force : true , delay : 1 } )
7778 cy . getByTestID ( 'refresh-form-activate-button' ) . click ( { force : true } )
7879 cy . wait ( '@refreshQuery' )
7980 cy . getByTestID ( 'enable-auto-refresh-button' ) . click ( )
@@ -91,13 +92,13 @@ describe('Dashboard refresh', () => {
9192 cy . getByTestID ( 'enable-auto-refresh-button' ) . click ( )
9293 cy . getByTestID ( 'auto-refresh-input' )
9394 . clear ( )
94- . type ( '4s' )
95- . type ( '{enter}' )
95+ . type ( '4s' , { force : true , delay : 1 } )
96+ . type ( '{enter}' , { force : true , delay : 1 } )
9697 cy . getByTestID ( 'timerange-popover-button' ) . click ( )
9798 cy . getByTestID ( 'timerange-popover--dialog' ) . within ( ( ) => {
9899 cy . getByTestID ( 'timerange--input' )
99100 . clear ( )
100- . type ( `${ jumpAheadTime ( '00:00:05' ) } ` )
101+ . type ( `${ jumpAheadTime ( '00:00:05' ) } ` , { force : true , delay : 1 } )
101102 cy . getByTestID ( 'daterange--apply-btn' ) . click ( )
102103 } )
103104 cy . getByTestID ( 'refresh-form-activate-button' ) . click ( )
@@ -120,13 +121,13 @@ describe('Dashboard refresh', () => {
120121 cy . getByTestID ( 'enable-auto-refresh-button' ) . click ( )
121122 cy . getByTestID ( 'auto-refresh-input' )
122123 . clear ( )
123- . type ( '2s' )
124- . type ( '{enter}' )
124+ . type ( '2s' , { force : true , delay : 1 } )
125+ . type ( '{enter}' , { force : true , delay : 1 } )
125126 cy . getByTestID ( 'timerange-popover-button' ) . click ( )
126127 cy . getByTestID ( 'timerange-popover--dialog' ) . within ( ( ) => {
127128 cy . getByTestID ( 'timerange--input' )
128129 . clear ( )
129- . type ( `${ jumpAheadTime ( '00:00:10' ) } ` )
130+ . type ( `${ jumpAheadTime ( '00:00:10' ) } ` , { force : true , delay : 1 } )
130131 cy . getByTestID ( 'daterange--apply-btn' ) . click ( )
131132 } )
132133 cy . intercept ( 'POST' , '/api/v2/query?*' , req => {
@@ -169,13 +170,13 @@ describe('Dashboard refresh', () => {
169170 cy . getByTestID ( 'enable-auto-refresh-button' ) . click ( )
170171 cy . getByTestID ( 'auto-refresh-input' )
171172 . clear ( )
172- . type ( '3s' )
173- . type ( '{enter}' )
173+ . type ( '3s' , { force : true , delay : 1 } )
174+ . type ( '{enter}' , { force : true , delay : 1 } )
174175 cy . getByTestID ( 'timerange-popover-button' ) . click ( )
175176 cy . getByTestID ( 'timerange-popover--dialog' ) . within ( ( ) => {
176177 cy . getByTestID ( 'timerange--input' )
177178 . clear ( )
178- . type ( `${ jumpAheadTime ( '00:00:08' ) } ` )
179+ . type ( `${ jumpAheadTime ( '00:00:08' ) } ` , { force : true , delay : 1 } )
179180 cy . getByTestID ( 'daterange--apply-btn' ) . click ( )
180181 } )
181182 cy . intercept ( 'POST' , '/api/v2/query?*' , req => {
@@ -254,17 +255,18 @@ describe('Dashboard refresh', () => {
254255|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
255256|> filter(fn: (r) => r["container_name"] == "beans")`
256257
257- cy . getByTestID ( 'flux-editor' )
258- . should ( 'be.visible' )
259- . click ( )
260- . focused ( )
261- . type ( query1 )
258+ cy . getByTestID ( 'flux-editor' ) . within ( ( ) => {
259+ cy . get ( '.monaco-editor .view-line:last' )
260+ . click ( { force : true } )
261+ . focused ( )
262+ . type ( query1 , { force : true , delay : 1 } )
263+ } )
262264
263265 cy . getByTestID ( 'overlay' ) . within ( ( ) => {
264266 cy . getByTestID ( 'page-title' ) . click ( )
265267 cy . getByTestID ( 'renamable-page-title--input' )
266268 . clear ( )
267- . type ( 'blah{enter}' )
269+ . type ( 'blah{enter}' , { force : true , delay : 1 } )
268270 cy . getByTestID ( 'save-cell--button' ) . click ( )
269271 } )
270272
@@ -274,11 +276,12 @@ describe('Dashboard refresh', () => {
274276 cy . getByTestID ( 'toolbar-tab' ) . click ( )
275277
276278 cy . getByTestID ( 'overlay' ) . within ( ( ) => {
277- cy . getByTestID ( 'flux-editor' )
278- . should ( 'be.visible' )
279- . click ( )
280- . focused ( )
281- . type ( query2 )
279+ cy . getByTestID ( 'flux-editor' ) . within ( ( ) => {
280+ cy . get ( '.monaco-editor .view-line:last' )
281+ . click ( { force : true } )
282+ . focused ( )
283+ . type ( query2 , { force : true , delay : 1 } )
284+ } )
282285 cy . getByTestID ( 'save-cell--button' ) . click ( )
283286 } )
284287
@@ -302,7 +305,7 @@ describe('Dashboard refresh', () => {
302305 cy . getByTestID ( 'enable-auto-refresh-button' ) . click ( )
303306 cy . getByTestID ( 'auto-refresh-input' )
304307 . clear ( )
305- . type ( '2s' )
308+ . type ( '2s' , { force : true , delay : 1 } )
306309 cy . getByTestID ( 'refresh-form-activate-button' ) . click ( { force : true } )
307310 cy . wait ( '@secondCellQuery' )
308311 cy . wait ( '@firstCellQuery' )
@@ -353,17 +356,18 @@ describe('Dashboard refresh', () => {
353356|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
354357|> filter(fn: (r) => r["container_name"] == "beans")`
355358
356- cy . getByTestID ( 'flux-editor' )
357- . should ( 'be.visible' )
358- . click ( )
359- . focused ( )
360- . type ( query1 )
359+ cy . getByTestID ( 'flux-editor' ) . within ( ( ) => {
360+ cy . get ( '.monaco-editor .view-line:last' )
361+ . click ( { force : true } )
362+ . focused ( )
363+ . type ( query1 , { force : true , delay : 1 } )
364+ } )
361365
362366 cy . getByTestID ( 'overlay' ) . within ( ( ) => {
363367 cy . getByTestID ( 'page-title' ) . click ( )
364368 cy . getByTestID ( 'renamable-page-title--input' )
365369 . clear ( )
366- . type ( 'blah{enter}' )
370+ . type ( 'blah{enter}' , { force : true , delay : 1 } )
367371 cy . getByTestID ( 'save-cell--button' ) . click ( )
368372 } )
369373
@@ -373,11 +377,12 @@ describe('Dashboard refresh', () => {
373377 cy . getByTestID ( 'toolbar-tab' ) . click ( )
374378
375379 cy . getByTestID ( 'overlay' ) . within ( ( ) => {
376- cy . getByTestID ( 'flux-editor' )
377- . should ( 'be.visible' )
378- . click ( )
379- . focused ( )
380- . type ( query2 )
380+ cy . getByTestID ( 'flux-editor' ) . within ( ( ) => {
381+ cy . get ( '.monaco-editor .view-line:last' )
382+ . click ( { force : true } )
383+ . focused ( )
384+ . type ( query2 , { force : true , delay : 1 } )
385+ } )
381386 cy . getByTestID ( 'save-cell--button' ) . click ( )
382387 } )
383388
@@ -400,7 +405,7 @@ describe('Dashboard refresh', () => {
400405 cy . getByTestID ( 'enable-auto-refresh-button' ) . click ( )
401406 cy . getByTestID ( 'auto-refresh-input' )
402407 . clear ( )
403- . type ( '2s' )
408+ . type ( '2s' , { force : true , delay : 1 } )
404409 cy . getByTestID ( 'refresh-form-activate-button' ) . click ( { force : true } )
405410
406411 cy . wait ( '@secondCellQuery' )
@@ -451,17 +456,18 @@ describe('Dashboard refresh', () => {
451456|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
452457|> filter(fn: (r) => r["container_name"] == "beans")`
453458
454- cy . getByTestID ( 'flux-editor' )
455- . should ( 'be.visible' )
456- . click ( )
457- . focused ( )
458- . type ( query1 )
459+ cy . getByTestID ( 'flux-editor' ) . within ( ( ) => {
460+ cy . get ( '.monaco-editor .view-line:last' )
461+ . click ( { force : true } )
462+ . focused ( )
463+ . type ( query1 , { force : true , delay : 1 } )
464+ } )
459465
460466 cy . getByTestID ( 'overlay' ) . within ( ( ) => {
461467 cy . getByTestID ( 'page-title' ) . click ( )
462468 cy . getByTestID ( 'renamable-page-title--input' )
463469 . clear ( )
464- . type ( 'blah{enter}' )
470+ . type ( 'blah{enter}' , { force : true , delay : 1 } )
465471 cy . getByTestID ( 'save-cell--button' ) . click ( )
466472 } )
467473
@@ -471,11 +477,12 @@ describe('Dashboard refresh', () => {
471477 cy . getByTestID ( 'toolbar-tab' ) . click ( )
472478
473479 cy . getByTestID ( 'overlay' ) . within ( ( ) => {
474- cy . getByTestID ( 'flux-editor' )
475- . should ( 'be.visible' )
476- . click ( )
477- . focused ( )
478- . type ( query2 )
480+ cy . getByTestID ( 'flux-editor' ) . within ( ( ) => {
481+ cy . get ( '.monaco-editor .view-line:last' )
482+ . click ( { force : true } )
483+ . focused ( )
484+ . type ( query2 , { force : true , delay : 1 } )
485+ } )
479486 cy . getByTestID ( 'save-cell--button' ) . click ( )
480487 } )
481488
@@ -537,17 +544,18 @@ describe('Dashboard refresh', () => {
537544|> range(start: v.timeRangeStart, stop: v.timeRangeStop)
538545|> filter(fn: (r) => r["container_name"] == "beans")`
539546
540- cy . getByTestID ( 'flux-editor' )
541- . should ( 'be.visible' )
542- . click ( )
543- . focused ( )
544- . type ( query1 )
547+ cy . getByTestID ( 'flux-editor' ) . within ( ( ) => {
548+ cy . get ( '.monaco-editor .view-line:last' )
549+ . click ( { force : true } )
550+ . focused ( )
551+ . type ( query1 , { force : true , delay : 0 } )
552+ } )
545553
546554 cy . getByTestID ( 'overlay' ) . within ( ( ) => {
547555 cy . getByTestID ( 'page-title' ) . click ( )
548556 cy . getByTestID ( 'renamable-page-title--input' )
549557 . clear ( )
550- . type ( 'blah{enter}' )
558+ . type ( 'blah{enter}' , { force : true , delay : 1 } )
551559 cy . getByTestID ( 'save-cell--button' ) . click ( )
552560 } )
553561
@@ -557,11 +565,12 @@ describe('Dashboard refresh', () => {
557565 cy . getByTestID ( 'toolbar-tab' ) . click ( )
558566
559567 cy . getByTestID ( 'overlay' ) . within ( ( ) => {
560- cy . getByTestID ( 'flux-editor' )
561- . should ( 'be.visible' )
562- . click ( )
563- . focused ( )
564- . type ( query2 )
568+ cy . getByTestID ( 'flux-editor' ) . within ( ( ) => {
569+ cy . get ( '.monaco-editor .view-line:last' )
570+ . click ( { force : true } )
571+ . focused ( )
572+ . type ( query2 , { force : true , delay : 1 } )
573+ } )
565574 cy . getByTestID ( 'save-cell--button' ) . click ( )
566575 } )
567576
0 commit comments