filament-tests icon indicating copy to clipboard operation
filament-tests copied to clipboard

A package that creates PEST tests specifically tailored for your filament resources.

Results 76 filament-tests issues
Sort by recently updated
recently updated
newest added

Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such column: post.id for `Tables\Columns\TextColumn::make('post.id')` Related to #257

bug

Currently the resource and page namespaces are [hardcoded in the stub](https://github.com/CodeWithDennis/filament-tests/blob/3873a8db8243059ff116074cae2f45ff82416a2a/stubs/Setup.stub#L3), so a test for a resource in a non-standard directory, or cluster, will not import the correct classes. `Filament::getResources()`...

enhancement

For example ```php it('can sort column', function (string $column) { Transaction::factory(3)->create(); livewire(ListTransactions::class) ->sortTable($column) ->assertCanSeeTableRecords(Transaction::orderBy($column)->get(), inOrder: true) ->sortTable($column, 'desc') ->assertCanSeeTableRecords(Transaction::orderBy($column, 'desc')->get(), inOrder: true); })->with(['amount', 'enteredBy.name', 'created_at', 'updated_at'])->group('resource', 'page', 'index', 'table', 'column');...

bug

- [ ] check for class (css) name - [ ] add test to confirm a tab exists

This is an attempt to massively clean up method signature. We can almost always default to `$this->resource` as it is set on `Base`, this removes the need to manually pass...

Closes #126 Generated tests example: ![Screenshot 2024-04-19 011145](https://github.com/CodeWithDennis/filament-tests/assets/11778632/45f5d82a-218e-452a-ac2d-92b65d5a944e) ![Screenshot 2024-04-19 011156](https://github.com/CodeWithDennis/filament-tests/assets/11778632/b6b32127-6a90-4842-9c37-3abced650438) ![Screenshot 2024-04-19 011624](https://github.com/CodeWithDennis/filament-tests/assets/11778632/8108541a-3bb1-4967-b233-934ac776f7e1)