diff --git a/e2e/test/specs/test.e2e.ts b/e2e/test/specs/test.e2e.ts index 746348c..49aaf94 100644 --- a/e2e/test/specs/test.e2e.ts +++ b/e2e/test/specs/test.e2e.ts @@ -33,6 +33,24 @@ describe('Guestbook application', () => { expect(paragraphText).toBe('This is a guestbook.'); }); + it('should have a contact us page with header and paragraph', async () => { + await browser.url(baseUrl + '/contact') + + let browserTitle = ''; + await browser.getTitle().then((title) => { + browserTitle = title; + }); + + const aboutUsHeader = await $('#about-us'); + const aboutUsParagraph = await $('#about-us-paragraph'); + const headerText = await aboutUsHeader.getText(); + const paragraphText = await aboutUsParagraph.getText(); + + await expect(browserTitle === 'Contact us').toBe(true); + expect(headerText).toBe('Contact us'); + expect(paragraphText).toBe('This is how to contact us: my-email@gmail.com'); + }); + it.skip('should redirect non-authenticated user to GitHub SSO ', async () => { const MAX_ATTEMPTS = 20; const RETRY_INTERVAL = 2000; // Retry every 2 seconds diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx new file mode 100644 index 0000000..46d88cc --- /dev/null +++ b/src/app/contact/page.tsx @@ -0,0 +1,16 @@ +import {Metadata} from "next"; + +export const metadata: Metadata = { + title: "Contact us", + description: "This is how to contact us: my-email@gmail.com", +}; + +export default async function Contact() { + return ( +
+

About us

+

This is how to contact + us: my-email@gmail.com

+
+ ) +} \ No newline at end of file