diff --git a/frontend/cypress/e2e/1-getting-started/pages/landingpage.cy.js b/frontend/cypress/e2e/1-getting-started/pages/landingpage.cy.js new file mode 100644 index 0000000..02942ab --- /dev/null +++ b/frontend/cypress/e2e/1-getting-started/pages/landingpage.cy.js @@ -0,0 +1,54 @@ +const BASE_URL = "http://localhost:3000" +describe('Landing page', () => { + it('should load the landing page successfully', () => { + cy.visit(BASE_URL + "/"); + cy.url().should("eq", BASE_URL + "/") + }); +}); + +describe("Make sure landing page is visitable/ displays data properly", () => { + beforeEach(() => { + cy.visit(BASE_URL + "/") + }) + + it("test landingpage has navigation bar", () => { + cy.contains("Før Søknad") + cy.contains("Under Søknad") + cy.contains("Mottakskontroll") + }) + + it("landing page has welcoming paragraph", () => { + cy.get("#welcome-text").should("be.visible") + }) + + it("landing page has image", () => { + cy.get("#homepage-picture").should("be.visible") + }) +}); + +describe("Make sure navbar on landing page get you to intended target", () => { + beforeEach(() => { + cy.visit(BASE_URL + "/") + }) + + it("test før søknad", () => { + cy.contains("Før Søknad").click(); + cy.url().should("eq", BASE_URL +"/bygget") + }) + + it("test under søknad", () => { + cy.contains("Under Søknad").click(); + cy.url().should("eq", BASE_URL + "/soknad") + }) + + it("test Mottakskontroll", () => { + cy.contains("Mottakskontroll").click(); + cy.url().should("eq", BASE_URL + "/admin") + }) +}) + + + + + + diff --git a/frontend/package-lock.json b/frontend/package-lock.json index 78ae2dd..51577c6 100644 --- a/frontend/package-lock.json +++ b/frontend/package-lock.json @@ -48,7 +48,7 @@ "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^8.1.0", "@typescript-eslint/parser": "^8.1.0", - "cypress": "^13.14.2", + "cypress": "^13.15.0", "eslint": "^8.57.0", "eslint-config-next": "^14.2.4", "jest": "^29.7.0", @@ -4882,14 +4882,14 @@ "license": "MIT" }, "node_modules/cypress": { - "version": "13.14.2", - "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.14.2.tgz", - "integrity": "sha512-lsiQrN17vHMB2fnvxIrKLAjOr9bPwsNbPZNrWf99s4u+DVmCY6U+w7O3GGG9FvP4EUVYaDu+guWeNLiUzBrqvA==", + "version": "13.15.0", + "resolved": "https://registry.npmjs.org/cypress/-/cypress-13.15.0.tgz", + "integrity": "sha512-53aO7PwOfi604qzOkCSzNlWquCynLlKE/rmmpSPcziRH6LNfaDUAklQT6WJIsD8ywxlIy+uVZsnTMCCQVd2kTw==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { - "@cypress/request": "^3.0.1", + "@cypress/request": "^3.0.4", "@cypress/xvfb": "^1.2.4", "@types/sinonjs__fake-timers": "8.1.1", "@types/sizzle": "^2.3.2", diff --git a/frontend/package.json b/frontend/package.json index c3fd892..896cce4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -57,7 +57,7 @@ "@types/react-dom": "^18.3.0", "@typescript-eslint/eslint-plugin": "^8.1.0", "@typescript-eslint/parser": "^8.1.0", - "cypress": "^13.14.2", + "cypress": "^13.15.0", "eslint": "^8.57.0", "eslint-config-next": "^14.2.4", "jest": "^29.7.0", diff --git a/frontend/public/homepagepicture.jpg b/frontend/public/homepagepicture.jpg new file mode 100644 index 0000000..1c61efb Binary files /dev/null and b/frontend/public/homepagepicture.jpg differ diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index 10c505c..60f9627 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -1,20 +1,33 @@ import Link from "next/link"; +import Image from "next/image"; export default async function Home() { return ( -
-
+
+ {/* + TODO: remove when navbar is added + */} +
- Grenssesnitt 1 (meld fra om bygging) + Før Søknad - Grenssesnitt 2 (søk om byggetillatelse) + Under Søknad - Grenssesnitt 3 (admin dashboard) + Mottakskontroll
+ +
+
+

KartAI

+

Et verktøy for å effektivisere og hjelpe innbyggere med byggesøknadsprossessen ved å ta i bruk kunstig intelligens.

+

Ved at innbyggere tar i bruk digitale selvbetjeningsløsninger, sparer både kommune og innbyggere tid, ressurser og penger.

+
+ Lanskapsbilde +
); } diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..7e1d23e --- /dev/null +++ b/package-lock.json @@ -0,0 +1,7 @@ +{ + "name": "ntnu-kpro-ai-assistant", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": {} +}