travelTo(CarbonImmutable::parse('2026-10-22 10:00')); $this->seed(PropertySeeder::class); } public function test_dashboard_shows_key_figures_and_upcoming_stays(): void { $this->actingAs(User::factory()->create()); $property = Property::sole(); Booking::factory()->for($property)->reserved()->create(['arrival' => '2026-12-01', 'departure' => '2026-12-05']); $soon = Booking::factory()->for($property)->create(['status' => BookingStatus::Confirmed, 'arrival' => '2026-10-30', 'departure' => '2026-11-02', 'deposit_due_on' => '2026-10-20']); $this->get('/admin')->assertOk(); Livewire::test(BookingStats::class)->assertSee('Offene Anfragen')->assertSee('1 überfällig'); Livewire::test(UpcomingStays::class)->assertCanSeeTableRecords([$soon]); } public function test_content_role_does_not_see_booking_widgets(): void { $this->actingAs(User::factory()->role(UserRole::Content)->create()); $this->assertFalse(BookingStats::canView()); $this->get('/admin')->assertOk()->assertDontSee('Offene Anfragen'); } }