complete story 7.5 with qa tests

This commit is contained in:
Naser Mansour
2025-12-29 00:11:04 +02:00
parent 97c6cfe72f
commit a880b3fd1d
6 changed files with 225 additions and 21 deletions
@@ -20,6 +20,33 @@ beforeEach(function () {
]);
});
// Navigation Tests
test('client sees book now link in navigation', function () {
$client = User::factory()->individual()->create();
$this->actingAs($client)
->get(route('client.dashboard'))
->assertOk()
->assertSee(__('navigation.book_now'));
});
test('book now link navigates to booking page', function () {
$client = User::factory()->individual()->create();
$this->actingAs($client)
->get(route('client.consultations.book'))
->assertOk();
});
test('admin does not see book now link', function () {
$admin = User::factory()->admin()->create();
$this->actingAs($admin)
->get(route('admin.dashboard'))
->assertOk()
->assertDontSee(__('navigation.book_now'));
});
test('guest cannot access booking form', function () {
$this->get(route('client.consultations.book'))
->assertRedirect(route('login'));