Skip to content

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.

3 participants