Improve tests (#871)
This commit is contained in:
@ -58,7 +58,6 @@ export function EditablePeopleFullName({
|
||||
<PersonChip
|
||||
name={`${person?.firstName ?? ''} ${person?.lastName ?? ''}`}
|
||||
id={person?.id ?? ''}
|
||||
clickable
|
||||
/>
|
||||
</NoEditModeContainer>
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ export function PeopleCompanyCell({ people }: OwnProps) {
|
||||
<CompanyChip
|
||||
id={people.company?.id ?? ''}
|
||||
name={people.company?.name ?? ''}
|
||||
picture={getLogoUrlFromDomainName(people.company?.domainName)}
|
||||
pictureUrl={getLogoUrlFromDomainName(people.company?.domainName)}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
|
||||
@ -3,24 +3,23 @@ import { EntityChip } from '@/ui/chip/components/EntityChip';
|
||||
export type PersonChipPropsType = {
|
||||
id: string;
|
||||
name: string;
|
||||
picture?: string;
|
||||
pictureUrl?: string;
|
||||
clickable?: boolean;
|
||||
};
|
||||
|
||||
export function PersonChip({
|
||||
id,
|
||||
name,
|
||||
picture,
|
||||
clickable,
|
||||
pictureUrl,
|
||||
clickable = true,
|
||||
}: PersonChipPropsType) {
|
||||
return (
|
||||
<EntityChip
|
||||
entityId={id}
|
||||
linkToEntity={`/person/${id}`}
|
||||
linkToEntity={clickable ? `/person/${id}` : undefined}
|
||||
name={name}
|
||||
avatarType="rounded"
|
||||
clickable={clickable}
|
||||
picture={picture}
|
||||
pictureUrl={pictureUrl}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@ import { BrowserRouter } from 'react-router-dom';
|
||||
import styled from '@emotion/styled';
|
||||
import type { Meta, StoryObj } from '@storybook/react';
|
||||
|
||||
import { ComponentDecorator } from '~/testing/decorators';
|
||||
import { ComponentDecorator } from '~/testing/decorators/ComponentDecorator';
|
||||
|
||||
import { PersonChip } from '../PersonChip';
|
||||
|
||||
@ -15,7 +15,6 @@ const TestCellContainer = styled.div`
|
||||
max-width: 250px;
|
||||
min-width: 250px;
|
||||
overflow: hidden;
|
||||
text-wrap: nowrap;
|
||||
`;
|
||||
|
||||
const meta: Meta<typeof PersonChip> = {
|
||||
|
||||
Reference in New Issue
Block a user