create([ 'role' => UserRole::ADMIN, ]); $hunt = Hunts::withoutSyncingToSearch(fn () => Hunts::factory()->create([ 'creator_id' => $admin->id, 'latitude' => 44.837789, 'longitude' => -0.57918, ])); $this->actingAs($admin); Livewire::test(StepsRelationManager::class, [ 'ownerRecord' => $hunt, 'pageClass' => EditHunts::class, ]) ->mountTableAction('create') ->assertTableActionDataSet([ 'latitude' => 44.837789, 'longitude' => -0.57918, 'location' => [ 'lat' => 44.837789, 'lng' => -0.57918, ], ]) ->assertFormFieldExists( 'hint_media_url', fn ($field): bool => $field instanceof FileUpload, ) ->assertFormFieldExists( 'latitude', fn ($field): bool => $field instanceof Hidden, ) ->assertFormFieldExists( 'longitude', fn ($field): bool => $field instanceof Hidden, ) ->assertFormFieldExists( 'location', fn ($field): bool => $field instanceof Map, ); });