import React from 'react';
import { render } from '@testing-library/react';
import 'jest-styled-components';
import { Favorite } from 'grommet-icons';
import { Box } from '../../Box';
import { Grommet } from '../../Grommet';
import { Stack } from '../../Stack';
import { Text } from '../../Text';
import { Avatar } from '..';
const src = '';
describe('Avatar', () => {
test('renders', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('size', () => {
const { container } = render(
S
S
S
S
S
S
S
S
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('round renders', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('text renders', () => {
const { container } = render(
R
SY
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('icon renders', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('stack renders', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('text size changes according to theme', () => {
const theme = {
avatar: {
text: {
size: {
small: '30px',
large: 'small',
'50px': '10px',
},
},
},
};
const { container } = render(
T1
T2
T3
T4
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('a11yTitle renders', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
});