From 66ba4fb3c6a2950fb859cd15e9a158a79dcd0085 Mon Sep 17 00:00:00 2001 From: Diego Pucci Date: Thu, 17 Oct 2024 17:50:09 +0300 Subject: [PATCH] fix(E2E): Re-enable tests in editmode --- .../cypress/e2e/dashboard/editmode.test.ts | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts index b7ea17f79f6ec..314e0f6048d47 100644 --- a/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts +++ b/superset-frontend/cypress-base/cypress/e2e/dashboard/editmode.test.ts @@ -469,7 +469,7 @@ describe('Dashboard edit', () => { .should('have.css', 'fill', 'rgb(255, 0, 0)'); }); - it.skip('should change color scheme multiple times', () => { + it('should change color scheme multiple times', () => { openProperties(); selectColorScheme('blueToGreen'); applyChanges(); @@ -487,7 +487,7 @@ describe('Dashboard edit', () => { '[data-test-chart-name="Top 10 California Names Timeseries"] .line .nv-legend-symbol', ) .first() - .should('have.css', 'fill', 'rgb(234, 11, 140)'); + .should('have.css', 'fill', 'rgb(50, 0, 167)'); // open 2nd main tab openTab(0, 1); @@ -496,7 +496,7 @@ describe('Dashboard edit', () => { // label Anthony cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol') .eq(2) - .should('have.css', 'fill', 'rgb(234, 11, 140)'); + .should('have.css', 'fill', 'rgb(50, 0, 167)'); editDashboard(); openProperties(); @@ -507,7 +507,7 @@ describe('Dashboard edit', () => { // label Anthony cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol') .eq(2) - .should('have.css', 'fill', 'rgb(41, 105, 107)'); + .should('have.css', 'fill', 'rgb(108, 69, 146)'); // open main tab and nested tab openTab(0, 0); @@ -518,10 +518,10 @@ describe('Dashboard edit', () => { '[data-test-chart-name="Top 10 California Names Timeseries"] .line .nv-legend-symbol', ) .first() - .should('have.css', 'fill', 'rgb(41, 105, 107)'); + .should('have.css', 'fill', 'rgb(108, 69, 146)'); }); - it.skip('should apply the color scheme across main tabs', () => { + it('should apply the color scheme across main tabs', () => { openProperties(); selectColorScheme('blueToGreen'); applyChanges(); @@ -533,10 +533,10 @@ describe('Dashboard edit', () => { cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol') .first() - .should('have.css', 'fill', 'rgb(234, 11, 140)'); + .should('have.css', 'fill', 'rgb(50, 0, 167)'); }); - it.skip('should apply the color scheme across main tabs for rendered charts', () => { + it('should apply the color scheme across main tabs for rendered charts', () => { waitForChartLoad({ name: 'Treemap', viz: 'treemap_v2' }); openProperties(); selectColorScheme('blueToGreen'); @@ -549,7 +549,7 @@ describe('Dashboard edit', () => { cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol') .first() - .should('have.css', 'fill', 'rgb(41, 105, 107)'); + .should('have.css', 'fill', 'rgb(50, 0, 167)'); // change scheme now that charts are rendered across the main tabs editDashboard(); @@ -560,10 +560,10 @@ describe('Dashboard edit', () => { cy.get('[data-test-chart-name="Trends"] .line .nv-legend-symbol') .first() - .should('have.css', 'fill', 'rgb(234, 11, 140)'); + .should('have.css', 'fill', 'rgb(0, 128, 246)'); }); - it.skip('should apply the color scheme in nested tabs', () => { + it('should apply the color scheme in nested tabs', () => { openProperties(); selectColorScheme('blueToGreen'); applyChanges(); @@ -579,17 +579,17 @@ describe('Dashboard edit', () => { '[data-test-chart-name="Top 10 California Names Timeseries"] .line .nv-legend-symbol', ) .first() - .should('have.css', 'fill', 'rgb(234, 11, 140)'); + .should('have.css', 'fill', 'rgb(50, 0, 167)'); // open another nested tab openTab(2, 1); waitForChartLoad({ name: 'Growth Rate', viz: 'line' }); cy.get('[data-test-chart-name="Growth Rate"] .line .nv-legend-symbol') .first() - .should('have.css', 'fill', 'rgb(234, 11, 140)'); + .should('have.css', 'fill', 'rgb(50, 0, 167)'); }); - it.skip('should apply a valid color scheme for rendered charts in nested tabs', () => { + it('should apply a valid color scheme for rendered charts in nested tabs', () => { // open the tab first time and let chart load openTab(1, 1); waitForChartLoad({ @@ -611,7 +611,7 @@ describe('Dashboard edit', () => { '[data-test-chart-name="Top 10 California Names Timeseries"] .line .nv-legend-symbol', ) .first() - .should('have.css', 'fill', 'rgb(234, 11, 140)'); + .should('have.css', 'fill', 'rgb(50, 0, 167)'); }); }); @@ -625,7 +625,7 @@ describe('Dashboard edit', () => { openProperties(); }); - it.skip('should accept a valid color scheme', () => { + it('should accept a valid color scheme', () => { openAdvancedProperties(); clearMetadata(); writeMetadata('{"color_scheme":"lyftColors"}'); @@ -636,21 +636,21 @@ describe('Dashboard edit', () => { applyChanges(); }); - it.skip('should overwrite the color scheme when advanced is closed', () => { + it('should overwrite the color scheme when advanced is closed', () => { selectColorScheme('blueToGreen'); openAdvancedProperties(); assertMetadata('blueToGreen'); applyChanges(); }); - it.skip('should overwrite the color scheme when advanced is open', () => { + it('should overwrite the color scheme when advanced is open', () => { openAdvancedProperties(); selectColorScheme('modernSunset'); assertMetadata('modernSunset'); applyChanges(); }); - it.skip('should not accept an invalid color scheme', () => { + it('should not accept an invalid color scheme', () => { openAdvancedProperties(); clearMetadata(); // allow console error @@ -716,7 +716,7 @@ describe('Dashboard edit', () => { visitEdit(); }); - it.skip('should add charts', () => { + it('should add charts', () => { cy.get('[role="checkbox"]').click(); dragComponent(); cy.getBySel('dashboard-component-chart-holder').should('have.length', 1); @@ -765,7 +765,7 @@ describe('Dashboard edit', () => { visitEdit(); }); - it.skip('should save', () => { + it('should save', () => { cy.get('[role="checkbox"]').click(); dragComponent(); cy.getBySel('header-save-button').should('be.enabled');