From 3cbae7431978a365ee5a269120224ae481a22955 Mon Sep 17 00:00:00 2001 From: Ainsof So'o Date: Thu, 11 Apr 2024 12:51:14 +1300 Subject: [PATCH] add test --- tests/test.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tests/test.js b/tests/test.js index 51e5292..727e417 100644 --- a/tests/test.js +++ b/tests/test.js @@ -3,12 +3,17 @@ import { expect, test } from '@playwright/test'; test('Hero section has expected p', async ({ page }) => { await page.goto('/'); await expect( - page.getByText( - 'Press Join us Now to find out more about becoming a Samoa Code Hub Member' - ) + page.getByText('Press Join us Now to find out more about becoming a Samoa Code Hub Member') ).toBeVisible(); }); + +test('Clicking "Projects" button navigates to projects page and displays Featured Projects h1', async ({ page }) => { + await page.goto('/'); + await page.click('text=Projects'); + await expect(page.locator('h1:has-text("Featured Projects")')).toBeVisible(); +}); + test('Media section has expected h1', async ({ page }) => { await page.goto('/'); await expect(page.getByText('Samoa Code Hub Meet Ups')).toBeVisible();