Skip to content

Commit 43fc8a4

Browse files
committed
tests: mark testNoOrphanFieldsets as incomplete
This was introduced in a2ccdcf (#83) but has not been fixed so far. When a group is created inside the modifier, clicking the create button will cause one more fieldset to be created than there are containers: ```html <form action="/" method="post" id="frm-form"> <fieldset> <legend>Team member #1</legend> <table> <tr> <th><label for="frm-form-members-0-name">Name</label></th> <td><input type="text" name="members[0][name]" id="frm-form-members-0-name" class="text"></td> </tr> </table> </fieldset> <fieldset> <legend>Team member #2</legend> <table> <tr> <th><label for="frm-form-members-1-name">Name</label></th> <td><input type="text" name="members[1][name]" id="frm-form-members-1-name" class="text"></td> </tr> </table> </fieldset> <fieldset> <legend>Team member #3</legend> </fieldset> <table> <tr> <th></th> <td><input type="submit" name="members[multiplier_creator]" class=" button" value="add" formnovalidate data-nette-validation-scope='["members"]'></td> </tr> </table> <input type="hidden" name="_do" value="form-submit"> </form> ``` ``` Test tests/unit/CreateButtonTest.php:testFieldsets After adding a container, there should be two fieldsets. Failed asserting that actual size 3 matches expected size 2. ```
1 parent 71b44f4 commit 43fc8a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/Unit/CreateButtonTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ public function testFormEvents()
142142

143143
public function testNoOrphanFieldsets()
144144
{
145+
$this->markTestIncomplete(
146+
'We currently incorrectly produce extra fieldsets. See https://github.com/contributte/forms-multiplier/pull/83'
147+
);
148+
145149
$i = 1;
146150
$form = new Form();
147151
$form['members'] = $membersMultiplier = new Multiplier(function (Container $container) use ($form, &$i) {

0 commit comments

Comments
 (0)