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

Truncate: Remove unnecessary .firstChild from tests #45694

Merged
merged 2 commits into from
Nov 10, 2022

Conversation

walbo
Copy link
Member

@walbo walbo commented Nov 10, 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 and no-container rule violations.

Why?

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

How?

  • Use getByText instead of checking .firstChild.

Testing Instructions

Verify all tests still pass.

@walbo walbo added [Type] Code Quality Issues or PRs that relate to code quality [Package] Components /packages/components labels Nov 10, 2022
@walbo walbo requested review from Mamaduka and tyxla November 10, 2022 01:16
@walbo walbo requested a review from ajitbohra as a code owner November 10, 2022 01:16
@walbo walbo self-assigned this Nov 10, 2022
@codesandbox
Copy link

codesandbox bot commented Nov 10, 2022

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

Copy link
Member

@tyxla tyxla left a comment

Choose a reason for hiding this comment

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

Nice! Thank you @walbo 🙌

Co-authored-by: Marin Atanasov <8436925+tyxla@users.noreply.github.com>
@Mamaduka Mamaduka merged commit a7da8be into trunk Nov 10, 2022
@Mamaduka Mamaduka deleted the fix/truncate-unnecessary-first-child branch November 10, 2022 04:58
@github-actions github-actions bot added this to the Gutenberg 14.6 milestone Nov 10, 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.

None yet

3 participants