Skip to content

Commit

Permalink
docs: add Pest Livewire plugin installation instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
ismaelaek committed Jan 31, 2025
1 parent ae86b8c commit 011198a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions packages/panels/docs/14-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@ protected function setUp(): void
}
```

### Setting Up Pest for Livewire Testing
Before using the livewire helper in your Pest tests, you need to install the Pest Livewire plugin. Run the following command:
```
composer require pestphp/pest-plugin-livewire --dev
```
This will enable the livewire helper function, allowing you to test Livewire components seamlessly.

### Testing multiple panels

If you have multiple panels and you would like to test a non-default panel, you will need to tell Filament which panel you are testing. This can be done in the `setUp()` method of the test case, or you can do it at the start of a particular test. Filament usually does this in a middleware when you access the panel through a request, so if you're not making a request in your test like when testing a Livewire component, you need to set the current panel manually:
Expand Down

0 comments on commit 011198a

Please sign in to comment.