{"id":16461768,"url":"https://github.com/codewithdennis/filament-tests","last_synced_at":"2025-04-05T15:02:51.024Z","repository":{"id":227086410,"uuid":"769645914","full_name":"CodeWithDennis/filament-tests","owner":"CodeWithDennis","description":"A package that creates PEST tests specifically tailored for your filament resources.","archived":false,"fork":false,"pushed_at":"2024-12-10T07:56:13.000Z","size":762,"stargazers_count":67,"open_issues_count":64,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-03T10:58:31.031Z","etag":null,"topics":["filament","laravel","pest","pestphp","php","plugin","test-automation","testing"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CodeWithDennis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-09T16:55:07.000Z","updated_at":"2025-03-27T17:20:36.000Z","dependencies_parsed_at":"2024-04-27T20:24:51.720Z","dependency_job_id":"cf58e4cc-dbfe-4e41-8c00-fcdfd8e3578a","html_url":"https://github.com/CodeWithDennis/filament-tests","commit_stats":null,"previous_names":["codewithdennis/filament-resource-tests","codewithdennis/filament-tests"],"tags_count":0,"template":false,"template_full_name":"spatie/package-skeleton-laravel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWithDennis%2Ffilament-tests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWithDennis%2Ffilament-tests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWithDennis%2Ffilament-tests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CodeWithDennis%2Ffilament-tests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CodeWithDennis","download_url":"https://codeload.github.com/CodeWithDennis/filament-tests/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246994310,"owners_count":20866171,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filament","laravel","pest","pestphp","php","plugin","test-automation","testing"],"created_at":"2024-10-11T11:09:18.070Z","updated_at":"2025-04-05T15:02:51.004Z","avatar_url":"https://github.com/CodeWithDennis.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Filament Tests\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/codewithdennis/filament-tests.svg?style=flat-square)](https://packagist.org/packages/codewithdennis/filament-tests)\n[![Total Downloads](https://img.shields.io/packagist/dt/codewithdennis/filament-tests.svg?style=flat-square)](https://packagist.org/packages/codewithdennis/filament-tests)\n\nA package that creates PEST tests specifically tailored for your Filament components.\n\n\u003e [!IMPORTANT]  \n\u003e The project is currently on hold as both active maintainers are unable to dedicate time due to work commitments and other responsibilities. However, we encourage anyone in the community to contribute and help keep the project alive. Your efforts would make a big difference in maintaining its momentum.\n\n## Early development\n\nThis package is still in early development. Some features may not be available yet or may not work as expected. If you encounter any issues, please create an [issue](https://github.com/CodeWithDennis/filament-tests/issues) on this repository.\n\n\u003e [!CAUTION]  \n\u003e This package is not production-ready yet, use it at your own risk. ⚠️\n\n## Installation\nYou can install the package via composer:\n\n```bash\ncomposer require codewithdennis/filament-tests --dev\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"filament-tests-config\"\n```\n\n## Requirements\n\nThis package requires [Filament v3](https://filamentphp.com/docs/3.x/panels/installation) or later to run.\n\nThis package generates [PestPHP](https://pestphp.com/docs/installation) tests, make sure you have it installed in your project. You can install it by running the following command:\n\n```bash\ncomposer require pestphp/pest --dev --with-all-dependencies\n```\n\nMake sure you have the following plugins installed as well:\n\n```bash\ncomposer require pestphp/pest-plugin-livewire --dev\n```\n```bash\ncomposer require pestphp/pest-plugin-laravel --dev\n```\n\n## Usage\n\nYou can create a new test for a resource by running the following command:\n\u003e The following name formats are supported: `blog`, `Blog`, `BlogResource`\n\n```bash\nphp artisan make:filament-test BlogResource\n```\n\nYou can also pass a comma-separated list of resource names to create tests for multiple resources at once:\n\n```bash\nphp artisan make:filament-test \"BlogResource, PostResource\"\n```\n\nIf you don't specify a resource name, you will be prompted to choose one or more resources to create tests for interactively.\n\n```bash\nphp artisan make:filament-test\n````\n## Options\n\n| Option             | Description                                                            |\n|--------------------|------------------------------------------------------------------------|\n| `--all` `-a`       | Create tests for all Filament resources                                |\n| `--directory` `-d` | The output directory for the test                                      |\n| `--except` `-e`    | Create tests for all Filament resources except the specified resources |\n| `--force` `-f`     | Overwrite existing tests                                               |\n| `--only` `-o`      | Create tests for the specified resources                               |\n\n## Tests\nTests are generated on demand and are tailored to the component that you're generating tests for. For example, if the resource component doesn't have any sortable columns, then the tests for sorting \nwon't be generated.\n\n### Available Tests\n\n\u003cdetails\u003e\n\n\u003csummary\u003eList of available tests \u003ci\u003e(46)\u003c/i\u003e ✔️\u003c/summary\u003e\n\n- it can render the registration page\n- it can render the password reset page\n- it can render the login page\n- [it can render the create page](https://filamentphp.com/docs/3.x/panels/testing#routing--render)\n- [it has create form](https://filamentphp.com/docs/3.x/forms/testing#form-existence)\n- [has a disabled field on create form](https://filamentphp.com/docs/3.x/forms/testing#disabled-fields)\n- [it has a field on create form](https://filamentphp.com/docs/3.x/forms/testing#fields)\n- [it has a hidden field on create form](https://filamentphp.com/docs/3.x/forms/testing#hidden-fields)\n- [it can render the edit page](https://filamentphp.com/docs/3.x/panels/testing#routing--render)\n- [it can render the relation manager on the edit page](https://filamentphp.com/docs/3.x/panels/testing#render)\n- it has the correct table heading on the relation manager on the edit page\n- it has the correct table description on the relation manager on the edit page\n- it can render column on the relation manager on the edit page\n- it cannot render column on the relation manager on the edit page\n- [it has the correct descriptions above on the relation manager on the edit page](https://filamentphp.com/docs/3.x/tables/testing#descriptions)\n- [it has the correct descriptions below on the relation manager on the edit page](https://filamentphp.com/docs/3.x/tables/testing#descriptions)\n- [it has a field on edit form](https://filamentphp.com/docs/3.x/forms/testing#fields)\n- [it has a hidden field on edit form](https://filamentphp.com/docs/3.x/forms/testing#hidden-fields)\n- [it has column on the relation manager on the edit page](https://filamentphp.com/docs/3.x/tables/testing#existence) \n- [it has extra attributes on the relation manager on the edit page](https://filamentphp.com/docs/3.x/tables/testing#extra-attributes)\n- [it can search column on the relation manger on the edit page](https://filamentphp.com/docs/3.x/tables/testing#searching)\n- [it can (individually) search column on the relation manger on the edit page](https://filamentphp.com/docs/3.x/tables/testing#searching)\n- [it has select column with correct options on the relation manager on the edit page](https://filamentphp.com/docs/3.x/tables/testing#select-columns)\n- [it can sort column on the relation manager on the edit page](https://filamentphp.com/docs/3.x/tables/testing#sorting)\n- [it can list records on the index page on the relation manager on the edit page](https://filamentphp.com/docs/3.x/tables/testing#render)\n- [it can list records on the index page on the relation manager on the edit page with pagination](https://filamentphp.com/docs/3.x/tables/testing#render)\n- [it can render the view page](https://filamentphp.com/docs/3.x/panels/testing#routing--render)\n- [it can render the relation manager on the view page](https://filamentphp.com/docs/3.x/panels/testing#render)\n- it has the correct table heading on the relation manager on the view page\n- it has the correct table description on the relation manager on the view page\n- it can render column on the relation manager on the view page\n- it cannot render column on the relation manager on the view page\n- [it has the correct descriptions above on the relation manager on the view page](https://filamentphp.com/docs/3.x/tables/testing#descriptions)\n- [it has the correct descriptions below on the relation manager on the view page](https://filamentphp.com/docs/3.x/tables/testing#descriptions)\n- [it has a field on view form](https://filamentphp.com/docs/3.x/forms/testing#fields)\n- [it has a hidden field on view form](https://filamentphp.com/docs/3.x/forms/testing#hidden-fields)\n- [it has column on the relation manager on the view page](https://filamentphp.com/docs/3.x/tables/testing#existence)\n- [it has extra attributes on the relation manager on the view page](https://filamentphp.com/docs/3.x/tables/testing#extra-attributes)\n- [it can search column on the relation manger on the view page](https://filamentphp.com/docs/3.x/tables/testing#searching)\n- [it can (individually) search column on the relation manger on the view page](https://filamentphp.com/docs/3.x/tables/testing#searching)\n- [it has select column with correct options on the relation manager on the view page](https://filamentphp.com/docs/3.x/tables/testing#select-columns)\n- [it can sort column on the relation manager on the view page](https://filamentphp.com/docs/3.x/tables/testing#sorting)\n- [it can list records on the index page on the relation manager on the view page](https://filamentphp.com/docs/3.x/tables/testing#render)\n- [it can list records on the index page on the relation manager on the view page with pagination](https://filamentphp.com/docs/3.x/tables/testing#render)\n- [it has edit form](https://filamentphp.com/docs/3.x/forms/testing#form-existence)\n- it has header actions on the index page\n- it cannot render header actions on the index page\n- it can render header actions on the index page\n- [it can list records on the index page](https://filamentphp.com/docs/3.x/tables/testing#render)\n- [it can list records on the index page with pagination](https://filamentphp.com/docs/3.x/tables/testing#render)\n- [it can render the index page](https://filamentphp.com/docs/3.x/tables/testing#render)\n- [it cannot display trashed records by default](https://filamentphp.com/docs/3.x/tables/testing#render)\n- it has the correct table description\n- it has the correct table heading\n- [it can delete records](https://filamentphp.com/docs/3.x/tables/testing#calling-actions)\n- [it can force delete records](https://filamentphp.com/docs/3.x/tables/testing#calling-actions)\n- [it can soft delete records](https://filamentphp.com/docs/3.x/tables/testing#calling-actions)\n- [it has table action](https://filamentphp.com/docs/3.x/tables/testing#calling-actions)\n- [it can replicate records](https://filamentphp.com/docs/3.x/tables/testing#calling-actions)\n- [it can restore records](https://filamentphp.com/docs/3.x/tables/testing#calling-actions)\n- [it has the correct URL for table action](https://filamentphp.com/docs/3.x/infolists/testing#url)\n- [it has the correct URL and opens in a new tab for table action](https://filamentphp.com/docs/3.x/infolists/testing#url)\n- it can bulk delete records\n- it can bulk force delete records\n- it can bulk delete records\n- it has table bulk action\n- it can bulk restore records\n- it can bulk soft delete records\n- [it cannot render column](https://filamentphp.com/docs/3.x/tables/testing#columns)\n- [it has the correct descriptions above](https://filamentphp.com/docs/3.x/tables/testing#descriptions)\n- [it has the correct descriptions below](https://filamentphp.com/docs/3.x/tables/testing#descriptions)\n- [it has column](https://filamentphp.com/docs/3.x/tables/testing#existence)\n- [it has extra attributes](https://filamentphp.com/docs/3.x/tables/testing#extra-attributes)\n- [it can render column](https://filamentphp.com/docs/3.x/tables/testing#columns)\n- [it can search column](https://filamentphp.com/docs/3.x/tables/testing#searching)\n- [it can individually search by column](https://filamentphp.com/docs/3.x/tables/testing#searching)\n- [it has the correct options](https://filamentphp.com/docs/3.x/tables/testing#select-columns)\n- [it can sort column](https://filamentphp.com/docs/3.x/tables/testing#sorting)\n- [it can reset table filters](https://filamentphp.com/docs/3.x/tables/testing#resetting-filters)\n- [it can render the view page](https://filamentphp.com/docs/3.x/tables/testing#render)\n\n\u003c/details\u003e\n\n### Publishing Stubs\nYou can customize the stubs by publishing them to your project:\n\n```bash\nphp artisan vendor:publish --tag=\"filament-tests-stubs\"\n```\n\n## Running the package tests\n\u003e 💡 Please make sure to uncomment `Illuminate\\Foundation\\Testing\\RefreshDatabase::class` in `tests/Pest.php` before running the tests.\n\u003e \n\u003e Additionally, make sure to have a `.env.testing` file with a valid database connection or uncomment the `DB_CONNECTION` and `DB_DATABASE` values in the `phpunit.xml` file.\n\nYou can run your tests normally by running the following command:\n\n```bash\nvendor/bin/pest\n```\n\nYou can choose to only run the tests for this package by running the following command:\n\n```bash\nvendor/bin/pest --group=filament-tests\n```\n\nYou can also run all your tests except the ones for this package by running the following command:\n\n```bash\nvendor/bin/pest --exclude-group=filament-tests\n```\n\n### Additional grouping options\n| Name                 | Includes                                                |\n|----------------------|---------------------------------------------------------|\n| `filters`            | Runs the tests for the filters                          |\n| `page`               | Runs the tests for the pages                            |\n| `render`             | Runs the tests that check if the page renders correctly |\n| `table`              | Runs the tests for the table                            |\n| `table-actions`      | Runs the tests for table actions                        |\n| `table-bulk-actions` | Runs the tests for table bulk actions                   |\n\u003e You can add any of those above groups to either `--exclude-group` or `--group` to include or exclude them from the test run. You can comma-separate multiple groups.\n\n## Credits\n\n- [CodeWithDennis](https://github.com/CodeWithDennis)\n- [Dissto](https://github.com/dissto)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithdennis%2Ffilament-tests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewithdennis%2Ffilament-tests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewithdennis%2Ffilament-tests/lists"}