mirror of
https://github.com/twentyhq/twenty.git
synced 2024-12-23 12:02:10 +03:00
test: rename test and remove useless nav wrapper
This commit is contained in:
parent
b434f3da45
commit
97457f54cb
@ -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 (
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<MemoryRouter initialEntries={['/companies']}>
|
||||
<CompanyChip name="selected-company-1" />
|
||||
</MemoryRouter>
|
||||
<CompanyChip name="selected-company-1" />
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
@ -22,9 +18,7 @@ export const RegularCompanyChip = () => {
|
||||
export const RegularCompanyChipWithImage = () => {
|
||||
return (
|
||||
<ThemeProvider theme={lightTheme}>
|
||||
<MemoryRouter initialEntries={['/companies']}>
|
||||
<CompanyChip name="selected-company-1" picture="coucou.fr" />
|
||||
</MemoryRouter>
|
||||
<CompanyChip name="selected-company-1" picture="coucou.fr" />
|
||||
</ThemeProvider>
|
||||
);
|
||||
};
|
||||
|
@ -5,13 +5,13 @@ import {
|
||||
RegularCompanyChipWithImage,
|
||||
} from '../__stories__/CompanyChip';
|
||||
|
||||
it('Checks the NavItem renders', () => {
|
||||
it('Checks the CompanyChip renders', () => {
|
||||
const { getByText } = render(<RegularCompanyChip />);
|
||||
|
||||
expect(getByText('selected-company-1')).toBeDefined();
|
||||
});
|
||||
|
||||
it('Checks the img renders', () => {
|
||||
it('Checks the CompanyChip img renders', () => {
|
||||
const { getByTestId } = render(<RegularCompanyChipWithImage />);
|
||||
|
||||
expect(getByTestId('company-chip-image')).toHaveAttribute('src', 'coucou.fr');
|
||||
|
Loading…
Reference in New Issue
Block a user