login()->loginNami(); $leiter = Activity::factory()->name('Leiter*in')->hasAttached(Subactivity::factory()->name('Rover'))->create(); $intern = Activity::factory()->name('Intern')->hasAttached(Subactivity::factory()->name('Lager'))->create(); $group = Group::factory()->create(); $response = $this->get('/group'); $this->assertInertiaHas('Leiter*in', $response, "activities.{$leiter->id}"); $this->assertInertiaHas('Intern', $response, "activities.{$intern->id}"); $this->assertInertiaHas('Rover', $response, "subactivities.{$leiter->id}.{$leiter->subactivities->first()->id}"); $this->assertInertiaHas('Lager', $response, "subactivities.{$intern->id}.{$intern->subactivities->first()->id}"); $this->assertInertiaHas($group->name, $response, "groups.{$group->id}"); } }