Files
famous-ly4-ev/app-modules/booking/tests/Feature/BookingsTodayWidgetTest.php
T
Nyan Lin Paing 60413bdebf Phase 7 dashboard widgets, Gitea CI, and branded landing page (T7.1)
- BookingsTodayWidget, RecentBookingsTableWidget (Booking module) and
  RevenueChartWidget, PaymentFailureRateWidget (Payment module) dashboard
  widgets, auto-registered via each plugin's existing discoverWidgets().
- .gitea/workflows/tests.yml: Postgres-backed Pest run on push/PR.
- Landing page (resources/views/welcome.blade.php) now shows the Famous
  Linnyone4 EV logo with a single admin login link, and the Filament admin
  panel uses the same logo as its brand logo.
2026-08-10 00:15:19 +07:00

23 lines
828 B
PHP

<?php
use App\Models\User;
use Livewire\Livewire;
use Modules\Booking\Enums\BookingStatus;
use Modules\Booking\Filament\Widgets\BookingsTodayWidget;
use Modules\Booking\Models\Booking;
test('it counts todays trips by status, ignoring other days', function () {
$this->actingAs(User::factory()->create());
Booking::factory()->create(['travel_date' => today(), 'status' => BookingStatus::Confirmed]);
Booking::factory()->create(['travel_date' => today(), 'status' => BookingStatus::PendingPayment]);
Booking::factory()->create(['travel_date' => today()->addDay(), 'status' => BookingStatus::Confirmed]);
Livewire::test(BookingsTodayWidget::class)
->assertOk()
->assertSee('Trips Today')
->assertSee('2')
->assertSee('Confirmed')
->assertSee('Awaiting Payment');
});