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

Upgarde enzyme to v3.10.0 #38766

Merged
merged 7 commits into from
Jun 17, 2019
Merged

Conversation

sulemanof
Copy link
Contributor

@sulemanof sulemanof commented Jun 12, 2019

Summary

The PR updates airbnb/enzyme and dependent libs to the latest. It is necessary for enabling a unit test in src/legacy/core_plugins/input_control_vis/public/components/editor/list_control_editor.test.js , which was disabled in #37064

The PR includes next changes:

  • revert pending test in list_control_editor.test.js;
  • update snapshots (React components which are using Memo());
  • replace component.html() and component.text() function calls
    which expect null values to component.isEmptyRender() for consistency - the discussion and an enzyme maintainer suggestion

Checklist

Use strikethroughs to remove checklist items you don't feel are applicable to this PR.

For maintainers

*update snapshots (React components which are using Memo());

*revert pending test in list_control_editor.test.js;

*replace component.html() and component.text() function calls
 which expect null to component.isEmptyRender() for consistency
@sulemanof sulemanof requested a review from a team as a code owner June 12, 2019 09:31
@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💔 Build Failed

@@ -59,7 +59,7 @@ describe('Toaster', () => {
if (toasts.length === 0) {
dispatch({ type: 'addToaster', toast: mockToast });
}
});
}, []);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@XavierM
I've added it because of previous version of enzyme had a gap in calling hooks.
Without adding call this effect only after the first render the test fails, because of when click the btn and dispatch deleteToaster -> the toasts array becomes empty and useEffect will return in the game and will add new toast.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@sulemanof sulemanof added release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc labels Jun 14, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-platform

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@maryia-lapata maryia-lapata left a comment

Choose a reason for hiding this comment

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

The changes LGTM.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Copy link
Contributor

@spalger spalger left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Copy link
Contributor

@peteharverson peteharverson left a comment

Choose a reason for hiding this comment

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

ML edit LGTM

@sulemanof sulemanof merged commit e74f22d into elastic:master Jun 17, 2019
@sulemanof sulemanof deleted the upgrade-enzyme-3.10.0 branch June 17, 2019 15:33
sulemanof added a commit to sulemanof/kibana that referenced this pull request Jun 17, 2019
* Upgarde enzyme to v3.10.0

*update snapshots (React components which are using Memo());

*revert pending test in list_control_editor.test.js;

*replace component.html() and component.text() function calls
 which expect null to component.isEmptyRender() for consistency

# Conflicts:
#	x-pack/plugins/siem/public/components/toasters/index.test.tsx
sulemanof added a commit that referenced this pull request Jun 18, 2019
* Upgarde enzyme to v3.10.0

*update snapshots (React components which are using Memo());

*revert pending test in list_control_editor.test.js;

*replace component.html() and component.text() function calls
 which expect null to component.isEmptyRender() for consistency

# Conflicts:
#	x-pack/plugins/siem/public/components/toasters/index.test.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.3.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants