test: Links on home page

This commit is contained in:
Leni Aniva 2024-09-28 15:25:19 -07:00
parent aa68aa8833
commit a66ee79e3c
Signed by: aniva
GPG Key ID: 4D9B1C8D10EA4C50
1 changed files with 15 additions and 0 deletions

View File

@ -5,3 +5,18 @@ test('home page has main and background', async ({ page }) => {
await expect(page.locator('main')).toBeVisible(); await expect(page.locator('main')).toBeVisible();
await expect(page.locator('#background')).toBeVisible(); await expect(page.locator('#background')).toBeVisible();
}); });
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/);
});