Richard
Richard
FFilament
Created by Richard on 2/2/2024 in #❓┊help
Test EditUser livewire class gives 403
What I am trying to do: I am trying to setup tests for the EditUser class in my app. I use Pest. When I create the livewire instance and dump it I get the default 403 view. Please see the code below. What I did: I checked if my acting as user can update the other user with the UserPolicy. This method returns true. I checked if the canAccessPanel method of Filament in the User model gets called. It doesn't get called. I am not sure if it should be called during tests though. Also i checked the value of the record of the edit page. It's null. Please see the code below to check how I pass the id of the record to the class. My issue/the error: When I dump the livewire instance, I see the html of the default 403 page. However, I expect it to give the edit page. Code:
$this->actingAs($adminUser);

livewire(EditUser::class, ['record' => $normalUser->getRouteKey()]);
$this->actingAs($adminUser);

livewire(EditUser::class, ['record' => $normalUser->getRouteKey()]);
4 replies
FFilament
Created by Richard on 3/13/2023 in #❓┊help
Custom breakpoints with $columnSpan property
Does anyone know if it's possible to use custom defined Tailwind breakpoints within the $columnSpan property for Filament dashboard widgets? For example, I have an '3xl' (2000px) custom breakpoint in Tailwind. When I use it in the $columnSpan property, nothing changes in the front-end when I change my screen to 2001px. Thanks in advance 🙂
12 replies