@@ -445,112 +445,4 @@ describe('Flows', () => {
445445 . scrollIntoView ( )
446446 . should ( 'be.visible' )
447447 } )
448-
449- describe ( 'alert panel' , ( ) => {
450- it ( 'should build expressions list and allow for injection' , ( ) => {
451- const newBucketName = 'shmucket'
452- const now = Date . now ( )
453- cy . get < Organization > ( '@org' ) . then ( ( { id, name} : Organization ) => {
454- cy . createBucket ( id , name , newBucketName )
455- } )
456- cy . writeData (
457- [
458- `test,container_name=cool dopeness=12 ${ now - 1000 } 000000` ,
459- `test,container_name=beans dopeness=18 ${ now - 1200 } 000000` ,
460- `test,container_name=cool dopeness=14 ${ now - 1400 } 000000` ,
461- `test,container_name=beans dopeness=10 ${ now - 1600 } 000000` ,
462- ] ,
463- newBucketName
464- )
465-
466- const flowName = 'Flowbooks'
467-
468- cy . getByTestID ( 'preset-new' )
469- . first ( )
470- . click ( )
471- cy . getByTestID ( 'time-machine-submit-button' ) . should ( 'be.visible' )
472-
473- cy . getByTestID ( 'page-title' ) . click ( )
474- cy . getByTestID ( 'renamable-page-title--input' ) . type ( `${ flowName } ` )
475-
476- // select our bucket, measurement, field and tag
477- cy . getByTestID ( 'sidebar-button' )
478- . first ( )
479- . click ( )
480- cy . getByTestID ( 'Delete--list-item' ) . click ( )
481-
482- cy . getByTestID ( 'panel-add-btn--1' ) . click ( )
483- cy . getByTestID ( 'add-flow-btn--queryBuilder' ) . click ( )
484- cy . getByTestID ( 'bucket-selector' ) . within ( ( ) => {
485- cy . getByTestID ( `selector-list ${ newBucketName } ` ) . click ( )
486- } )
487-
488- // select measurement and field
489- cy . getByTestID ( 'builder-card' )
490- . eq ( 0 )
491- . within ( ( ) => {
492- cy . getByTestID ( `selector-list test` ) . click ( )
493- } )
494- cy . getByTestID ( 'builder-card' )
495- . eq ( 1 )
496- . within ( ( ) => {
497- cy . getByTestID ( `selector-list dopeness` ) . click ( )
498- } )
499- // select beans tag and click preview
500- cy . getByTestID ( 'builder-card' )
501- . eq ( 2 )
502- . within ( ( ) => {
503- cy . getByTestID ( `selector-list beans` ) . click ( )
504- } )
505-
506- // add an alert cell
507- cy . getByTestID ( 'panel-add-btn-2' ) . click ( )
508- cy . getByTestID ( 'add-flow-btn--notification' ) . click ( )
509- cy . getByTestID ( 'time-machine-submit-button' ) . click ( )
510- cy . getByTestID ( 'notification-exp-button' ) . scrollIntoView ( )
511- cy . getByTestID ( 'text-editor' ) . should ( 'be.visible' )
512-
513- // open exp sidebar panel
514- cy . getByTestID ( 'notification-exp-button' ) . should ( 'be.visible' )
515- cy . getByTestID ( 'notification-exp-button' ) . click ( )
516- cy . getByTestID ( 'flux-toolbar--list' ) . should ( 'be.visible' )
517-
518- // check that all expressions are listed
519- cy . getByTestID ( 'fields-dopeness' ) . should ( 'be.visible' )
520- cy . getByTestID ( 'tags-container_name' ) . should ( 'be.visible' )
521- cy . getByTestID ( 'columns-_start' ) . should ( 'be.visible' )
522- cy . getByTestID ( 'system-_source_measurement' )
523- . scrollIntoView ( )
524- . should ( 'be.visible' )
525-
526- // filter for dopeness
527- cy . getByTestID ( 'flux-toolbar-search--input' ) . type ( 'dopeness' )
528- cy . getByTestID ( 'flux--fields-dopeness--inject' ) . click ( { force : true } )
529- cy . getByTestID ( 'flux-toolbar-search--input' ) . clear ( )
530- // filter for notebook
531- cy . getByTestID ( 'flux-toolbar-search--input' ) . type ( 'notebook' )
532- cy . getByTestID ( 'flux--system-_notebook_link--inject' ) . click ( { force : true } )
533-
534- // make sure message contains injected expressions
535- cy . getByTestID ( 'notification-message--monaco-editor' ) . contains (
536- 'r.dopeness'
537- )
538- cy . getByTestID ( 'notification-message--monaco-editor' ) . contains (
539- 'r._notebook_link'
540- )
541-
542- // make sure task export contains notebook link
543- cy . getByTestID ( 'task-form-save' ) . click ( )
544- cy . getByTestID ( 'overlay--body' ) . should ( 'be.visible' )
545- cy . getByTestID ( 'flux-editor' ) . should ( 'exist' )
546- cy . getByTestID ( 'form--footer' ) . scrollIntoView ( )
547- cy . getByTestID ( 'overlay--body' ) . within ( ( ) => {
548- cy . url ( ) . then ( url => {
549- cy . getByTestID ( 'flux-editor' ) . contains (
550- `|> set(key: "_notebook_link", value: "${ url } ")`
551- )
552- } )
553- } )
554- } )
555- } )
556448} )
0 commit comments