filament/filament
v3.2.115
v11.25.0
v3.5.6
PHP 8.3.11
I created a test using Pest. A call to assertWizardCurrentStep(3)
during the Pest Feature test causes the test to fail. From what I can tell, the fillForm()
call is resetting the wizard back to Step 1 each time. The only way to get around this seems to be to make multiple calls to goToNextWizardStep()
for all steps after step 1.
I expected the first test to pass with one goToNextWizardStep()
per step, but it fails
I expected the second test to fail with multiple goToNextWizardStep()
calls on steps 2 and 3, but it passes
composer install
php artisan test
The tests are located in tests/Feature/WizardTest.php
The 1st test will fail and the 2nd test will pass. The only difference between the two tests is that the 2nd test has multiple consecutive calls to goToNextWizardStep()
. The number of calls increases incrementally throughout the test to get it back to the correct step. I'm assuming that this is a bug as the docs do not mention multiple calls being needed.
https://github.com/joseph-d/filamentIssue20240930
FAIL Tests\Feature\WizardTest
β¨― it advances through the wizard with one goToNextWizardStep() call per step 0.39s
β it advances through the wizard with extra goToNextWizardStep() calls on steps 2 and 3 0.43s
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
FAILED Tests\Feature\WizardTest > it advances through the wizard with one `goToNextWizardStep()` call per step
Failed asserting that wizard is on step 3, current step is 2.
Failed asserting that 2 matches expected 3.
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