Skip to content
Snippets Groups Projects
Commit b15d736e authored by Ingrid Martinsheimen Egge's avatar Ingrid Martinsheimen Egge :cow2:
Browse files

sypress tester til navbar

parent e910ead7
No related branches found
No related tags found
1 merge request!21Merge profilinnstillinger into main
Pipeline #218812 failed
......@@ -3,6 +3,6 @@ const { defineConfig } = require('cypress')
module.exports = defineConfig({
e2e: {
specPattern: 'cypress/e2e/**/*.{cy,spec}.{js,jsx,ts,tsx}',
baseUrl: 'http://localhost:4173'
baseUrl: 'http://localhost:5173'
}
})
describe('Correct navigation links', () => {
/*TODO*/
it("is sent to error page if page does not exist", () => {
cy.visit('/qwerty')
cy.contains('#msg', '404')
})
it("navigates to settings page", () => {
cy.visit('/')
cy.get('#settingsIcon').click()
cy.url().should('include', '/profileSettings')
})
/*TODO: Other pages*/
})
describe('Navbar on all pages', () => {
/*TODO*/
it("front page has a navbar",()=> {
cy.visit('/')
cy.get('nav').should('exist')
})
it("settings page has a navbar",()=> {
cy.visit('/profileSettings')
cy.get('nav').should('exist')
})
/*TODO: other pages*/
})
\ No newline at end of file
......@@ -26,8 +26,8 @@
</RouterLink>
</li>
<li>
<RouterLink :to="'/'" :aria-label="'link to settings page'">
<Icon icon="mdi:cog" :color="iconColor" :style="{ fontSize: iconSize }"/>
<RouterLink :to="'/profileSettings'" :aria-label="'link to settings page'">
<Icon id="settingsIcon" icon="mdi:cog" :color="iconColor" :style="{ fontSize: iconSize }"/>
</RouterLink>
</li>
</ul>
......
<template>
<h1>404</h1>
<h1 id="msg">404</h1>
<h2>Oida, denne siden finnes ikke</h2>
<RouterLink to="/">Gå tilbake til forsiden</RouterLink>
</template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment