-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test helpers create invalid to Builder json order #10767
Comments
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 |
danharrin
added
enhancement
New feature or request
and removed
bug
Something isn't working
unconfirmed
labels
Jan 20, 2024
#12759 adds additional documentation and a new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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, the
itemLabel
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
cp .env.example .env touch database/database.sqlite composer install php artisan migrate:fresh --seed php artisan test
Reproduction repository
https://github.com/fritz-c/filament-repeater-test-bug
Relevant log output
The text was updated successfully, but these errors were encountered: