Skip to content

Conversation

@priethor
Copy link
Contributor

What

Add WP version matrix to CI to test PRs against trunk, and fix failing tests against trunk.

Why

  • In general, testing against trunk helps catch compatibility issues early, but in particular, to test the Abilities only available in the unreleased 6.9 version
  • E2e tests fail on WP trunk because the Meta Boxes panel is now collapsed by default

How

  • Add WP version matrix (latest + trunk) to e2e workflow
  • On PRs, only test WP trunk until WP 6.9 releases with the Abilities API, when we can revert back to latest
  • Fix existing tests by expanding the Meta Boxes panel if collapsed before interacting with SCF fields (workaround for WordPress/gutenberg#72185)

Testing Instructions

  1. Run e2e tests locally with WP trunk: WP_ENV_CORE=WordPress/WordPress npm run test:e2e
  2. Tests should pass without "element is not visible" errors

@github-actions
Copy link

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.

Core Committers: Use this line as a base for the props when committing in SVN:

Props priethor.

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

@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 7.47%. Comparing base (64b31f5) to head (cf8dc83).
⚠️ Report is 1 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##             trunk    #257   +/-   ##
=======================================
  Coverage     7.47%   7.47%           
  Complexity    4285    4285           
=======================================
  Files          265     265           
  Lines        33080   33080           
=======================================
  Hits          2474    2474           
  Misses       30606   30606           
Flag Coverage Δ
e2e 21.79% <ø> (ø)
phpunit 3.69% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@priethor
Copy link
Contributor Author

Merging this as a blocker of #256, but feel free to add a post-merge review, @cbravobernal

@priethor priethor merged commit b22c8c7 into trunk Nov 27, 2025
9 checks passed
@priethor priethor deleted the fix/e2e-tests-wp-trunk branch November 27, 2025 16:02
Comment on lines +118 to +119
btn.dispatchEvent( new MouseEvent( 'click', { bubbles: true } ) );
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Wow, is not common to see this in e2e testing. You are opening all meta boxes by default here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's only opening the meta box panel at the bottom, but you are absolutely right we shouldn't be using synthetic events. Refactored to use standard Playwright methods in #259

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants