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

[EuiErrorBoundary] Add default data-test-subj #5232

Merged
merged 8 commits into from
Oct 7, 2021

Conversation

thompsongl
Copy link
Contributor

@thompsongl thompsongl commented Oct 1, 2021

Summary

Adds a default data-test-subj and still accepts any from consumers.

Checklist

- [ ] Check against all themes for compatibility in both light and dark modes
- [ ] Checked in mobile
- [ ] Checked in Chrome, Safari, Edge, and Firefox
- [ ] Props have proper autodocs and playground toggles
- [ ] Added documentation
- [ ] Checked Code Sandbox works for any docs examples

  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately

- [ ] Checked for accessibility including keyboard-only and screenreader modes

  • A changelog entry exists and is marked appropriately

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/

@thompsongl
Copy link
Contributor Author

jenkins test this

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/

@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/

Copy link
Contributor

@cee-chen cee-chen left a comment

Choose a reason for hiding this comment

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

LGTM! Some minor comments/q's, nothing blocking

describe('with an error thrown', () => {
it('UI is rendered', () => {
// Prevent the React boundary error from appearing in the terminal.
spyOn(console, 'error');
Copy link
Contributor

Choose a reason for hiding this comment

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

Ha this blows my mind, I've never actually used spyOn without the jest.spyOn prefix, but I guess it makes sense that it's a global 🤯

I am slightly confused by the comment though, AFAIK jest.spyOn doesn't silence anything without using jest.spyOn(something).mockImplementation(() => {}), so unless I'm wrong we're not actually using for the comment's purpose?

(feel free to merge w/o addressing this comment also as I know it's previous code + not a blocker)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Welp, it turns out that the comment is entirely false. Removing spyOn(console, 'error'); does not result in error messages in the console. Will remove.

Thanks for the question!

@thompsongl thompsongl enabled auto-merge (squash) October 7, 2021 15:03
@kibanamachine
Copy link

Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/

@thompsongl thompsongl merged commit de5c9bf into elastic:master Oct 7, 2021
ym pushed a commit to ym/eui that referenced this pull request Oct 29, 2021
* data-test-subj; clean up

* tests

* CL

* test clean up
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.

3 participants