Files
holiday-property-booking/tests/e2e/home.spec.ts

22 lines
1.1 KiB
TypeScript

import { expect, test } from '@playwright/test';
test.describe('homepage', () => {
test('renders the public browsing entry point and primary navigation', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'Holiday Property Booking' })).toBeVisible();
await expect(page.getByRole('navigation', { name: 'Primary' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Explore featured stays' })).toHaveAttribute('href', '/#browse');
await expect(page.getByRole('link', { name: 'Contact the team' })).toHaveAttribute('href', '/contact');
});
test('shows the public content sections', async ({ page }) => {
await page.goto('/');
await expect(page.getByRole('heading', { name: 'A few properties guests can imagine themselves in' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Editorial content keeps the journey understandable' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Location highlights' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'A clear contact route is already live' })).toBeVisible();
});
});