Filament form with laravel pest.

This test fail sometimes. Where am I do wrong?
it(
    'can ensure there are no validation errors',
    fn() => [
        actingAs(\App\Models\User::factory()->create()),

        ($status = \App\Models\Status::factory()->create([
            'name' => 'Status is opening',
        ])),

        ($category = \App\Models\Category::factory()->create([
            'name' => 'This is category one',
        ])),

        livewire(CreateFeeling::class)
            ->fillForm([
                'title' => fake()->sentence(),
                'description' => fake()->sentence(),
                'category_id' => $category->id,
                'status_id' => $status->id,
            ])
            ->call('create')
            ->assertHasNoFormErrors([
                'title' => 'required',
                'description' => 'required',
            ]),
    ],
);
Was this page helpful?