2025-12-29 23:36:15 +01:00
|
|
|
<?php
|
|
|
|
|
|
2026-08-19 02:09:42 +02:00
|
|
|
it('can access the schedule page', function () {
|
|
|
|
|
loginAndGoToSchedule()
|
|
|
|
|
->assertSee('SCHEDULE')
|
|
|
|
|
->assertSee('Generate Schedule');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('shows the month navigation', function () {
|
|
|
|
|
loginAndGoToSchedule()
|
|
|
|
|
->assertPresent('button[wire\:click="previousMonth"]')
|
|
|
|
|
->assertPresent('button[wire\:click="nextMonth"]')
|
|
|
|
|
->assertSee(now()->format('F Y'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('can navigate to the next month', function () {
|
|
|
|
|
$nextMonth = now()->addMonth();
|
|
|
|
|
|
|
|
|
|
loginAndGoToSchedule()
|
|
|
|
|
->click('button[wire\:click="nextMonth"]')
|
|
|
|
|
->assertSee($nextMonth->format('F Y'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('can navigate to the previous month', function () {
|
|
|
|
|
$previousMonth = now()->subMonth();
|
|
|
|
|
|
|
|
|
|
loginAndGoToSchedule()
|
|
|
|
|
->click('button[wire\:click="previousMonth"]')
|
|
|
|
|
->assertSee($previousMonth->format('F Y'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('shows the user selection', function () {
|
|
|
|
|
loginAndGoToSchedule()
|
|
|
|
|
->assertSee('Select Users')
|
|
|
|
|
->assertPresent('button[wire\:click="generate"]')
|
|
|
|
|
->assertPresent('button[wire\:click="clearMonth"]');
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
it('shows the days of the week', function () {
|
|
|
|
|
loginAndGoToSchedule()
|
|
|
|
|
->assertSee('Mon')
|
|
|
|
|
->assertSee('Tue')
|
|
|
|
|
->assertSee('Wed')
|
|
|
|
|
->assertSee('Thu')
|
|
|
|
|
->assertSee('Fri')
|
|
|
|
|
->assertSee('Sat')
|
|
|
|
|
->assertSee('Sun');
|
|
|
|
|
});
|