-
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
update test dependencies, resolve deprecations #1088
Conversation
Remove react-addons-test-utils since it now lives at react-dom/test-utils Update relevant types & usage
pretty much just string replaces and a quick auto-format
Sort isotest components so the list is easier to scanPreview: documentation | table |
@@ -29,7 +29,7 @@ function isReactClass(Component) { | |||
* @param skipList {string[]} array of component names to skip | |||
*/ | |||
module.exports = function generateIsomorphicTests(Components, props, children, skipList = []) { | |||
Object.keys(Components).forEach((componentName) => { | |||
Object.keys(Components).sort().forEach((componentName) => { |
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.
Reasoning here?
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.
from commit message:
Sort isotest components so the list is easier to scan
makes it easier to immediately identify if a component is missing from the list
import { Classes, ITreeNode, ITreeProps, Tree } from "../../src/index"; | ||
|
||
/* tslint:disable:object-literal-sort-keys */ |
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.
Any idea why this was here originally?
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.
nope, possibly something that was fixed in TSLint
went through the latest build here and resolved all outstanding warnings. the only remaining ones should be expected (from tests for deprecated props or |
assert.strictEqual(timePicker.prop("precision"), TimePickerPrecision.SECOND); | ||
// assert TimePicker disappears in absence of prop | ||
wrapper.setProps({ timePrecision: undefined }); | ||
assert.isTrue(wrapper.find(TimePicker).isEmpty()); |
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.
WARN: 'Enzyme::Deprecated method isEmpty() called, use exists() instead.'
@@ -396,7 +396,7 @@ describe("<Popover>", () => { | |||
|
|||
wrapper.simulateTarget("click").assertIsOpen(); | |||
|
|||
TestUtils.Simulate.click(document.getElementsByClassName(Classes.POPOVER_DISMISS)[0]); | |||
Simulate.click(document.getElementsByClassName(Classes.POPOVER_DISMISS)[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.
we must use TestUtils.Simulate on DOM elements outside of enzyme wrappers. this is basically required for Portal-ed components because enzyme + react 15 do not support portals well. enzymejs/enzyme#252
fix isotest warnings + enable ResizeHandlePreview: documentation | table |
react dep firstPreview: documentation | table |
react dep firstPreview: documentation | table |
Fixes #781
Changes proposed in this pull request:
master
(after cutting 1.17.0 with a clean cache). The following lines are everywhere: