You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a CreateRecord page of my model
I define the form in the corresponding page with a wizard with multiple steps (4 in my case)
public function form(Form $form): Form
{
$form->columns(3);
$form->schema([
Wizard::make([
Wizard\Step::make(__('filament.projects.label-singular'))
->schema(self::getProjectStep()),
Wizard\Step::make(__('details'))
->schema(self::getDetailsStep()),
Wizard\Step::make(__('filament.tasks.photo'))
->schema(self::getPhotoStep()),
Wizard\Step::make(__('filament.tasks.floorplan'))
->schema(self::getFloorPlanStep()),
])
->startOnStep(function (): int {
if ($this->projectId > 0) {
return 2;
}
return 1;
})
->submitAction($this->getSubmitFormAction())
]);
return parent::form($form);
}
Then in my tests i would expect the "assertWizardCurrentStep" to be 2, but, it's 1.
Livewire::withQueryParams([
'projectId' => $project->id
])->test(CreateTask::class)
->assertWizardCurrentStep(2); // fails!
```
I've also tested this by not providing a closure and a hard coded 2, which results in the same false assertion
### Expected behavior
I'm expecting the assertWizardStartingStep to assert to 2 in stead of 1.
I've tried
### Steps to reproduce
1. Create a CreatePage of any model.
2. Define a wizard in the form with multiple steps.
3. Set starting step on 2 (or greater then 1)
4. Create a test and assert using assertWizardCurrentStep that the current step is 2.
5. Check the view in the browser: it is not.
### Reproduction repository (issue will be closed if this is not valid)
https://github.com/herrwalter/filament-issue-current-step
### Relevant log output
_No response_
<!-- POLAR PLEDGE BADGE START -->
### Donate 💰 to fund this issue
- You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
- 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
- Thank you in advance for helping us make maintenance sustainable!
<a href="https://polar.sh/filamentphp/filament/issues/14887">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/api/github/filamentphp/filament/issues/14887/pledge.svg?darkmode=1">
<img alt="Fund with Polar" src="https://polar.sh/api/github/filamentphp/filament/issues/14887/pledge.svg">
</picture>
</a>
<!-- POLAR PLEDGE BADGE END -->
The text was updated successfully, but these errors were encountered:
Package
filament/filament
Package Version
3.2.123
Laravel Version
11.31.0
Livewire Version
3.5.12
PHP Version
8.3.13
Problem description
I've got a CreateRecord page of my model
I define the form in the corresponding page with a wizard with multiple steps (4 in my case)
Then in my tests i would expect the "assertWizardCurrentStep" to be 2, but, it's 1.
The text was updated successfully, but these errors were encountered: