Skip to content

Commit

Permalink
Merge pull request #176 from dissto/add-todo-for-column-state
Browse files Browse the repository at this point in the history
Add todo test for `has state`
  • Loading branch information
CodeWithDennis authored Apr 24, 2024
2 parents 516d0f3 + c28346b commit dea310b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ php artisan vendor:publish --tag="filament-tests-stubs"
- [ ] it can bulk soft delete records
- Column
- [ ] [it cannot render column](https://filamentphp.com/docs/3.x/tables/testing#columns)
- [ ] [it has state](https://filamentphp.com/docs/3.x/tables/testing#state)
- [ ] [it has the correct descriptions above](https://filamentphp.com/docs/3.x/tables/testing#descriptions)
- [ ] [it has the correct descriptions below](https://filamentphp.com/docs/3.x/tables/testing#descriptions)
- [ ] [it has column](https://filamentphp.com/docs/3.x/tables/testing#existence)
Expand Down
1 change: 1 addition & 0 deletions src/Handlers/StubHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public function getStubs(): Collection
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Table\Column\Exist::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Table\Column\Render::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Table\Column\CannotRender::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Table\Column\State::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Table\Column\Sort::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Table\Column\Search::make($resource)->get(),
\CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Table\Column\SearchIndividually::make($resource)->get(),
Expand Down
21 changes: 21 additions & 0 deletions src/Stubs/Resource/Page/RelationManager/Table/Column/State.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace CodeWithDennis\FilamentTests\Stubs\Resource\Page\RelationManager\Table\Column;

use Closure;
use CodeWithDennis\FilamentTests\Stubs\Base;

class State extends Base
{
public Closure|bool $isTodo = true;

public function getDescription(): string
{
return 'has state';
}

public function getShouldGenerate(): bool
{
return false; // TODO: implement
}
}
3 changes: 3 additions & 0 deletions stubs/Resource/Page/RelationManager/Table/Column/State.stub
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
it({{ DESCRIPTION }}, function () {
//
}){{ RESOLVED_GROUP_METHOD }}->todo();

0 comments on commit dea310b

Please sign in to comment.