This commit is contained in:
2026-05-03 09:21:13 +02:00
parent 44354e5bea
commit 90e93f0d42
18 changed files with 2831 additions and 347 deletions

View File

@@ -0,0 +1,39 @@
<?php
declare(strict_types=1);
namespace Tests\Feature\Admin;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Testing\Fluent\AssertableJson;
use Inertia\Testing\AssertableInertia;
use Tests\TestCase;
final class ModerationDailyActivityPageTest extends TestCase
{
use RefreshDatabase;
public function test_admin_can_open_daily_activity_page_with_selected_date(): void
{
$admin = User::factory()->create([
'role' => 'admin',
]);
$this->actingAs($admin)
->get('/moderation/activity?date=2026-04-29')
->assertOk()
->assertInertia(fn (AssertableInertia $page) => $page
->component('Admin/DailyActivity')
->where('selectedDate', '2026-04-29')
->where('summary.new_users', 0)
->where('queues.pending_uploads', 0)
->has('sections.users')
->has('sections.artworks')
->has('sections.stories')
->has('sections.uploads')
->has('sections.reports')
->has('sections.username_requests')
->has('sections.auth_events'));
}
}