2024-09-28 15:18:09 -07:00
|
|
|
import { expect, test } from '@playwright/test';
|
|
|
|
|
|
|
|
test('home page has main and background', async ({ page }) => {
|
|
|
|
await page.goto('/');
|
|
|
|
await expect(page.locator('main')).toBeVisible();
|
|
|
|
await expect(page.locator('#background')).toBeVisible();
|
|
|
|
});
|
2024-09-28 15:25:19 -07:00
|
|
|
test('home page bio button', async ({ page }) => {
|
|
|
|
await page.goto('/');
|
|
|
|
await page.getByRole('link', { name : 'Bio' }).click();
|
|
|
|
await expect(page).toHaveURL('/#bio');
|
|
|
|
});
|
|
|
|
test('home page blog button', async ({ page }) => {
|
|
|
|
await page.goto('/');
|
|
|
|
await page.getByText('Blog').click();
|
|
|
|
await expect(page).toHaveURL(/post/);
|
|
|
|
});
|
|
|
|
test('home page archives button', async ({ page }) => {
|
|
|
|
await page.goto('/');
|
|
|
|
await page.getByText('Archives').click();
|
|
|
|
await expect(page).toHaveURL(/archives/);
|
|
|
|
});
|