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

Components: Fix no-node-access violations in Card tests #46158

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

tyxla
Copy link
Member

@tyxla tyxla commented Nov 29, 2022

What?

With the recent work to improve the quality of tests, we fixed a bunch of ESLint rule violations. This PR fixes a few (4) no-node-access rule violations in the Card component.

Why?

The end goal is to enable that ESLint rule once all violations have been fixed.

How?

We're using a screen query instead of container.firstChild. For this purpose, we add a data-testid to the Card wrapper element.

We're also using the opportunity to remove som redundant ={ true } from test fixtures.

Testing Instructions

Verify all tests still pass.

@tyxla tyxla added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Nov 29, 2022
@tyxla tyxla requested a review from ajitbohra as a code owner November 29, 2022 12:46
@tyxla tyxla self-assigned this Nov 29, 2022
@tyxla tyxla merged commit 8cf5051 into trunk Nov 29, 2022
@tyxla tyxla deleted the fix/no-node-access-card-tests branch November 29, 2022 13:22
@github-actions github-actions bot added this to the Gutenberg 14.7 milestone Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants