Repository navigation
[htmlIdGenerator] testenv mock - #4212
Conversation
|
Just to make sure, I noticed that in the a11y test where we need the unique IDs, you call |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4212/ |
Thanks for bringing this up. Testing in Kibana highlights that I have a solution in mind: add a second parameter on the testenv version that calls As in: |
|
As that requires re-mocking the generator anyway, might be cleaner to let the mock do its own thing instead of building that extra support into the shipped mock? |
I'm good with this approach, also. What do you think, @myasonik? |
|
Seems good to me! |
|
Because we're in agreement on not adding more to the mock, this is ready for review. |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4212/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_4212/ |
Summary
Closes #1381 by providing a
testenvmock for use in Jest environments (makeIdwas previously removed and not in use).Added internal mocking to EUI and removed one-off component mocks from individual test files.
Explored this idea, but without line numbers the trace is not very helpful, and with numbers we run the risk of excessive snapshot churn. We can discuss here if something other than
generated-idis better.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- [ ] Added documentation- [ ] Checked Code Sandbox works for the any docs examples- [ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes