Skip to content

Commit 73dd4cd

Browse files
committed
tests: Check it is not possible to create containers without button
Currently, it is allowed so mark the test as ignored.
1 parent 880594d commit 73dd4cd

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

tests/Unit/CreateButtonTest.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,28 @@ public function testSendCreate()
3737
$this->assertDomHas($dom, 'input[name="m[2][bar]"]');
3838
}
3939

40+
public function testSendCreateWithoutButton()
41+
{
42+
$this->markTestIncomplete("New containers are added even without a button");
43+
44+
$response = $this->services->form->createRequest(
45+
MultiplierBuilder::create()
46+
->createForm()
47+
)->setPost([
48+
'm' => [
49+
['bar' => ''],
50+
['bar' => ''],
51+
'multiplier_creator' => '',
52+
],
53+
])->send();
54+
55+
$dom = $response->toDomQuery();
56+
57+
$this->assertDomHas($dom, 'input[name="m[0][bar]"]');
58+
$this->assertDomHas($dom, 'input[name="m[1][bar]"]');
59+
$this->assertDomNotHas($dom, 'input[name="m[2][bar]"]');
60+
}
61+
4062
public function testSendCreateOverMaxCopies()
4163
{
4264
$response = $this->services->form->createRequest(

0 commit comments

Comments
 (0)