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

fix: datagrid empty state fixes #3528

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

davidmenendez
Copy link
Contributor

Contributes to #3243

mostly just addresses some testing. to help facilitate testing I added specific class names to all the empty state variants, which honestly should have been done from the start haha

there was a point in the issue to mention how to set the error type, but i think there needs to be a bigger discussion about prop types and that documentation for datagrid. so i opted to skip it for now.

@davidmenendez davidmenendez requested a review from a team as a code owner October 2, 2023 21:29
@netlify
Copy link

netlify bot commented Oct 2, 2023

Deploy Preview for carbon-for-ibm-products ready!

Name Link
🔨 Latest commit 125f592
🔍 Latest deploy log https://app.netlify.com/sites/carbon-for-ibm-products/deploys/651c691f44928800098d1cff
😎 Deploy Preview https://deploy-preview-3528--carbon-for-ibm-products.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

expect(
screen.getByRole('table').getElementsByTagName('tbody')[0].className
).toEqual('c4p--datagrid__empty-state-body');
document.querySelector(`.${pkg.prefix}--empty-state-type--noData`)
Copy link
Member

Choose a reason for hiding this comment

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

We should avoid document.querySelector if possible

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll take another look

@davidmenendez
Copy link
Contributor Author

@matthewgallo fixed the tests by adding a role to the empty state svgs

@matthewgallo matthewgallo added this pull request to the merge queue Oct 3, 2023
Merged via the queue into carbon-design-system:main with commit 9df5e1d Oct 3, 2023
12 checks passed
@davidmenendez davidmenendez deleted the 3243 branch October 3, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done 🚀
Development

Successfully merging this pull request may close these issues.

2 participants