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

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

Conversation

chandlerprall
Copy link
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

@thompsongl
Copy link
Contributor

jenkins test this

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

@kibanamachine
Copy link

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

Copy link
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
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
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