diff --git a/superset-frontend/cypress-base/cypress/integration/dashboard_list/filter.test.ts b/superset-frontend/cypress-base/cypress/integration/dashboard_list/filter.test.ts index d9bf0bb77b6..aede8e7d546 100644 --- a/superset-frontend/cypress-base/cypress/integration/dashboard_list/filter.test.ts +++ b/superset-frontend/cypress-base/cypress/integration/dashboard_list/filter.test.ts @@ -59,13 +59,13 @@ describe('dashboard filters card view', () => { // filter by published cy.get('.Select__control').eq(2).click(); cy.get('.Select__menu').contains('Published').click({ timeout: 5000 }); - cy.get('[data-test="styled-card"]').should('have.length', 2); + cy.get('[data-test="styled-card"]').should('have.length', 3); cy.get('[data-test="styled-card"]') .contains('USA Births Names') .should('be.visible'); cy.get('.Select__control').eq(1).click(); cy.get('.Select__control').eq(1).type('unpub{enter}'); - cy.get('[data-test="styled-card"]').should('have.length', 2); + cy.get('[data-test="styled-card"]').should('have.length', 3); }); }); @@ -110,12 +110,12 @@ describe('dashboard filters list view', () => { // filter by published cy.get('.Select__control').eq(2).click(); cy.get('.Select__menu').contains('Published').click(); - cy.get('[data-test="table-row"]').should('have.length', 2); + cy.get('[data-test="table-row"]').should('have.length', 3); cy.get('[data-test="table-row"]') .contains('USA Births Names') .should('be.visible'); cy.get('.Select__control').eq(2).click(); cy.get('.Select__control').eq(2).type('unpub{enter}'); - cy.get('[data-test="table-row"]').should('have.length', 2); + cy.get('[data-test="table-row"]').should('have.length', 3); }); }); diff --git a/superset/commands/importers/v1/examples.py b/superset/commands/importers/v1/examples.py index e5f4a37175d..1571a212d6f 100644 --- a/superset/commands/importers/v1/examples.py +++ b/superset/commands/importers/v1/examples.py @@ -125,6 +125,8 @@ class ImportExamplesCommand(ImportModelsCommand): if file_name.startswith("dashboards/"): config = update_id_refs(config, chart_ids) dashboard = import_dashboard(session, config, overwrite=overwrite) + dashboard.published = True + for uuid in find_chart_uuids(config["position"]): chart_id = chart_ids[uuid] if (dashboard.id, chart_id) not in existing_relationships: