Closed fritz-c closed 6 months ago
Hey @fritz-c! We're sorry to hear that you've hit this issue. 💛
However, it doesn't look like you've provided much information on how to replicate the issue. Please edit your original post with clear steps we need to take.
Thank you for providing reproduction steps! Reopening the issue now.
Similar to #10246
::fake()
method for testing without UUIDs
Package
filament/filament
Package Version
v3.1.43
Laravel Version
10.40.0
Livewire Version
v3.3.5
PHP Version
8.2.9
Problem description
When testing resources that use the Repeater component, the
fillForm
method, due to its approach of deep-filling data one value at a time, will create invalid states that do not occur in normal use. In my repro, theitemLabel
callback has an assumption that$state
is pre-loaded with the keys corresponding to the repeater items' schema, with each key's value initialized to null when nothing has been set yet.This assumption is valid when rendering the form normally, but is not correct when in the test environment using the test helpers, causing errors.
Expected behavior
The
livewire
test helper and itsfillForm
method should initialize form state for tests in a fashion identical to normal form rendering.Steps to reproduce
See the repro README
But since your automation seems to be care about character length, here's a dump of the repro steps from there.
Setup and reproduction
Reproduction repository
https://github.com/fritz-c/filament-repeater-test-bug
Relevant log output