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 Theme tests #45896

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 no-node-access rule violations in the Theme component tests.

Why?

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

How?

We're using data-testid in the example component rendering tree to have a better way to directly access the element, rather than traversing the DOM.

We're also cleaning up the redundant error handling in the test.

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 self-assigned this Nov 18, 2022
@tyxla tyxla requested a review from ajitbohra as a code owner November 18, 2022 13:54
@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 13c529a into trunk Nov 18, 2022
@tyxla tyxla deleted the fix/no-node-access-theme branch November 18, 2022 15:24
@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
None yet
Development

Successfully merging this pull request may close these issues.

2 participants