seed(RolePermissionSeeder::class); $this->travelTo('2026-10-15 10:00:00'); } #[Test] public function the_month_shows_what_goes_live_comes_off_opens_and_closes(): void { $this->actingAs($this->userWithRoles('editor')); Page::factory()->published()->create(['title' => ['es' => 'Ya publicada'], 'published_at' => '2026-10-02 09:00']); Page::factory()->published()->create(['title' => ['es' => 'Programada'], 'published_at' => '2026-10-20 09:00']); Page::factory()->draft()->create(['title' => ['es' => 'Borrador con fecha'], 'published_at' => '2026-10-21 09:00']); Call::factory()->create(['title' => ['es' => 'Backend'], 'status' => CallStatus::Open, 'closes_at' => '2026-10-30']); Page::factory()->published()->create(['title' => ['es' => 'Otro mes'], 'published_at' => '2026-12-01 09:00']); Livewire::withQueryParams(['month' => '2026-10']) ->test(EditorialCalendar::class) ->assertSee('Ya publicada') ->assertSee('Programada') ->assertSee('Backend') ->assertDontSee('Borrador con fecha') ->assertDontSee('Otro mes') ->call('next') ->assertSet('month', '2026-11') ->call('today') ->assertSet('month', '2026-10'); } #[Test] public function the_page_opens(): void { $this->actingAs($this->userWithRoles('writer')); $this->get(EditorialCalendar::getUrl())->assertOk(); } }