From 256c6566adaaf767201c055b9ffab24534a5e1c5 Mon Sep 17 00:00:00 2001 From: Nabil Al-Ashbat Date: Wed, 29 Nov 2023 11:27:51 +0300 Subject: [PATCH] feat: :sparkles: update cypress tests and add about page Changes include: - cypress/e2e/app.cy.ts: Update Cypress end-to-end tests - src/app/about/page.tsx: Add new About page - src/app/page.tsx: Modify existing page This commit Updates Cypress tests and adds About page for e2e test simulation. --- cypress/e2e/app.cy.ts | 6 ++++++ src/app/about/page.tsx | 11 +++++++++++ src/app/page.tsx | 10 ++++++++++ 3 files changed, 27 insertions(+) create mode 100644 src/app/about/page.tsx diff --git a/cypress/e2e/app.cy.ts b/cypress/e2e/app.cy.ts index c2c1f1d..f166e35 100644 --- a/cypress/e2e/app.cy.ts +++ b/cypress/e2e/app.cy.ts @@ -16,6 +16,12 @@ describe('Navigation', () => { // The new page should contain an h1 with "About page" cy.get('h1').contains('About Page') + + // Go back to home page + cy.go('back') + + // The url should be "/" + cy.url().should('not.include', '/about') }) }) diff --git a/src/app/about/page.tsx b/src/app/about/page.tsx new file mode 100644 index 0000000..636fadb --- /dev/null +++ b/src/app/about/page.tsx @@ -0,0 +1,11 @@ +import AboutComponent from '@/components/about/about-component' + +export default function About() { + return ( +
+
+ +
+
+ ) +} diff --git a/src/app/page.tsx b/src/app/page.tsx index f1ab86a..db0c6bc 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,4 +1,5 @@ import Image from 'next/image' +import Link from 'next/link' export default function Home() { return ( @@ -28,6 +29,15 @@ export default function Home() { +
+ + About + +
+