Skip to content

Conversation

@priethor
Copy link
Contributor

@priethor priethor commented Jan 3, 2026

What

Follow-up to #345 to fix E2E test failures on WordPress 6.2.

Why

The import/export E2E tests were failing on WP 6.2 due to Playwright strict-mode violations. The locator used matched two elements on WP 6.2 (which displays an additional core warning notice), but only one element on newer WordPress versions.

How

Using .filter({ hasText: ... }) to target the specific SCF warning notice by its expected text content rather than relying on element order. This approach is more robust because it explicitly targets the notice we care about, regardless of how many notices are present on the page.

Testing Instructions

  1. Run the affected tests against WP 6.2:
    • Create .wp-env.override.json with {"core": "WordPress/WordPress#6.2"}
    • Run npm run wp-env start
    • Run tests: npm run test:e2e tests/e2e/import-export.spec.ts
  2. Verify tests also pass on default WP version

@priethor priethor added this to the 6.9.0 milestone Jan 3, 2026
@priethor priethor self-assigned this Jan 3, 2026
@github-actions
Copy link

github-actions bot commented Jan 3, 2026

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 Jan 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 33.97%. Comparing base (1e1f998) to head (4cb2ec6).
⚠️ Report is 1 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk     #348      +/-   ##
============================================
- Coverage     34.07%   33.97%   -0.11%     
  Complexity     4410     4410              
============================================
  Files           291      291              
  Lines         36914    36914              
============================================
- Hits          12578    12541      -37     
- Misses        24336    24373      +37     
Flag Coverage Δ
e2e 44.17% <ø> (-0.44%) ⬇️
javascript 15.07% <ø> (ø)
phpunit 29.97% <ø> (ø)

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 priethor merged commit d86d1ff into trunk Jan 3, 2026
10 checks passed
@priethor priethor deleted the fix/e2e-import-tests-62 branch January 3, 2026 01:38
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.

2 participants