Skip to content

Commit

Permalink
feat: add ECharts Pie chart (apache#10966)
Browse files Browse the repository at this point in the history
* feat: introduce echarts pie chart

* lint

* remove viz.py shim

* remove tests

* fix cypress test

* fix test
  • Loading branch information
villebro authored and auxten committed Nov 20, 2020
1 parent 97c65a6 commit 68534e9
Show file tree
Hide file tree
Showing 6 changed files with 195 additions and 295 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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);
});
});
Loading

0 comments on commit 68534e9

Please sign in to comment.