feat: add ECharts Pie chart (#10966)

* feat: introduce echarts pie chart

* lint

* remove viz.py shim

* remove tests

* fix cypress test

* fix test
This commit is contained in:
Ville Brofeldt
2020-09-22 19:27:40 +03:00
committed by GitHub
parent 0554c8918e
commit a9eab33d64
6 changed files with 195 additions and 295 deletions

View File

@@ -38,18 +38,18 @@ describe('Visualization > Pie', () => {
function verify(formData) {
cy.visitChartByParams(JSON.stringify(formData));
cy.verifySliceSuccess({ waitAlias: '@getJson', chartSelector: 'svg' });
cy.verifySliceSuccess({ waitAlias: '@getJson' });
}
beforeEach(() => {
cy.server();
cy.login();
cy.route('POST', '/superset/explore_json/**').as('getJson');
cy.route('POST', '/api/v1/chart/data').as('getJson');
});
it('should work with ad-hoc metric', () => {
verify(PIE_FORM_DATA);
cy.get('.chart-container .nv-pie .nv-slice path').should('have.length', 2);
cy.get('.chart-container .pie canvas').should('have.length', 1);
});
it('should work with simple filter', () => {
@@ -67,6 +67,6 @@ describe('Visualization > Pie', () => {
},
],
});
cy.get('.chart-container .nv-pie .nv-slice path').should('have.length', 1);
cy.get('.chart-container .pie canvas').should('have.length', 1);
});
});