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

Fix table tests #1897

Merged
merged 5 commits into from
Dec 13, 2017
Merged

Fix table tests #1897

merged 5 commits into from
Dec 13, 2017

Conversation

themadcreator
Copy link
Contributor

  • 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)
@@ -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",
Copy link
Contributor

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?

Copy link
Contributor

@giladgray giladgray left a 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


// selet the full table
Copy link
Contributor

Choose a reason for hiding this comment

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

TYPO

.find(`.${Classes.TABLE_ROW_HEADERS}`)
.find(`.${Classes.TABLE_HEADER}`)
.hostNodes()
.at(0);
Copy link
Contributor

Choose a reason for hiding this comment

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

.first()?

.at(0);
let rowHeader = table
.find(`.${Classes.TABLE_ROW_HEADERS}`)
.find(`.${Classes.TABLE_HEADER}`)
Copy link
Contributor

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)

@themadcreator themadcreator merged commit 9397fe8 into ad/react-16 Dec 13, 2017
@themadcreator themadcreator deleted the bd/fix-react-16 branch December 13, 2017 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants