nät
nät
FFilament
Created by nät on 1/19/2024 in #❓┊help
Testing
My test 'it can display a page' does not count the one's that are created in factory
beforeEach(function () {
$org = Organization::factory()->create();
$users = User::factory()->create();
$adminRole = Role::create(['name' => 'super_admin', 'organization_id' => 1]);

setPermissionsTeamId($org->id);

$users->organization()->associate($org);
$users->assignRole($adminRole);

Filament::setCurrentPanel(Filament::getPanel('admin'));

actingAs(User::first());

Gate::before(function (User $user) {
return $user->where('super_admin') ? true : null;
});
});

it('can display a page', function () {
$user = User::factory()->count(3)->create();
// dd($user->count());
livewire(ListUsers::class)
->assertCanSeeTableRecords($user)
->assertCountTableRecords($user->count())
->assertOk();
});
beforeEach(function () {
$org = Organization::factory()->create();
$users = User::factory()->create();
$adminRole = Role::create(['name' => 'super_admin', 'organization_id' => 1]);

setPermissionsTeamId($org->id);

$users->organization()->associate($org);
$users->assignRole($adminRole);

Filament::setCurrentPanel(Filament::getPanel('admin'));

actingAs(User::first());

Gate::before(function (User $user) {
return $user->where('super_admin') ? true : null;
});
});

it('can display a page', function () {
$user = User::factory()->count(3)->create();
// dd($user->count());
livewire(ListUsers::class)
->assertCanSeeTableRecords($user)
->assertCountTableRecords($user->count())
->assertOk();
});
6 replies
FFilament
Created by nät on 1/17/2024 in #❓┊help
Missing parameter {tenant}
No description
2 replies
FFilament
Created by nät on 1/4/2024 in #❓┊help
All options for admin
No description
4 replies
FFilament
Created by nät on 12/22/2023 in #❓┊help
UPDATE TABLE
there's a way to update your data table, while your filter isn't complete? I'm trying but my filter only does the research after all the fields completed
1 replies
FFilament
Created by nät on 12/22/2023 in #❓┊help
My table data disappears when I put a custom filter
No description
10 replies