Skip to content

[EuiDataGrid] Update jest environment rendering to include all cells#4589

Merged
chandlerprall merged 1 commit intoelastic:masterfrom
chandlerprall:bug/4514-render-more-cells-in-jest
Mar 2, 2021
Merged

[EuiDataGrid] Update jest environment rendering to include all cells#4589
chandlerprall merged 1 commit intoelastic:masterfrom
chandlerprall:bug/4514-render-more-cells-in-jest

Conversation

@chandlerprall
Copy link
Copy Markdown
Contributor

Summary

Closes #4514. Instead of falling back to 500x500 height/width when rendering the datagrid within Jest, now using Number.MAX_SAFE_INTEGER. Tried first with Infinity but the values are passed in a style object which doesn't support Infinity.

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 the 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

@chandlerprall chandlerprall requested a review from thompsongl March 1, 2021 20:09
@chandlerprall chandlerprall added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Mar 1, 2021
@thompsongl
Copy link
Copy Markdown
Contributor

jenkins test this

ERROR: Failed to set up Chromium r818858! Set "PUPPETEER_SKIP_DOWNLOAD" env variable to skip download.

@kibanamachine
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Contributor

@thompsongl thompsongl left a comment

Choose a reason for hiding this comment

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

Looks "SAFE" to me
Just curious if you can think of any potential downsides to the large dimensions; I couldn't think of anything immediate.

@chandlerprall
Copy link
Copy Markdown
Contributor Author

Just curious if you can think of any potential downsides to the large dimensions; I couldn't think of anything immediate.

Only thing that I've been able to come up with is if someone's adding the _isJest flag in another environment such as cypress.

@chandlerprall chandlerprall merged commit 0545480 into elastic:master Mar 2, 2021
@chandlerprall chandlerprall deleted the bug/4514-render-more-cells-in-jest branch March 2, 2021 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiDataGrid] How should I test whether a row is rendered?

3 participants