This commit is contained in:
2026-03-20 21:17:26 +01:00
parent 1a62fcb81d
commit 29c3ff8572
229 changed files with 13147 additions and 2577 deletions

View File

@@ -105,7 +105,7 @@ it('following tab returns 200 for users with no follows', function () {
$user = User::factory()->create();
$this->actingAs($user)
->get('/community/activity?type=following')
->get('/community/activity?filter=following')
->assertStatus(200);
});
@@ -127,10 +127,12 @@ it('following tab shows only events from followed users', function () {
// Event from non-followed user (should not appear)
ActivityEvent::record($other->id, ActivityEvent::TYPE_UPLOAD, ActivityEvent::TARGET_ARTWORK, $artwork->id);
$response = $this->actingAs($user)->get('/community/activity?type=following');
$response = $this->actingAs($user)->get('/community/activity?filter=following');
$response->assertStatus(200);
$events = $response->original->gatherData()['events'];
expect($events->total())->toBe(1);
expect($events->first()->actor_id)->toBe($creator->id);
$props = $response->viewData('props');
$events = collect($props['initialActivities'] ?? []);
expect($events)->toHaveCount(1);
expect(data_get($events->first(), 'user.id'))->toBe($creator->id);
});