diff --git a/src/lib/components/Projects.svelte b/src/lib/components/Projects.svelte
index d166449..b2a6830 100644
--- a/src/lib/components/Projects.svelte
+++ b/src/lib/components/Projects.svelte
@@ -1,10 +1,11 @@
-
+
Featured Projects
@@ -52,7 +53,7 @@
Try it Now
diff --git a/src/lib/utils/menuItems.js b/src/lib/utils/menuItems.js
index c34f4c0..f2b5ce6 100644
--- a/src/lib/utils/menuItems.js
+++ b/src/lib/utils/menuItems.js
@@ -5,7 +5,8 @@ export const Section = {
Media: 'Media',
Contributors: 'Contributors',
Contact: 'Contact',
- About: 'About'
+ About: 'About',
+ Projects: 'Projects',
};
export const menuItems = [
@@ -19,6 +20,11 @@ export const menuItems = [
name: 'About',
icon: IconCar
},
+ {
+ ref: `#${Section.Projects}`,
+ name: 'Projects',
+ icon: IconCar
+ },
{
ref: `#${Section.Media}`,
name: 'Media',
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();