Conversation
|
Should we go straight to 16.2.0? |
|
@kjbekkelund I think it makes sense to complete our upgrade to 16.0.0 and then once that's done immediately bump Kibana, X-Pack, and EUI to 16.2.0. Does that sound good to you? |
|
Works for me 👍 |
* Update to Enzyme 3.x. (#12) * Add findTestSubject test helper. Fix KuiCodeEditor tests. * Fix KuiContextMenu tests. * Fix KuiConfirmModal tests. * Fix tests for KuiPager. * Update KuiConfirmModal tests to use findTestSubject helper. * Publish test helpers from ui_framework. Fix DashboardCloneModal tests.
* Fix DashboardPanelContainer tests. * Update KuiColorPicker tests. * Fix ControlsTab tests. * Rename vis to input_control_vis. Update and fix InputControlVis tests. * Fix KuiListingTable tests. * Fix KuiTextInput tests. * Update DashboardGrid test snapshots.
|
jenkins, test this |
* Remove old enzyme setup file. * Add .test to YesNo and AddDeleteButtons test files.
| import React from 'react'; | ||
| import sinon from 'sinon'; | ||
| import { mount, shallow } from 'enzyme'; | ||
| import { findTestSubject } from 'ui_framework/test'; |
kimjoar
left a comment
There was a problem hiding this comment.
LGTM.
Added my thoughts on findTestSubject, but if you don't agree I'm fine with merging as-is.
| @@ -0,0 +1,10 @@ | |||
| // Extract the DOM node which matches a specific test subject selector. | |||
| export const findTestSubject = (mountedComponent, testSubjectSelector, isDOMNode = true) => { | |||
There was a problem hiding this comment.
Big +1 for extracting this function.
Hm, maybe add some docs or examples that explains isDOMNode? Not sure what if it from reading this function.
There was a problem hiding this comment.
Thinking a bit more on this. Personally I also find boolean args difficult to read. I think I'd personally just move the getDomNode outside this function. I feel it's easier to read findTestSubject(myComponent, 'foo').getDOMNode(). We also just needed getDOMNode 3 times before, so it doesn't feel too bad to do that (but maybe we need it more now because of changes in enzyme?)
There was a problem hiding this comment.
I really like your point about boolean args -- I have the same difficulty with them. I also like your suggestion. We'll try it out.
* get kibana to start with react 16.0.0 * ensure width and height for dashboard grid * Update to Enzyme 3.x. (#12) * Fix tests broken by Enzyme upgrade (#13) * Update to Enzyme 3.x. (#12) * Add findTestSubject test helper. Fix KuiCodeEditor tests. * Fix KuiContextMenu tests. * Fix KuiConfirmModal tests. * Fix tests for KuiPager. * Update KuiConfirmModal tests to use findTestSubject helper. * Publish test helpers from ui_framework. Fix DashboardCloneModal tests. * Fix more tests (#14) * Fix DashboardPanelContainer tests. * Update KuiColorPicker tests. * Fix ControlsTab tests. * Rename vis to input_control_vis. Update and fix InputControlVis tests. * Fix KuiListingTable tests. * Fix KuiTextInput tests. * Update DashboardGrid test snapshots. * Fix test file names (#15) * Remove old enzyme setup file. * Add .test to YesNo and AddDeleteButtons test files. * needed window.cancelAnimationFrame to accompany requestAnimationFrame * remove getDOMNode function call from findTestSubject
* get kibana to start with react 16.0.0 * ensure width and height for dashboard grid * Update to Enzyme 3.x. (#12) * Fix tests broken by Enzyme upgrade (#13) * Update to Enzyme 3.x. (#12) * Add findTestSubject test helper. Fix KuiCodeEditor tests. * Fix KuiContextMenu tests. * Fix KuiConfirmModal tests. * Fix tests for KuiPager. * Update KuiConfirmModal tests to use findTestSubject helper. * Publish test helpers from ui_framework. Fix DashboardCloneModal tests. * Fix more tests (#14) * Fix DashboardPanelContainer tests. * Update KuiColorPicker tests. * Fix ControlsTab tests. * Rename vis to input_control_vis. Update and fix InputControlVis tests. * Fix KuiListingTable tests. * Fix KuiTextInput tests. * Update DashboardGrid test snapshots. * Fix test file names (#15) * Remove old enzyme setup file. * Add .test to YesNo and AddDeleteButtons test files. * needed window.cancelAnimationFrame to accompany requestAnimationFrame * remove getDOMNode function call from findTestSubject
@cjcenizal and I paired up to upgraded to react 16.0.0 so kibana is running the same version as EUI