-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Fix table tests #1897
Fix table tests #1897
Conversation
themadcreator
commented
Dec 12, 2017
- Call super methods of AbstractComponent instead of validateProps directly
- Use new enzyme state method
- Use full mount instead of shallow mount
- Remove update tests due to awkward error boundary prop setting with new enzyme API (also already tested on mount)
- Call super methods of AbstractComponent instead of validateProps directly - Use new enzyme state method - Use full mount instead of shallow mount - Remove update tests due to awkward error boundary prop setting with new enzyme API (also already tested on mount)
packages/table/package.json
Outdated
@@ -24,7 +24,7 @@ | |||
"test": "npm-run-all -s compile:cjs test:pre -p test:karma test:iso", | |||
"test:pre": "tsc -p ./test", | |||
"test:karma": "karma start", | |||
"test:karma:debug": "karma start --browsers=Chrome --single-run=false --reporters=mocha --debug", | |||
"test:karma:debug": "karma start --single-run=false --reporters=mocha --debug", |
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.
This probably shouldn't stay in, yes?
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.
looks good, just a few style notes
packages/table/test/tableTests.tsx
Outdated
|
||
// selet the full table |
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.
TYPO
packages/table/test/tableTests.tsx
Outdated
.find(`.${Classes.TABLE_ROW_HEADERS}`) | ||
.find(`.${Classes.TABLE_HEADER}`) | ||
.hostNodes() | ||
.at(0); |
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.
.first()
?
packages/table/test/tableTests.tsx
Outdated
.at(0); | ||
let rowHeader = table | ||
.find(`.${Classes.TABLE_ROW_HEADERS}`) | ||
.find(`.${Classes.TABLE_HEADER}`) |
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.
can combine these into a compound selector: .find(".one .two")
(few other places too)