filament icon indicating copy to clipboard operation
filament copied to clipboard

Next wizard step test helper

Open eduPHP opened this issue 8 months ago • 6 comments

Description

This pull request creates a new test helper that calls for a wizard's next step

Closes #11622

Functional changes

Add the nextFormWizardStep() action to the test component, optionally you can provide the $currentStep (default 0) and $formName (default 'form')

Sample:

use function Pest\Livewire\livewire;

it('moves to next wizard step', function () {
    livewire(CreatePostUsingWizard::class)
        ->nextFormWizardStep()
        ->assertHasFormErrors(['title']);
});
  • [x] Code style has been fixed by running the composer cs command.
  • [x] Changes have been tested to not break existing functionality.
  • [x] Documentation is up-to-date.

eduPHP avatar Jun 16 '24 05:06 eduPHP