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

Tests: simplify test set up in WP_Block_Supports_Block_Style_Variations_Test #62637

Merged

Conversation

ramonjd
Copy link
Member

@ramonjd ramonjd commented Jun 18, 2024

What?

A PR to simplify test set up in WP_Block_Supports_Block_Style_Variations_Test

How?

Clean all JSON caches, including WP_Theme_JSON_Resolver_Gutenberg::clean_cached_data(), after test suite runs, not just after any tests

Letting _gutenberg_clean_theme_json_caches() do the work. It runs in tear_down().

Testing Instructions

CI should pass.

npm run test:unit:php should pass locally.

…ean_cached_data(), after test suite runs, not just after any tests
Copy link

github-actions bot commented Jun 18, 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: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org>

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

@ramonjd ramonjd added [Type] Build Tooling Issues or PRs related to build tooling [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core and removed [Type] Build Tooling Issues or PRs related to build tooling No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core labels Jun 18, 2024
Copy link
Contributor

@aaronrobertshaw aaronrobertshaw left a comment

Choose a reason for hiding this comment

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

LGTM 👍

Thanks for cleaning that up, appreciate it!

@ramonjd
Copy link
Member Author

ramonjd commented Jun 18, 2024

Thanks for the quick test @aaronrobertshaw

If the tests fail for whatever reason I'll revert this.

Hopefully the ghosts have been chased away.

@ramonjd ramonjd merged commit c222a5f into trunk Jun 18, 2024
65 checks passed
@ramonjd ramonjd deleted the try/clear-resolver-cache-after-block-style-variations-test branch June 18, 2024 04:52
@github-actions github-actions bot added this to the Gutenberg 18.7 milestone Jun 18, 2024
@aaronrobertshaw
Copy link
Contributor

When I first re-rant the tests locally, I hit the error #62587 addressed.

I had to run npm run wp-env destroy && npm run start before the tests passed locally but they did. So hopefully that bodes well.

Screenshot 2024-06-18 at 2 59 53 PM
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
No Core Sync Required Indicates that any changes do not need to be synced to WordPress Core [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests.
2 participants