Found while building the JS unit test layer.
evaluateCondition in assets/helpers/functions.js:132-133 implements the <= operator as value < expected, dropping the equality case:
case '<=':
return value < expected;
A condition like { field: 'qty', condition: '<=', value: 10 } therefore evaluates false when qty === 10, hiding/showing the dependent field incorrectly at the boundary.
The current (buggy) behaviour is locked by an explicitly labelled "known quirk" test in tests/js/helpers/functions.test.js, so fixing this is a deliberate, visible change: fix the operator, then update that test to assert the correct boundary behaviour. Check whether any PHP-side condition evaluation mirrors the same logic before closing.
Found while building the JS unit test layer.
evaluateConditioninassets/helpers/functions.js:132-133implements the<=operator asvalue < expected, dropping the equality case:A condition like
{ field: 'qty', condition: '<=', value: 10 }therefore evaluates false whenqty === 10, hiding/showing the dependent field incorrectly at the boundary.The current (buggy) behaviour is locked by an explicitly labelled "known quirk" test in
tests/js/helpers/functions.test.js, so fixing this is a deliberate, visible change: fix the operator, then update that test to assert the correct boundary behaviour. Check whether any PHP-side condition evaluation mirrors the same logic before closing.