login()->loginNami(); auth()->user()->update(['firstname' => 'Jane', 'lastname' => 'Doe']); User::factory()->create(['firstname' => 'John', 'lastname' => 'Doe']); $anna = User::factory()->create(['firstname' => 'Anna', 'lastname' => 'Doe']); $this->get(route('setting.view', ['settingGroup' => 'user'])) ->assertOk() ->assertComponent('setting/User') ->assertInertiaPath('data.data.0.firstname', 'Anna') ->assertInertiaPath('data.data.0.lastname', 'Doe') ->assertInertiaPath('data.data.0.id', $anna->id) ->assertInertiaPath('data.data.0.links.update', route('user.update', ['user' => $anna])) ->assertInertiaPath('data.data.1.firstname', 'Jane') ->assertInertiaPath('data.data.2.firstname', 'John') ->assertInertiaPath('data.meta.default.firstname', '') ->assertInertiaPath('data.meta.default.email', '') ->assertInertiaPath('data.meta.links.store', route('user.store')); } }