From 75c3bf6cbca9720369475245f4eb673639597425 Mon Sep 17 00:00:00 2001 From: Sindre Kjelsrud Date: Fri, 4 Aug 2023 12:48:36 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9C=85=20Legger=20til=20testing=20av=20s?= =?UTF-8?q?=C3=B8kefunksjonalitet?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/cypress/e2e/sokEtterFeil.cy.ts | 16 ++++++++++++++++ frontend/src/index.tsx | 1 + 2 files changed, 17 insertions(+) create mode 100644 frontend/cypress/e2e/sokEtterFeil.cy.ts diff --git a/frontend/cypress/e2e/sokEtterFeil.cy.ts b/frontend/cypress/e2e/sokEtterFeil.cy.ts new file mode 100644 index 0000000..c529dd9 --- /dev/null +++ b/frontend/cypress/e2e/sokEtterFeil.cy.ts @@ -0,0 +1,16 @@ +describe('Sjekker søkefunksjonalitet', () => { + context('Loader landingsside i riktig dimensjon', () => { + beforeEach(() => { + cy.viewport(1920, 1080) + cy.visit('http://localhost:5173/') + }) + + it('sjekker axe', () => { + cy.checkPageA11y() + }) + + it('Klarer å søke etter en spesifik feil: "Mangel på hensyn til tariffoppgjør"', () => { + cy.getByTestId('soke-inputfelt').type('Man') + }) + }) +}) \ No newline at end of file diff --git a/frontend/src/index.tsx b/frontend/src/index.tsx index 7ad79d3..04273cc 100644 --- a/frontend/src/index.tsx +++ b/frontend/src/index.tsx @@ -59,6 +59,7 @@ export default function Home() { Innmeldte feil