Test case in edit record page
How can create test case with pest to assert the view can be rendered, the inputs is disabled, and the button save is not exist..
I tried simple with :
The status code returns 403.
But when I tried in browser with same user, it's successfully rendered..
What should i do?
4 Replies
Regards the 403 error, check the actingAs and the user's permission.
https://filamentphp.com/docs/2.x/admin/testing#getting-started
Are you use your
$user
has correct permissions to enter filament admin. Because 403 would like be caused by thatin my opening thread above, i've posted the image of how the page behaviour if spesific user role open the editRecord page..
it can only view data details, the fields is disabled..
how can i assertSuccessful a detail record page?
sorry nevermind, solved it by asserting from get('/') method..