diff --git a/frontend/src/components/__tests__/header.cy.tsx b/frontend/src/components/__tests__/header.cy.tsx deleted file mode 100644 index 4337346c8..000000000 --- a/frontend/src/components/__tests__/header.cy.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import Header from '@components/header'; - -const headerId = '[data-cy=header]'; -const drawerButtonId = '[data-cy=drawer-button]'; - -describe('Header', () => { - it('renders without crashing', () => { - cy.mount(
); - cy.get(headerId).should('exist'); - }); - - it('renders correctly', () => { - cy.mount(
); - cy.get(headerId).should('exist'); - cy.get('[data-cy=header-logo]').should('exist'); - cy.get('[data-cy=navbar-standard]').should('exist'); - cy.get(drawerButtonId).should('exist'); - }); - - it('drawer button opens a Chakra drawer on mobile', () => { - cy.mount(
); - const drawerButton = cy.get(drawerButtonId); - - drawerButton.should('exist'); - drawerButton.click({ force: true }); - cy.get('[data-cy=nav-links]').should('exist'); - }); -}); diff --git a/frontend/src/components/__tests__/navbar.cy.tsx b/frontend/src/components/__tests__/navbar.cy.tsx deleted file mode 100644 index 01dede122..000000000 --- a/frontend/src/components/__tests__/navbar.cy.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { createRef } from 'react'; -import NavBar from '@components/navbar'; - -describe('NavBar', () => { - it('renders without crashing', () => { - const btnRef = createRef(); - cy.mount( - { - return; - }} - btnRef={btnRef} - />, - ); - cy.get('[data-cy=navbar-standard]').should('exist'); - }); - - it('renders correctly', () => { - const btnRef = createRef(); - cy.mount( - { - return; - }} - btnRef={btnRef} - />, - ); - - cy.get('[data-cy=hjem]').should('exist'); - cy.get('[data-cy=om-oss]').should('exist'); - cy.get('[data-cy=colormode-button]').should('exist'); - }); -});