Navigation Menu

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

Table and dist bar tests #5901

Merged
merged 2 commits into from Sep 18, 2018

Conversation

michellethomas
Copy link
Contributor

@michellethomas michellethomas commented Sep 14, 2018

Adding tests for table and distribution bar chart. Also factored out a few commands for use outside of verifySliceSuccess.

Found this issue when creating tests and once it's fixed we should include a test that covers it. #5904

@kristw @graceguo-supercat @john-bodley @williaster

@@ -0,0 +1,51 @@
import { FORM_DATA_DEFAULTS, NUM_METRIC } from './shared.helper';

// Dist bar
Copy link
Contributor

Choose a reason for hiding this comment

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

These three commands can go in the beforeEach block and removed from it block

beforeEach(() => {
  cy.login();
  cy.server();
  cy.route('POST', ...);
});

cy.server();
cy.login();

const formData = { ...BIG_NUMBER_DEFAULTS, metrics: NUM_METRIC, groupby: ['state'], row_limit: 10 };
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's break these formData into one field per line.

@michellethomas michellethomas force-pushed the table_dist_bar_tests branch 3 times, most recently from 1f3a32f to e30d412 Compare September 18, 2018 00:35
@codecov-io
Copy link

Codecov Report

Merging #5901 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5901   +/-   ##
=======================================
  Coverage   63.72%   63.72%           
=======================================
  Files         386      386           
  Lines       23532    23532           
  Branches     2621     2621           
=======================================
  Hits        14996    14996           
  Misses       8523     8523           
  Partials       13       13

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 24be692...a8882ac. Read the comment docs.

1 similar comment
@codecov-io
Copy link

Codecov Report

Merging #5901 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #5901   +/-   ##
=======================================
  Coverage   63.72%   63.72%           
=======================================
  Files         386      386           
  Lines       23532    23532           
  Branches     2621     2621           
=======================================
  Hits        14996    14996           
  Misses       8523     8523           
  Partials       13       13

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 24be692...a8882ac. Read the comment docs.

cy.route('POST', '/superset/explore_json/**').as('getJson');
});

it('Test table with adhoc metric', function () {
Copy link
Contributor

Choose a reason for hiding this comment

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

you have a mix of function () {} and () => {}, most of our tests I think use the latter / there's no benefit to the former unless you provide a name to the function for debugging. (prettier would also use the latter).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bah sorry I forgot I didn't go back and fix old files, let me do that.

Copy link
Contributor

@kristw kristw left a comment

Choose a reason for hiding this comment

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

Other minor issue that @williaster noted, LGTM

@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5901     +/-   ##
=========================================
+ 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...0b443d6. Read the comment docs.

2 similar comments
@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5901     +/-   ##
=========================================
+ 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...0b443d6. Read the comment docs.

@codecov-io
Copy link

Codecov Report

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

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #5901     +/-   ##
=========================================
+ 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...0b443d6. Read the comment docs.

@graceguo-supercat graceguo-supercat merged commit 8cb734d into apache:master Sep 18, 2018
@michellethomas michellethomas deleted the table_dist_bar_tests branch September 18, 2018 23:28
betodealmeida pushed a commit to lyft/incubator-superset that referenced this pull request Oct 12, 2018
* Creating commands to verify codes and slices

* Creating tests for table and dist bar
@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

6 participants