From 97457f54cb574a5812ac76e3d83edd65c90067db Mon Sep 17 00:00:00 2001 From: Sammy Teillet Date: Wed, 19 Apr 2023 14:25:27 +0200 Subject: [PATCH] test: rename test and remove useless nav wrapper --- front/src/components/chips/__stories__/CompanyChip.tsx | 10 ++-------- .../components/chips/__tests__/CompanyChip.test.tsx | 4 ++-- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/front/src/components/chips/__stories__/CompanyChip.tsx b/front/src/components/chips/__stories__/CompanyChip.tsx index b98fc234c..fc4413161 100644 --- a/front/src/components/chips/__stories__/CompanyChip.tsx +++ b/front/src/components/chips/__stories__/CompanyChip.tsx @@ -1,5 +1,3 @@ -import { MemoryRouter } from 'react-router-dom'; - import CompanyChip from '../CompanyChip'; import { ThemeProvider } from '@emotion/react'; import { lightTheme } from '../../../layout/styles/themes'; @@ -12,9 +10,7 @@ export default { export const RegularCompanyChip = () => { return ( - - - + ); }; @@ -22,9 +18,7 @@ export const RegularCompanyChip = () => { export const RegularCompanyChipWithImage = () => { return ( - - - + ); }; diff --git a/front/src/components/chips/__tests__/CompanyChip.test.tsx b/front/src/components/chips/__tests__/CompanyChip.test.tsx index ed4e57893..8cea157f5 100644 --- a/front/src/components/chips/__tests__/CompanyChip.test.tsx +++ b/front/src/components/chips/__tests__/CompanyChip.test.tsx @@ -5,13 +5,13 @@ import { RegularCompanyChipWithImage, } from '../__stories__/CompanyChip'; -it('Checks the NavItem renders', () => { +it('Checks the CompanyChip renders', () => { const { getByText } = render(); expect(getByText('selected-company-1')).toBeDefined(); }); -it('Checks the img renders', () => { +it('Checks the CompanyChip img renders', () => { const { getByTestId } = render(); expect(getByTestId('company-chip-image')).toHaveAttribute('src', 'coucou.fr');