Fixed tests
continuous-integration/drone/push Build is failing Details

This commit is contained in:
philipp lang 2024-04-17 10:19:56 +02:00
parent 58bb5ec87f
commit edffe0ef80
3 changed files with 11 additions and 3 deletions

View File

@ -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
];

View File

@ -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
{

View File

@ -44,6 +44,7 @@ class FormtemplateIndexActionTest extends TestCase
'hint' => '',
'options' => [],
'required' => true,
'allowcustom' => false,
]
])
->assertInertiaPath('data.meta.fields.9', [