complete story 7.5 with qa tests
This commit is contained in:
@@ -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'));
|
||||
|
||||
Reference in New Issue
Block a user