create([ 'role' => 'user', 'level' => 1, 'created_at' => now()->subYear(), ]); $this->actingAs($user) ->get('/upload') ->assertOk() ->assertInertia(fn (Assert $page) => $page ->component('Upload/Index') ->where('requires_upload_review', true) ->missing('approved_uploads') ->missing('reasons')) ->assertDontSee('insufficient_approved_uploads', false) ->assertDontSee('minimum_approved_uploads', false); }); it('does not show the new-creator review warning for trusted uploaders', function (): void { $user = User::factory()->create([ 'role' => 'user', 'level' => 1, 'created_at' => now()->subYear(), ]); Artwork::factory()->for($user)->count(5)->create([ 'is_approved' => true, 'is_public' => true, 'artwork_status' => 'published', 'published_at' => now()->subDay(), 'approval_source' => null, ]); $this->actingAs($user) ->get('/upload') ->assertOk() ->assertInertia(fn (Assert $page) => $page ->component('Upload/Index') ->where('requires_upload_review', false)); }); it('does not show the new-creator review warning for admins', function (): void { $admin = User::factory()->create(['role' => 'admin']); $this->actingAs($admin) ->get('/upload') ->assertOk() ->assertInertia(fn (Assert $page) => $page ->component('Upload/Index') ->where('requires_upload_review', false)); });