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 in Text tests #45898

Merged
merged 1 commit into from Nov 18, 2022
Merged

Conversation

tyxla
Copy link
Member

@tyxla tyxla commented Nov 18, 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 (17) no-node-access rule violations in the Text component.

Why?

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

How?

We're adding a role to the test fixtures in order to be able to use screen.getByRole(). We're also combining a couple of renders within the single test into a single render, and just using different roles.

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 18, 2022
@tyxla tyxla added this to In progress (owned) ⏳ in WordPress Components via automation Nov 18, 2022
@tyxla tyxla self-assigned this Nov 18, 2022
@codesandbox
Copy link

codesandbox bot commented Nov 18, 2022

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@tyxla tyxla merged commit ab16f64 into trunk Nov 18, 2022
WordPress Components automation moved this from In progress (owned) ⏳ to Done 🎉 Nov 18, 2022
@tyxla tyxla deleted the fix/no-node-access-text branch November 18, 2022 15:25
@github-actions github-actions bot added this to the Gutenberg 14.7 milestone Nov 18, 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
Development

Successfully merging this pull request may close these issues.

None yet

2 participants