How to test repeater value in filament form?
Please confirmed my test is good or not? Please suggest how to test repeater in filament?
10 Replies
Instead of
assertStatus
I guess you could check that the item was really created in the DB?Yes
when I use
->assertHasNoFormErrors();
that gives me error.
Not sure but I'm thinking the grouping is off in your example above. Should it be something like this?
yes I'm trying like this. It's not working.
https://github.com/filamentphp/filament/discussions/8459
Still stuck
Can you share your complete form and test in a Gist on Github? I'll have a look.
Sorry for late reply
https://gist.github.com/ShaungBhone/fcf7545fb887dd1bae072d97da58ed60
Can you share the form code as well?
@shaungbhone I think the general approach with the Repeaters in your tests is good. I mean, I'm not 100% sure but my guess is that your tests are failing because of actual validation errors. Maybe some of the dates, etc. Try to remove all validation and re-introduce it field by field. Make sure the test is passing after each step.
Yes let me try
Thank you so much.