How can I test a form from a modal? (simple resource)
I have some resources made with --simple flag, so they don't have
Create
, Edit
or View
pages, only the Manage
class. I would like to know 2 things, how to assert the modal rendering and how to test the form (because the fillForm
seems to not work in this case).
1 - is this a good assertion for the "render modal test"?
2 - how to use the fillForm for modals?
Solution:Jump to solution
```php
$data = [
'title' => 'Title',
'description' => 'Description',
......
5 Replies
anyone?
Solution
that don't work as well, I think that is because the assertion is for Create or Edit resources classes, but I'm not sure, I got this error:
Using this test:
I have similar tests for resources that have the crud pages, and they work just fine
yes, because you are using
assertHasNoFormErrors
instead of assertHasNoActionErrors
Oh, sorry, I misread. That works. Thank you very much