30 Commits
Author SHA1 Message Date
d91c365104 Update testing form actions docs with new form-actions key (#17887)
* updates docs

* Update 05-testing-actions.md

* Document testing create and edit form actions

Added sections for testing create and edit form actions using TestAction in the documentation.

* Modifies action section to essentially a footnote

Removed example code for testing form actions and updated references to documentation for testing create and edit form actions.

* clean up and reduce duplication

---------

Co-authored-by: mrkbingham <mark.bingham@interworks.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2025-09-24 17:27:52 +01:00
Dan Harrin 84288a89b1 Add Aside component import to testing tables doc 2025-09-22 08:34:13 +01:00
MerdinandDan Harrin 22fc471a80 Update 03-testing-tables.md - "Testing that a column can be sorted" (#17871)
* Issue #17817: Update 03-testing-tables.md - "Testing that a column can be sorted"

Currently, the documentation includes a flaky test as an example for sorting a column. This is because Filament sorts its table records according to the underlying database strategy.

Previously, the documentation suggested using the `sortBy()` method on the collection returned by the factory. However, this approach does not account for differences in how various databases handle sorting, which can lead to inconsistent test results.

With this commit, the documentation has been updated.
The example test now uses a stable approach that explicitly orders records through the database query, ensuring reliable behavior across different database systems.

Signed-off-by: Merdin <me@merdin.dev>

* Update 03-testing-tables.md - "Testing that a column can be sorted"

Improve query

Signed-off-by: Merdin <me@merdin.dev>

* Update 03-testing-tables.md

Change `orderBy('title', 'desc')` to `orderByDesc('title')` to improve code readability.

Signed-off-by: Merdin <me@merdin.dev>

* Update 03-testing-tables.md

Signed-off-by: Merdin <me@merdin.dev>

* Refactor post sorting in test to use query builder

Signed-off-by: Dan Harrin <git@danharrin.com>

* Fix sorting order for posts by title

Signed-off-by: Dan Harrin <git@danharrin.com>

---------

Signed-off-by: Merdin <me@merdin.dev>
Signed-off-by: Dan Harrin <git@danharrin.com>
Co-authored-by: Dan Harrin <git@danharrin.com>
2025-09-20 12:46:02 +01:00
M. D. 3791361412 docs: Fixes syntax error 2025-09-17 03:18:34 +02:00
Dan Harrin de62176c47 Update 04-testing-schemas.md 2025-09-03 11:32:50 +01:00
M. D. 4c5e6df349 Refactor comments section tests for schema components
The shown example would lead to an error:

```php
 Livewire\Features\SupportTesting\Testable::{closure:Filament\Schemas\Testing\TestsSchemas::assertSchemaComponentExists():25}(): Argument #2 ($schema) must be of type ?string, Closure given,
```

because the 2nd parameter is expected to be a `Schema`

I suppose there is two options now, adding `null` as 2nd parameter in the examples or simply using named arguments. Named arguments looked like the better approach 😊
2025-09-03 12:21:07 +02:00
phuong 90e01dad19 Fix spelling errors in 4.x docs 2025-07-05 20:06:28 +07:00
Patrick Boivin b51f4eb91f Update 04-testing-schemas.md 2025-06-17 12:03:01 -04:00
Dan Harrin 0ebba01802 Update 04-testing-schemas.md 2025-06-12 10:33:41 +01:00
Dan Harrin e386bcd419 resources tests 2025-04-22 10:21:37 +01:00
Dan Harrin 60d161f8e9 more testing improvements 2025-04-21 22:46:49 +01:00
Dan Harrin 12d02a96b6 rename assertSchemaSet to assertSchemaStateSet 2025-04-21 17:22:29 +01:00
Dan Harrin e20addfbf2 Update 01-overview.md 2025-04-21 17:09:39 +01:00
Dan Harrin 1d36322c74 testing overview docs 2025-04-21 17:04:26 +01:00
Dan Harrin 764253860b update docs links 2025-04-21 16:55:45 +01:00
Dan Harrin 95dc1929ab testing repeaters and builders 2025-04-21 16:50:33 +01:00
Dan Harrin 9e72a8b15b Update 04-testing-schemas.md 2025-04-21 16:48:54 +01:00
Dan Harrin 63a0e4a99e docs 2025-04-21 16:48:26 +01:00
Dan Harrin 3ba4407251 restructure testing docs 2025-04-21 16:46:29 +01:00
Dan Harrin 0d4c2511d3 Replace old usages of methods 2025-04-21 16:20:10 +01:00
Dan Harrin 49522f4b64 replace old methods 2025-04-21 16:09:03 +01:00
Dan Harrin e8e764ef7f Update 05-testing-actions.md 2025-04-21 15:24:09 +01:00
Dan Harrin 6769deb392 assertSchemaSet 2025-04-21 13:01:26 +01:00
Dan Harrin eb7e735b76 Update 05-testing-actions.md 2025-04-21 11:55:28 +01:00
Dan Harrin 15f6e95766 work on testing 2025-04-21 11:15:32 +01:00
Dan Harrin e3bf27d301 testing 2025-04-20 10:57:00 +01:00
Dan Harrin f9a6d512b8 make overview/intro headings consistent 2025-03-17 11:13:14 +00:00
Dan Harrin 7701a1b99a docs 2025-03-06 10:30:52 +00:00
Dan Harrin 51b02920f2 move fields and entries docs into schemas 2025-02-23 09:03:19 +00:00
Dan Harrin d4a3e0b538 wip 2025-02-22 19:19:00 +00:00