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

Composite: always await initial render setup in unit tests #65823

Merged
merged 1 commit into from
Oct 2, 2024

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented Oct 2, 2024

What?

Extracted from #65720

Always await for the initial render setup in Composite unit tests

Why?

Looking at the code, it looks like the correct thing to do is to await for that setup function to execute.

This change should improve test reliability (I think I've seen some flakiness around composite tests).

How?

By awaiting every call to the renderAndValidate utility in unit tests

Testing Instructions

Unit tests should continue passing (and if there was any flakiness, that should improve)

@ciampo ciampo added [Type] Enhancement A suggestion for improvement. [Package] Components /packages/components labels Oct 2, 2024
@ciampo ciampo requested a review from a team October 2, 2024 11:11
@ciampo ciampo self-assigned this Oct 2, 2024
@ciampo ciampo requested a review from ajitbohra as a code owner October 2, 2024 11:11
Copy link

github-actions bot commented Oct 2, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <[email protected]>
Co-authored-by: tyxla <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

github-actions bot commented Oct 2, 2024

Flaky tests detected in 74ad0b4.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11142730036
📝 Reported issues:

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.

Makes sense, let's do it 👍 🚀

Makes you wonder why we weren't awaiting in the first place 🤔

@ciampo ciampo merged commit a4c88c2 into trunk Oct 2, 2024
70 checks passed
@ciampo ciampo deleted the fix/composite-unit-tests-await branch October 2, 2024 12:22
@github-actions github-actions bot added this to the Gutenberg 19.4 milestone Oct 2, 2024
huubl pushed a commit to huubl/gutenberg that referenced this pull request Oct 2, 2024
huubl added a commit to huubl/gutenberg that referenced this pull request Oct 2, 2024
draganescu pushed a commit that referenced this pull request Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants