kristw commented on a change in pull request #5924: [cypress] Add integration 
test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, 
big_number, bubble, box_plot, treemap
URL: 
https://github.com/apache/incubator-superset/pull/5924#discussion_r219346424
 
 

 ##########
 File path: 
superset/assets/cypress/integration/explore/visualizations/treemap.js
 ##########
 @@ -0,0 +1,59 @@
+describe('Treemap', () => {
+  const TREEMAP_FORM_DATA = {
+    datasource: '2__table',
+    viz_type: 'treemap',
+    slice_id: 50,
+    granularity_sqla: 'year',
+    time_grain_sqla: 'P1D',
+    time_range: '1960-01-01+:+now',
+    metrics: ['sum__SP_POP_TOTL'],
+    adhoc_filters: [],
+    groupby: ['country_code'],
+    row_limit: 50000,
+    color_scheme: 'bnbColors',
+    treemap_ratio: 1.618033988749895,
+    number_format: '.3s',
+  };
+
+  function verify(formData) {
+    cy.visitChartByParams(JSON.stringify(formData));
+    cy.verifySliceSuccess({ waitAlias: '@getJson', chartSelector: 'svg' });
+  }
+
+  beforeEach(() => {
+    cy.server();
+    cy.login();
+    cy.route('POST', '/superset/explore_json/**').as('getJson');
+  });
+
+  it('should work', () => {
+    verify(TREEMAP_FORM_DATA);
+    cy.get('.chart-container svg rect.child').should('have.length', 214);
 
 Review comment:
   I checked the code and did not see any logic that reduce number of nodes. 
One component that does weird stuffs with the children is `icicle`, which only 
display top 5 children, but I don't see that with this treemap. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to