Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, big_number, bubble, box_plot, treemap #5924

Merged
merged 17 commits into from Oct 3, 2018

Conversation

kristw
Copy link
Contributor

@kristw kristw commented Sep 18, 2018

  Running: explore/visualizations/area.js...
  Area
    ✓ should work without groupby (8003ms)
    ✓ should work with group by (2775ms)
    ✓ should work with groupby and filter (4192ms)
  3 passing (15s)

  Running: explore/visualizations/big_number.js...                
  Big Number
    ✓ should work (11808ms)
    ✓ should work without subheader (2590ms)
    ✓ should not render trendline when hidden (2808ms)
  3 passing (18s)

  Running: explore/visualizations/box_plot.js...
  Box Plot
    ✓ should work (12785ms)
    ✓ should work with filter (2913ms)
  2 passing (16s)

  Running: explore/visualizations/bubble.js... 
  Bubble
    ✓ should work (13647ms)
    ✓ should work with filter (4158ms)
  2 passing (18s)

  Running: explore/visualizations/dual_line.js... 
  Dual Line
    ✓ should work (10823ms)
    ✓ should work with filter (2481ms)
  2 passing (14s)

  Running: explore/visualizations/pie.js...
  Pie
    ✓ should work with ad-hoc metric (11622ms)
    ✓ should work with simple filter (2654ms)
  2 passing (15s)

  Running: explore/visualizations/pivot_table.js... 
  Pivot Table
    ✓ should work with single groupby (12238ms)
    ✓ should work with more than one groupby (4040ms)
    ✓ should work with multiple metrics (4703ms)
    ✓ should work with multiple groupby and multiple metrics (4590ms)
  4 passing (26s)

  Running: explore/visualizations/sankey.js...
  Sankey
    ✓ should work (10866ms)
    ✓ should work with filter (2401ms)
  2 passing (14s)

  Running: explore/visualizations/sunburst.js...
  Sunburst
    ✓ should work without secondary metric (12608ms)
    ✓ should work with secondary metric (2920ms)
    ✓ should work with multiple groupbys (3362ms)
    ✓ should work with filter (4151ms)
  4 passing (23s)

  Running: explore/visualizations/treemap.js...
  Treemap
    ✓ should work (11878ms)
    ✓ should work with multiple groupby (3992ms)
    ✓ should work with filter (2993ms)
  3 passing (20s)

  Running: explore/visualizations/world_map.js... 
  World Map
    ✓ should work with ad-hoc metric (12556ms)
    ✓ should work with simple filter (2728ms)
    ✓ should hide bubbles when told so (2555ms)
  3 passing (18s)

  (Run Finished)


      Spec                                       Tests  Passi…  Faili…  Pendi…  Skipp…
  ┌───────────────────────────────────────────────────────────────────────────────────┐
  │ ✔ dashboard/dashboard_tests.js      00:12       1       1       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/control_tests.js          00:09       2       2       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/area.js    00:13       3       3       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/big_nu…    00:15       3       3       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/big_nu…    00:17       3       3       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/box_pl…    00:15       2       2       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/bubble…    00:17       2       2       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/dist_b…    00:20       4       4       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/dual_l…    00:16       2       2       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/line.js    00:39       9       9       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/pie.js     00:14       2       2       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/pivot_…    00:29       4       4       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/sankey…    00:13       2       2       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/sunbur…    00:19       4       4       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/table.…    00:37       8       8       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/treema…    00:19       3       3       -       -       - │
  ├───────────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/world_…    00:26       3       3       -       -       - │
  └───────────────────────────────────────────────────────────────────────────────────┘
    All specs passed!                   05:38      57      57       -       -       -

image

@michellethomas @williaster @conglei

@kristw kristw changed the title Add integration test for world map [cypress] Add integration test for world map Sep 18, 2018
@kristw kristw changed the title [cypress] Add integration test for world map [cypress] Add integration test for pie, world map Sep 18, 2018
@codecov-io
Copy link

Codecov Report

Merging #5924 into master will increase coverage by 0.1%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5924     +/-   ##
=========================================
+ Coverage   63.61%   63.72%   +0.1%     
=========================================
  Files         386      386             
  Lines       23532    23532             
  Branches     2621     2621             
=========================================
+ Hits        14971    14996     +25     
+ Misses       8548     8523     -25     
  Partials       13       13
Impacted Files Coverage Δ
superset/views/core.py 74.22% <0%> (+0.29%) ⬆️
superset/models/core.py 85.09% <0%> (+0.49%) ⬆️
superset/connectors/sqla/models.py 81.13% <0%> (+0.75%) ⬆️
superset/db_engine_specs.py 55.45% <0%> (+2.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42ab175...2a9cff1. Read the comment docs.

1 similar comment
@codecov-io
Copy link

Codecov Report

Merging #5924 into master will increase coverage by 0.1%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5924     +/-   ##
=========================================
+ Coverage   63.61%   63.72%   +0.1%     
=========================================
  Files         386      386             
  Lines       23532    23532             
  Branches     2621     2621             
=========================================
+ Hits        14971    14996     +25     
+ Misses       8548     8523     -25     
  Partials       13       13
Impacted Files Coverage Δ
superset/views/core.py 74.22% <0%> (+0.29%) ⬆️
superset/models/core.py 85.09% <0%> (+0.49%) ⬆️
superset/connectors/sqla/models.py 81.13% <0%> (+0.75%) ⬆️
superset/db_engine_specs.py 55.45% <0%> (+2.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42ab175...2a9cff1. Read the comment docs.

@kristw kristw changed the title [cypress] Add integration test for pie, world map [cypress] Add integration test for area, pie, world map Sep 18, 2018
@codecov-io
Copy link

Codecov Report

Merging #5924 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5924      +/-   ##
==========================================
+ Coverage   63.61%   63.66%   +0.04%     
==========================================
  Files         386      386              
  Lines       23532    23532              
  Branches     2621     2621              
==========================================
+ Hits        14971    14981      +10     
+ Misses       8548     8538      -10     
  Partials       13       13
Impacted Files Coverage Δ
superset/utils.py 88.19% <0%> (-0.9%) ⬇️
superset/views/core.py 74.22% <0%> (+0.29%) ⬆️
superset/models/core.py 85.09% <0%> (+0.49%) ⬆️
superset/db_engine_specs.py 54.58% <0%> (+1.16%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42ab175...f08a0e7. Read the comment docs.

@codecov-io
Copy link

Codecov Report

Merging #5924 into master will increase coverage by 0.1%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5924     +/-   ##
=========================================
+ Coverage   63.61%   63.72%   +0.1%     
=========================================
  Files         386      386             
  Lines       23532    23532             
  Branches     2621     2621             
=========================================
+ Hits        14971    14996     +25     
+ Misses       8548     8523     -25     
  Partials       13       13
Impacted Files Coverage Δ
superset/views/core.py 74.22% <0%> (+0.29%) ⬆️
superset/models/core.py 85.09% <0%> (+0.49%) ⬆️
superset/connectors/sqla/models.py 81.13% <0%> (+0.75%) ⬆️
superset/db_engine_specs.py 55.45% <0%> (+2.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42ab175...f08a0e7. Read the comment docs.

1 similar comment
@codecov-io
Copy link

Codecov Report

Merging #5924 into master will increase coverage by 0.1%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5924     +/-   ##
=========================================
+ Coverage   63.61%   63.72%   +0.1%     
=========================================
  Files         386      386             
  Lines       23532    23532             
  Branches     2621     2621             
=========================================
+ Hits        14971    14996     +25     
+ Misses       8548     8523     -25     
  Partials       13       13
Impacted Files Coverage Δ
superset/views/core.py 74.22% <0%> (+0.29%) ⬆️
superset/models/core.py 85.09% <0%> (+0.49%) ⬆️
superset/connectors/sqla/models.py 81.13% <0%> (+0.75%) ⬆️
superset/db_engine_specs.py 55.45% <0%> (+2.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 42ab175...f08a0e7. Read the comment docs.

resample_how: null,
resample_rule: null,
resample_fillmethod: null,
annotation_layers: [],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been trying to reduce the number for form_data params that are hardcoded, just because we'll need to change them when they change. What do you think about reducing this list to the form_data fields that are necessary for the chart to load (removing those that are null).

sqlExpression: null,
fromFormData: true,
filterOptionName: 'filter_tqx1en70hh_7nksse7nqic',
}],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you rebase on this change you can import and use the SIMPLE_FILTER here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I decided to keep this one as it is clearer that by selecting gender=boy it will ensure there is only one pie slice.

@codecov-io
Copy link

Codecov Report

Merging #5924 into master will increase coverage by 0.1%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5924     +/-   ##
=========================================
+ Coverage   63.61%   63.72%   +0.1%     
=========================================
  Files         386      386             
  Lines       23532    23532             
  Branches     2621     2621             
=========================================
+ Hits        14971    14996     +25     
+ Misses       8548     8523     -25     
  Partials       13       13
Impacted Files Coverage Δ
superset/views/core.py 74.22% <0%> (+0.29%) ⬆️
superset/models/core.py 85.09% <0%> (+0.49%) ⬆️
superset/connectors/sqla/models.py 81.13% <0%> (+0.75%) ⬆️
superset/db_engine_specs.py 55.45% <0%> (+2.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8cb734d...4513053. Read the comment docs.

1 similar comment
@codecov-io
Copy link

Codecov Report

Merging #5924 into master will increase coverage by 0.1%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5924     +/-   ##
=========================================
+ Coverage   63.61%   63.72%   +0.1%     
=========================================
  Files         386      386             
  Lines       23532    23532             
  Branches     2621     2621             
=========================================
+ Hits        14971    14996     +25     
+ Misses       8548     8523     -25     
  Partials       13       13
Impacted Files Coverage Δ
superset/views/core.py 74.22% <0%> (+0.29%) ⬆️
superset/models/core.py 85.09% <0%> (+0.49%) ⬆️
superset/connectors/sqla/models.py 81.13% <0%> (+0.75%) ⬆️
superset/db_engine_specs.py 55.45% <0%> (+2.03%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8cb734d...4513053. Read the comment docs.

@kristw kristw changed the title [cypress] Add integration test for area, pie, world map [cypress] Add integration test for area, pie, pivot_table, world_map Sep 19, 2018
@codecov-io
Copy link

codecov-io commented Sep 19, 2018

Codecov Report

Merging #5924 into master will increase coverage by 0.04%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5924      +/-   ##
==========================================
+ Coverage    64.6%   64.65%   +0.04%     
==========================================
  Files         446      446              
  Lines       23814    23814              
  Branches     2639     2639              
==========================================
+ Hits        15386    15396      +10     
+ Misses       8415     8405      -10     
  Partials       13       13
Impacted Files Coverage Δ
superset/connectors/sqla/models.py 81.13% <0%> (+0.75%) ⬆️
superset/db_engine_specs.py 55.7% <0%> (+0.87%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9344f1...2cde5d4. Read the comment docs.

@kristw kristw force-pushed the kristw-cypress-worldmap branch 2 times, most recently from 7e13b10 to 2374f08 Compare September 19, 2018 23:09
@kristw kristw changed the title [cypress] Add integration test for area, pie, pivot_table, world_map [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst Sep 19, 2018
@kristw kristw changed the title [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, big_number Sep 20, 2018
@kristw kristw changed the title [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, big_number [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, big_number, bubble, box plot Sep 20, 2018
@kristw kristw changed the title [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, big_number, bubble, box plot [cypress] Add integration test for area, pie, pivot_table, world_map, dual_line, sunburst, sankey, big_number, bubble, box_plot, treemap Sep 20, 2018

it('should work', () => {
verify(TREEMAP_FORM_DATA);
cy.get('.chart-container svg rect.child').should('have.length', 214);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this one robust to minor screen size changes? I thought I remembered treemap creating a variable # of rects based on available space, so wanted to make sure this wouldn't start failing if e.g., someone increased or decreased the size of the side panel.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

@williaster williaster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with one question!

@kristw kristw force-pushed the kristw-cypress-worldmap branch 2 times, most recently from f1056b6 to bd10395 Compare September 26, 2018 23:18
@kristw
Copy link
Contributor Author

kristw commented Oct 2, 2018

  (Run Finished)
      Spec                                    Tests  Pass…  Fail…  Pend…  Skip… 
  ┌────────────────────────────────────────────────────────────────────────────┐
  │ ✔ dashboard/dashboard_tests.js     18ms      1      -      -      1      - │
  ├────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/control_tests.js        00:13      2      2      -      -      - │
  ├────────────────────────────────────────────────────────────────────────────┤
  │ ✔ explore/visualizations/all.js   02:35     58     58      -      -      - │
  └────────────────────────────────────────────────────────────────────────────┘
    All specs passed!                 02:48     61     60      -      1      -  

Much better time than before
Cypress time: 2:48min vs. 5:38min
Total ci time: 13mins vs 18mins

@williaster williaster merged commit df64eca into apache:master Oct 3, 2018
@kristw kristw deleted the kristw-cypress-worldmap branch October 3, 2018 19:44
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Oct 12, 2018
… dual_line, sunburst, sankey, big_number, bubble, box_plot, treemap (apache#5924)

* Add integration test for world map

* add pie chart

* add area

* use should for assertion

* update area test

* update it message

* remove null params

* add pivot tests

* remove urlparams

* add dual_line

* add sunburst test

* add big number

* add sankey

* add bubble

* add box plot

* add treemap tests

* combine all vis under single test
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0 labels Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.28.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants