diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-06-03 11:58:21 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-06-03 11:58:21 +0200 |
| commit | 6d0a9504406524957b351aee748d9f5c8a84c299 (patch) | |
| tree | 1b859015ef5e52b2c7c4e7521f428fb2215df21d /src/components/templates | |
| parent | a8af53c118478e6ed68975c32cc1202b7c7b798e (diff) | |
| parent | fc7a6e98268d34f313d79c817e38c09ad6cde960 (diff) | |
test: add end to end tests (#19)
In addition to Jest tests, I configure Cypress to test some pages and features.
I also fix some Jest errors due to images import.
Diffstat (limited to 'src/components/templates')
4 files changed, 4 insertions, 4 deletions
diff --git a/src/components/templates/layout/layout.test.tsx b/src/components/templates/layout/layout.test.tsx index 914e1cd..eab7a2a 100644 --- a/src/components/templates/layout/layout.test.tsx +++ b/src/components/templates/layout/layout.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@test-utils'; +import { render, screen } from '@tests/utils'; import Layout from './layout'; const body = diff --git a/src/components/templates/layout/layout.tsx b/src/components/templates/layout/layout.tsx index 982b099..693951e 100644 --- a/src/components/templates/layout/layout.tsx +++ b/src/components/templates/layout/layout.tsx @@ -1,4 +1,3 @@ -import photo from '@assets/images/armand-philippot.jpg'; import ButtonLink from '@components/atoms/buttons/button-link'; import Career from '@components/atoms/icons/career'; import CCBySA from '@components/atoms/icons/cc-by-sa'; @@ -18,6 +17,7 @@ import Script from 'next/script'; import { FC, ReactElement, ReactNode, useRef, useState } from 'react'; import { useIntl } from 'react-intl'; import { Person, SearchAction, WebSite, WithContext } from 'schema-dts'; +import photo from '/public/armand-philippot.jpg'; import styles from './layout.module.scss'; export type QueryAction = SearchAction & { diff --git a/src/components/templates/page/page-layout.test.tsx b/src/components/templates/page/page-layout.test.tsx index f2d07d7..b5480d8 100644 --- a/src/components/templates/page/page-layout.test.tsx +++ b/src/components/templates/page/page-layout.test.tsx @@ -1,5 +1,5 @@ import { comments } from '@components/organisms/layout/comments-list.fixture'; -import { render, screen } from '@test-utils'; +import { render, screen } from '@tests/utils'; import { BreadcrumbList } from 'schema-dts'; import PageLayout from './page-layout'; diff --git a/src/components/templates/sectioned/sectioned-layout.test.tsx b/src/components/templates/sectioned/sectioned-layout.test.tsx index 9b8bab5..73d7224 100644 --- a/src/components/templates/sectioned/sectioned-layout.test.tsx +++ b/src/components/templates/sectioned/sectioned-layout.test.tsx @@ -1,4 +1,4 @@ -import { render, screen } from '@test-utils'; +import { render, screen } from '@tests/utils'; import { BreadcrumbList } from 'schema-dts'; import SectionedLayout from './sectioned-layout'; |
