@@ -13,11 +13,26 @@ const VIS_TYPES = [
1313 'table' ,
1414]
1515
16- describe . skip ( 'Legends' , ( ) => {
16+ const CLOUD = Cypress . env ( 'dexUrl' ) === 'OSS' ? false : true
17+
18+ const dataExplorerFeatureFlags = {
19+ showDashboardsInNewIOx : true ,
20+ showOldDataExplorerInNewIOx : true ,
21+ showTasksInNewIOx : true ,
22+ }
23+
24+ // Absence of this feature (legends - old data explorer) in IOx is tested
25+ // in the Data Explorer tests.
26+ describe ( 'Legends' , ( ) => {
1727 describe ( 'in the Data Explorer' , ( ) => {
1828 beforeEach ( ( ) => {
1929 cy . flush ( )
2030 cy . signin ( )
31+
32+ if ( CLOUD ) {
33+ cy . setFeatureFlags ( dataExplorerFeatureFlags )
34+ }
35+
2136 cy . get ( '@org' ) . then ( ( { id} : Organization ) => {
2237 cy . createMapVariable ( id )
2338 cy . fixture ( 'routes' ) . then ( ( { orgs, explorer} ) => {
@@ -348,8 +363,7 @@ describe.skip('Legends', () => {
348363 )
349364 } )
350365
351- // Skip for now because Firefox does not run the test correctly with a newly created cell with query and view options included
352- it . skip ( 'saves to a dashboard as a cell with the static legend options open and with the query pre-submitted' , ( ) => {
366+ it ( 'saves to a dashboard as a cell with the static legend options open and with the query pre-submitted' , ( ) => {
353367 const cellName = 'anti-crash test pre-submitted data explorer'
354368 cy . writeData ( points ( 100 ) )
355369
@@ -411,10 +425,19 @@ describe.skip('Legends', () => {
411425 } )
412426 } )
413427
428+ const dashboardsFeatureFlags = {
429+ showDashboardsInNewIOx : true ,
430+ }
431+
414432 describe ( 'in Dashboards' , ( ) => {
415433 beforeEach ( ( ) => {
416434 cy . flush ( )
417435 cy . signin ( )
436+
437+ if ( CLOUD ) {
438+ cy . setFeatureFlags ( dashboardsFeatureFlags )
439+ }
440+
418441 cy . fixture ( 'routes' ) . then ( ( { orgs} ) => {
419442 cy . get ( '@org' ) . then ( ( { id} : Organization ) => {
420443 cy . visit ( `${ orgs } /${ id } /dashboards-list` )
@@ -475,16 +498,15 @@ describe.skip('Legends', () => {
475498 . click ( )
476499 . type ( cellName + '{enter}' )
477500
478- // Without submitting the query, save it to a dashboard
501+ cy . get ( '.veo-contents' ) . click ( ) // click out of inline editor
479502 cy . getByTestID ( 'save-cell--button' ) . click ( )
480503 cy . get ( '.cell--name' ) . should ( 'have.text' , cellName )
481504 cy . getByTestID ( 'giraffe-legend-table' ) . should ( 'not.exist' )
482505 }
483506 )
484507 } )
485508
486- // Skip for now because Firefox does not run the test correctly with a newly created cell with query and view options included
487- it . skip ( 'adds a new cell to a dashboard with the static legend options open and with the query pre-submitted' , ( ) => {
509+ it ( 'adds a new cell to a dashboard with the static legend options open and with the query pre-submitted' , ( ) => {
488510 const cellName = 'anti-crash test pre-submitted dashboard add cell'
489511 cy . writeData ( points ( 100 ) )
490512
@@ -540,6 +562,7 @@ describe.skip('Legends', () => {
540562 cy . getByTestID ( 'page-header' ) . click ( ) . type ( cellName )
541563
542564 // Save it to a dashboard
565+ cy . get ( '.veo-contents' ) . click ( ) // click out of inline editor
543566 cy . getByTestID ( 'save-cell--button' ) . click ( )
544567 cy . get ( '.cell--name' ) . should ( 'have.text' , cellName )
545568 cy . getByTestID ( 'giraffe-legend-table' ) . should ( 'be.visible' )
0 commit comments