From a66ee79e3ce8c532bace5ac2212e837fbf1f3953 Mon Sep 17 00:00:00 2001 From: Leni Aniva Date: Sat, 28 Sep 2024 15:25:19 -0700 Subject: [PATCH] test: Links on home page --- tests/home.spec.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/home.spec.ts b/tests/home.spec.ts index 94569bc..f2cf542 100644 --- a/tests/home.spec.ts +++ b/tests/home.spec.ts @@ -5,3 +5,18 @@ test('home page has main and background', async ({ page }) => { await expect(page.locator('main')).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/); +});