diff --git a/tests/Feature/Form/FormRegisterActionTest.php b/tests/Feature/Form/FormRegisterActionTest.php index 94429b03..6d16edd3 100644 --- a/tests/Feature/Form/FormRegisterActionTest.php +++ b/tests/Feature/Form/FormRegisterActionTest.php @@ -147,19 +147,25 @@ class FormRegisterActionTest extends FormTestCase ]; yield [ - $this->radioField('letter')->name('Buchstabe')->options(['A', 'B'])->required(false), + $this->radioField('letter')->name('Buchstabe')->options(['A', 'B'])->required(false)->allowcustom(false), ['letter' => 'Z'], ['letter' => 'Der gewählte Wert für Buchstabe ist ungültig.'] ]; yield [ - $this->radioField('letter')->name('Buchstabe')->options(['A', 'B'])->required(true), + $this->radioField('letter')->name('Buchstabe')->options(['A', 'B'])->required(true)->allowcustom(false), ['letter' => 'Z'], ['letter' => 'Der gewählte Wert für Buchstabe ist ungültig.'] ]; yield [ - $this->radioField('letter')->name('Buchstabe')->options(['A', 'B'])->required(true), + $this->radioField('letter')->name('Buchstabe')->options(['A', 'B'])->required(true)->allowcustom(true), + ['letter' => 'lalalaa'], + null, + ]; + + yield [ + $this->radioField('letter')->name('Buchstabe')->options(['A', 'B'])->required(true)->allowcustom(false), ['letter' => 'A'], null ]; diff --git a/tests/Feature/Form/FormtemplateFieldRequest.php b/tests/Feature/Form/FormtemplateFieldRequest.php index 51683832..c950a633 100644 --- a/tests/Feature/Form/FormtemplateFieldRequest.php +++ b/tests/Feature/Form/FormtemplateFieldRequest.php @@ -24,6 +24,7 @@ use App\Form\Enums\SpecialType; * @method self hint(string $hint) * @method self min(int $min) * @method self max(int $max) + * @method self allowcustom(bool $allowcustom) */ class FormtemplateFieldRequest extends RequestFactory { diff --git a/tests/Feature/Form/FormtemplateIndexActionTest.php b/tests/Feature/Form/FormtemplateIndexActionTest.php index dd5ced8b..a165dac0 100644 --- a/tests/Feature/Form/FormtemplateIndexActionTest.php +++ b/tests/Feature/Form/FormtemplateIndexActionTest.php @@ -44,6 +44,7 @@ class FormtemplateIndexActionTest extends TestCase 'hint' => '', 'options' => [], 'required' => true, + 'allowcustom' => false, ] ]) ->assertInertiaPath('data.meta.fields.9', [