diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard/save.test.js b/superset-frontend/cypress-base/cypress/integration/dashboard/save.test.js index 14e0ce314..8064f81fa 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard/save.test.js +++ b/superset-frontend/cypress-base/cypress/integration/dashboard/save.test.js @@ -74,7 +74,9 @@ describe('Dashboard save action', () => { .trigger('mouseenter') .click(); - cy.get('[data-test="grid-container"]').find('.treemap').should('not.exist'); + cy.get('[data-test="grid-container"]') + .find('.box_plot') + .should('not.exist'); cy.intercept('PUT', '/api/v1/dashboard/**').as('putDashboardRequest'); cy.get('[data-test="dashboard-header"]') @@ -88,9 +90,9 @@ describe('Dashboard save action', () => { .find('[aria-label="edit-alt"]') .click(); - // deleted treemap should still not exist + // deleted boxplot should still not exist cy.get('[data-test="grid-container"]') - .find('.treemap', { timeout: 20000 }) + .find('.box_plot', { timeout: 20000 }) .should('not.exist'); }); diff --git a/superset-frontend/src/dashboard/actions/dashboardState.js b/superset-frontend/src/dashboard/actions/dashboardState.js index 07799c2e9..60491025d 100644 --- a/superset-frontend/src/dashboard/actions/dashboardState.js +++ b/superset-frontend/src/dashboard/actions/dashboardState.js @@ -347,7 +347,7 @@ export function saveDashboardRequest(data, id, saveType) { .catch(response => onError(response)); } // changing the data as the endpoint requires - const copyData = cleanedData; + const copyData = { ...cleanedData }; if (copyData.metadata) { delete copyData.metadata; }