filament/forms
v3.2.137
v11.41.3
v3.5.12
8.4.3
I have traced that upgrade of Filament from v3.2.76
to v3.2.77
breaks Laravel Dusk tests using fillForm()
- the data in the form are always empty in all versions between v3.2.77
till at least v3.2.137
(current at the time of writing)
v3.2.76...v3.2.77#diff-eab80cbdc04e95db87de932c13eb10bc20b8734a930ff88999fa3777e784971bL35
The form is actually filled in the test.
If you run :
composer require "filament/filament=3.2.77" -W
php artisan dusk
The fillForm()
does not work as I would expect - the test fails like this:
FAIL Tests\Browser\TestTest
β¨― admin can create test 0.22s
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
FAILED Tests\Browser\TestTest > admin can create test
Component has errors: "data.make"
Failed asserting that false is true.
at vendor/livewire/livewire/src/Features/SupportValidation/TestsValidation.php:109
105β {
106β $errors = $this->errors();
107β
108β if (empty($keys)) {
β 109β PHPUnit::assertTrue($errors->isEmpty(), 'Component has errors: "'.implode('", "', $errors->keys()).'"');
110β
111β return $this;
112β }
113β
+4 vendor frames
5 tests/Browser/TestTest.php:18
By running pre-prepared dd()
at TestTest.php:20
Illuminate\Support\MessageBag^ {#3620
#messages: array:1 [
"data.make" => array:1 [
0 => "The make field is required."
]
]
#format: ":message"
} // tests/Browser/TestTest.php:20
To fix the problem downgrade Filament to v3.2.76
:
composer require "filament/filament=3.2.76" -W
php artisan dusk
Now the test passes:
PASS Tests\Browser\TestTest
β admin can create test 0.29s
Tests: 1 passed (6 assertions)
Duration: 0.33s
https://github.com/peterbabic/filament-issue/
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too