Skip to content

Conversation

@priethor
Copy link
Contributor

@priethor priethor commented Jan 2, 2026

What

Part of #315.

Adds E2E tests for field validation and conditional logic.

Why

To ensure validation rules and conditional logic work correctly in the post editor.

How

Category Tests
Required Validation Text, select, checkbox required fields
Number Validation Min/max value enforcement
Format Validation URL and email format checking
Character Limits Maxlength on text and textarea
Error Display Custom messages, error clearing, multiple errors count
Fix & Resubmit Complete validation workflow
Conditional Show/Hide True/false trigger, select, radio, checkbox
Conditional Operators Equal, not-equal, empty, not-empty
Multiple Conditions AND logic, OR logic (groups)

Testing Instructions

Run the E2E tests:

npm run test:e2e -- tests/e2e/validation.spec.ts tests/e2e/conditional-logic.spec.ts

@github-actions
Copy link

github-actions bot commented Jan 2, 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.

@priethor priethor mentioned this pull request Jan 2, 2026
22 tasks
@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 31.95%. Comparing base (af9ae43) to head (03ebc96).
⚠️ Report is 2 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk     #346      +/-   ##
============================================
+ Coverage     31.71%   31.95%   +0.23%     
  Complexity     4410     4410              
============================================
  Files           291      291              
  Lines         36918    36918              
============================================
+ Hits          11710    11796      +86     
+ Misses        25208    25122      -86     
Flag Coverage Δ
e2e 47.15% <ø> (+3.73%) ⬆️
javascript 15.07% <ø> (ø)
phpunit 28.70% <ø> (ø)

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 added this to the 6.9.0 milestone Jan 2, 2026
@priethor priethor self-assigned this Jan 2, 2026
@priethor priethor merged commit 1f47ed4 into trunk Jan 3, 2026
10 checks passed
@priethor priethor deleted the tests/e2e-validation-conditional-logic branch January 3, 2026 00:26
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