Defer profile world history until needed

This commit is contained in:
test
2026-08-30 12:02:07 +02:00
parent 5c80402aed
commit 937f484cc9
8 changed files with 282 additions and 11 deletions
@@ -95,7 +95,7 @@ it('exposes normalized world history on public profile pages', function (): void
'awarded_at' => now()->subHour(),
]);
$this->get(route('profile.show', ['username' => strtolower((string) $creator->username)]))
$this->get(route('profile.tab', ['username' => strtolower((string) $creator->username), 'tab' => 'worlds']))
->assertOk()
->assertInertia(fn (AssertableInertia $page) => $page
->component('Profile/ProfileShow')
@@ -161,7 +161,7 @@ it('filters stale public world rewards while preserving owner-only context count
'status' => WorldSubmission::STATUS_PENDING,
]);
$this->get(route('profile.show', ['username' => strtolower((string) $creator->username)]))
$this->get(route('profile.tab', ['username' => strtolower((string) $creator->username), 'tab' => 'worlds']))
->assertOk()
->assertInertia(fn (AssertableInertia $page) => $page
->component('Profile/ProfileShow')
@@ -170,7 +170,7 @@ it('filters stale public world rewards while preserving owner-only context count
->where('worldHistory.owner_context', null));
$this->actingAs($creator)
->get(route('profile.show', ['username' => strtolower((string) $creator->username)]))
->get(route('profile.tab', ['username' => strtolower((string) $creator->username), 'tab' => 'worlds']))
->assertOk()
->assertInertia(fn (AssertableInertia $page) => $page
->component('Profile/ProfileShow')
@@ -223,4 +223,4 @@ it('supports the canonical worlds profile tab route', function (): void {
->where('profileTabUrls.worlds', url('/@' . strtolower((string) $creator->username) . '/worlds'))
->where('worldHistory.summary.available', true)
->where('worldHistory.entries.0.primary_recognition.key', 'featured'));
});
});