Cover checkboxes of an array field mixed with disabled ones - #113
Merged
Merged
Conversation
stof
approved these changes
Sep 1, 2026
Member
|
The CI static analysis job is fixed by #114. Rebasing your branch should make it pass. |
Amoifr
force-pushed
the
test-disabled-checkboxes
branch
from
September 1, 2026 20:11
bb62d82 to
6edd750
Compare
Contributor
Author
|
Rebased on master, so #114 is in. PHPStan is clean locally on the rebased branch, thanks for the pointer. |
aik099
approved these changes
Sep 2, 2026
Member
|
I triggered new CI runs on our 3 drivers:
All drivers are passing those new tests |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is step 1 of the plan @aik099 laid out in minkphp/MinkBrowserKitDriver#150: cover the handling of disabled checkboxes, which nothing in the suite does today.
multicheckbox_form.htmlhas two checkboxes sharing an array name and neither is disabled.The new fixture mirrors the report: two disabled checkboxes, one of them checked, followed by two enabled ones. That ordering is the interesting part, since a driver that numbers the fields differently than the browser does ends up manipulating the wrong checkbox, or none at all.
One thing worth saying before anyone re-runs the driver builds: the BrowserKitDriver bug this comes from is already gone, and this test passes there (168 tests green). It was never a driver bug.
Form::addField()in dom-crawler 4.4.5 returned early for disabled nodes, so they were missing from the form array whilegetFieldPosition()still counted them in the DOM. symfony/symfony#35937 reverted that on 2020-03-03 and shipped it in 4.4.6, moving thedisabledcheck intogetValues()/getFiles()where it belongs. The issue was opened 13 days after that release.So this is a regression guard rather than a failing test: it locks the behaviour in so a future change upstream cannot reintroduce it silently. I have no way to run the Selenium-based drivers, so if one of them turns out to disagree with the assertions, tell me and I will adjust them.
I added a separate fixture instead of touching
multicheckbox_form.html, since other drivers have tests bound to its exact contents.