[EuiErrorBoundary] Add default data-test-subj#5232
[EuiErrorBoundary] Add default data-test-subj#5232thompsongl merged 8 commits intoelastic:masterfrom
data-test-subj#5232Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/ |
|
jenkins test this |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/ |
cee-chen
left a comment
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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!
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5232/ |
* data-test-subj; clean up * tests * CL * test clean up
Summary
Adds a default
data-test-subjand 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- [ ] Checked for accessibility including keyboard-only and screenreader modes