pest 403 for List page
Hello
I try to write a pest test to test the table.
asAdmin
assertSuccessful fails because of 403.
And yes, I do have canAccessPanel in User model, it just returns true. On production I am able to login and access the resource.
4 Replies
Did you double-check
$this->user->permissions
inside the test?Yes, permissions are set. But somehow livewire() is not triggering my middleware. Because I also test with get() if I am able to see / not see index page of the resource.
Maybe you could temporarily bypass the permissions to check if that’s causing the issue
Yes, works. Just commented out policy