-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Table and dist bar tests #5901
Conversation
@@ -0,0 +1,51 @@ | |||
import { FORM_DATA_DEFAULTS, NUM_METRIC } from './shared.helper'; | |||
|
|||
// Dist bar |
There was a problem hiding this comment.
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 }; |
There was a problem hiding this comment.
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.
1f3a32f
to
e30d412
Compare
e30d412
to
a8882ac
Compare
Codecov Report
@@ 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.
|
1 similar comment
Codecov Report
@@ 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.
|
cy.route('POST', '/superset/explore_json/**').as('getJson'); | ||
}); | ||
|
||
it('Test table with adhoc metric', function () { |
There was a problem hiding this comment.
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).
There was a problem hiding this comment.
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.
There was a problem hiding this 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
a8882ac
to
0b443d6
Compare
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
2 similar comments
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
* Creating commands to verify codes and slices * Creating tests for table and dist bar
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