mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
fix: publish the new example dashboards (#15803)
* fix: publish the new example dashboards * Fix tests
This commit is contained in:
@@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user