Skip to content

Commit

Permalink
fix: default avatar icon size
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Setch <adam.setch@outlook.com>
  • Loading branch information
setchy committed Sep 2, 2024
1 parent ef013bf commit 43c7d69
Show file tree
Hide file tree
Showing 2 changed files with 206 additions and 2 deletions.
24 changes: 23 additions & 1 deletion src/components/icons/AvatarIcon.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('components/icons/AvatarIcon.tsx', () => {
expect(tree).toMatchSnapshot();
});

it('should render default icon when no url', () => {
it('should render default extra small icon when no url', () => {
const props: IAvatarIcon = {
defaultIcon: MarkGithubIcon,
title: 'test',
Expand All @@ -47,4 +47,26 @@ describe('components/icons/AvatarIcon.tsx', () => {
const tree = render(<AvatarIcon {...props} />);
expect(tree).toMatchSnapshot();
});

it('should render default small icon when no url', () => {
const props: IAvatarIcon = {
defaultIcon: MarkGithubIcon,
title: 'test',
url: null,
size: Size.SMALL,
};
const tree = render(<AvatarIcon {...props} />);
expect(tree).toMatchSnapshot();
});

it('should render default medium icon when no url', () => {
const props: IAvatarIcon = {
defaultIcon: MarkGithubIcon,
title: 'test',
url: null,
size: Size.MEDIUM,
};
const tree = render(<AvatarIcon {...props} />);
expect(tree).toMatchSnapshot();
});
});
184 changes: 183 additions & 1 deletion src/components/icons/__snapshots__/AvatarIcon.test.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 43c7d69

Please sign in to comment.