百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

filament-tests

> 后端框架
开源

专门为您的丝状资源设计的 PEST 测试软件包.

100 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

专门为您的丝状资源设计的 PEST 测试软件包.

Filament Tests

[Filament Tests] - No longer maintained. Upcoming AI tooling with proper rulesets can generate tests quickly, making this redundant. A package that creates PEST tests specifically tailored for your Filament components.

[!CAUTION]
This package is not ready yet, use it at your own risk. ⚠️

[!NOTE] This package requires that your models define model factories.

Installation

bash
composer require codewithdennis/filament-tests --dev

Usage

Run the command to generate tests for your Filament resources:

bash
php artisan make:filament-test

Command Options

The make:filament-test command supports the following options:

  • --skip-pint: Skip running Laravel Pint on generated test files
  • --force: Overwrite existing test files without confirmation

Available Tests

This package generates comprehensive PEST tests for your Filament resources. Here's a complete list of currently working tests:

Form Record Tests

  • CanCreateRecordTest - Tests that a record can be created
  • CanValidateCreateFormTest - Tests that the create form validates input correctly
    • Max
    • Min
    • Required
  • CanEditRecordTest - Tests that a record can be edited
  • CanValidateEditFormTest - Tests that the edit form validates input correctly
    • Max
    • Min
    • Required

Page Rendering Tests

  • CanRenderCreatePageTest - Tests that the create page renders correctly
  • CanRenderEditPageTest - Tests that the edit page renders correctly
  • CanRenderIndexPageTest - Tests that the index page renders correctly
  • CanRenderViewPageTest - Tests that the view page renders correctly

Page Functionality Tests

  • HasHeaderActionTest - Tests that header actions exist
  • ShowsHeaderActionTest - Tests that a header action is visible
  • HidesHeaderActionTest - Tests that a header action is hidden

Table Column Tests

  • HasColumnTest - Tests that the resource has table columns defined
  • CanRenderColumnTest - Tests that default visible columns render correctly
  • CanNotRenderColumnTest - Tests that default hidden columns don't render
  • ShowsColumnTest - Tests that explicitly visible columns are shown
  • HidesColumnTest - Tests that explicitly hidden columns are hidden
  • CanNotDisplayTrashedRecordsByDefault - Tests that trashed records are not displayed by default if soft deletes are enabled
  • ColumnHasDescriptionBelowTest - Tests that columns with descriptions display them below
  • ColumnHasDescriptionAboveTest - Tests that columns with descriptions display them above
  • SelectColumnHasOptionsTest - Tests that select columns have the correct options
  • ColumnHasExtraAttributesTest - Tests that columns with extra attributes render them correctly

Table Functionality Tests

  • CanSearchColumnTest - Tests that searchable columns work correctly
  • CanSearchColumnIndividuallyTest - Tests that individual column search works correctly
  • CanSortColumnTest - Tests that sortable columns work correctly
  • CanPaginateRecordsTest - Tests that pagination works correctly

Table Filter Tests

  • HasFilterTest - Tests that a filter exists

Bulk Action Tests

  • CanBulkDeleteRecordsTest - Tests that bulk delete action works correctly

Setup Tests

  • BeforeEach - Sets up common test configuration and data

All tests are automatically generated based on your Filament resource configuration and will only run when the relevant features are present in your resource (e.g., search tests only run if you have searchable columns).

Known Issues

  • Validation of RichEditor fields is not supported, this is due to the complexity of handling rich text content in tests.

Credits

  • CodeWithDennis
  • Dissto
  • All Contributors

License

The MIT License (MIT). Please see License File for more information.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPfilamentlaravelpestpestphp

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类后端框架
定价开源

> 相关工具

N
Node.js
基于 V8 的 JavaScript 运行时
D
Django
Python 高级 Web 框架
S
Spring Boot
Java 生态主流微服务框架