Skip to content

Conversation

@priethor
Copy link
Contributor

@priethor priethor commented Jan 2, 2026

What

Add JavaScript unit tests for client-side validation and conditional field visibility logic.

Why

These modules handle user-facing validation messages and field visibility—errors here directly impact form usability.

How

File Tests Coverage
condition-types.test.js 83 All ~40 condition types (HasValue, EqualTo, GreaterThan, LessThan, Contains, PatternMatch, etc.)
validation.test.js 42 Validator class, error management, field validation lifecycle
conditions-manager.test.js 35 Conditional visibility with AND/OR rule combinations
condition-base.test.js 25 Base acf.Condition class and registration functions

@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.

@codecov
Copy link

codecov bot commented Jan 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 31.03%. Comparing base (7551a70) to head (958c9d4).
⚠️ Report is 4 commits behind head on trunk.

Additional details and impacted files
@@             Coverage Diff              @@
##              trunk     #339      +/-   ##
============================================
+ Coverage     30.63%   31.03%   +0.39%     
  Complexity     4410     4410              
============================================
  Files           291      291              
  Lines         36918    36918              
============================================
+ Hits          11310    11457     +147     
+ Misses        25608    25461     -147     
Flag Coverage Δ
e2e 42.91% <ø> (-0.51%) ⬇️
javascript 10.12% <ø> (+3.58%) ⬆️
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 mentioned this pull request Jan 2, 2026
22 tasks
@priethor priethor self-assigned this Jan 2, 2026
@priethor priethor added this to the 6.9.0 milestone Jan 2, 2026
@priethor priethor merged commit af9ae43 into trunk Jan 2, 2026
10 checks passed
@priethor priethor deleted the 63e4-phase-3-pr-14-va branch January 2, 2026 16:50
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