Skip to content

Commit ce2f467

Browse files
authored
Merge pull request #98 from internxt/feat/structure-reorganitation
[PB-3528]:feat/reestructuration in folders of the components
2 parents 36afafe + 6086cd5 commit ce2f467

176 files changed

Lines changed: 192 additions & 1611 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@internxt/ui",
3-
"version": "0.1.12",
3+
"version": "0.1.13",
44
"description": "Library of Internxt components",
55
"repository": {
66
"type": "git",

src/components/checkbox/__test__/Checkbox.test.tsx

Lines changed: 0 additions & 70 deletions
This file was deleted.
File renamed without changes.
Lines changed: 10 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,50 @@
11
import { render } from '@testing-library/react';
2-
import { describe, expect, it, test } from 'vitest';
2+
import { describe, expect, it } from 'vitest';
33
import { Avatar } from '../';
4-
import DefaultAvatar from '../components/DefaultAvatar';
5-
import PictureAvatar from '../components/PictureAvatar';
64

75
const FULL_NAME = 'My Internxt';
86
const IMAGE_SRC = 'https://internxt.com/favicon.ico';
97

108
describe('Avatar component', () => {
11-
test('Avatar with full name (first letters) should render correctly', () => {
9+
it('Avatar with full name (first letters) should render correctly', () => {
1210
const avatarComponent = render(<Avatar diameter={80} fullName={FULL_NAME} />);
1311
expect(avatarComponent).toMatchSnapshot();
1412
});
1513

16-
test('Avatar with single word name should render correctly', () => {
17-
const avatarComponent = render(<Avatar diameter={80} fullName="Javi" />);
18-
expect(avatarComponent).toMatchSnapshot();
19-
});
20-
21-
test('Avatar with empty spaces name should return empty content', () => {
22-
const avatarComponent = render(<Avatar diameter={80} fullName=" " />);
23-
expect(avatarComponent).toMatchSnapshot();
24-
});
25-
26-
test('Avatar with fullname as null should render correctly with empty letters', () => {
14+
it('Avatar with fullname as null should render correctly with empty letters', () => {
2715
const avatarComponent = render(<Avatar diameter={80} fullName={null as any} />);
2816
expect(avatarComponent).toMatchSnapshot();
2917
});
3018

31-
test('Avatar with avatar (user image profile) should render correctly', () => {
19+
it('Avatar with avatar (user image profile) should render correctly', () => {
3220
const avatarComponent = render(<Avatar fullName={FULL_NAME} diameter={80} src={IMAGE_SRC} />);
3321
expect(avatarComponent).toMatchSnapshot();
3422
});
3523

36-
test('XXS Avatar should render correctly', () => {
24+
it('XXS Avatar should render correctly', () => {
3725
const avatarComponent = render(<Avatar fullName={FULL_NAME} size="xxs" src={IMAGE_SRC} />);
3826
expect(avatarComponent).toMatchSnapshot();
3927
});
40-
test('XS Avatar should render correctly', () => {
28+
it('XS Avatar should render correctly', () => {
4129
const avatarComponent = render(<Avatar fullName={FULL_NAME} size="xs" src={IMAGE_SRC} />);
4230
expect(avatarComponent).toMatchSnapshot();
4331
});
4432

45-
test('SM Avatar should render correctly', () => {
33+
it('SM Avatar should render correctly', () => {
4634
const avatarComponent = render(<Avatar fullName={FULL_NAME} size="sm" src={IMAGE_SRC} />);
4735
expect(avatarComponent).toMatchSnapshot();
4836
});
4937

50-
test('Base Avatar should render correctly', () => {
38+
it('Base Avatar should render correctly', () => {
5139
const avatarComponent = render(<Avatar fullName={FULL_NAME} size="base" src={IMAGE_SRC} />);
5240
expect(avatarComponent).toMatchSnapshot();
5341
});
54-
test('LG Avatar should render correctly', () => {
42+
it('LG Avatar should render correctly', () => {
5543
const avatarComponent = render(<Avatar fullName={FULL_NAME} size="lg" src={IMAGE_SRC} />);
5644
expect(avatarComponent).toMatchSnapshot();
5745
});
58-
test('XL Avatar should render correctly', () => {
46+
it('XL Avatar should render correctly', () => {
5947
const avatarComponent = render(<Avatar fullName={FULL_NAME} size="xl" src={IMAGE_SRC} />);
6048
expect(avatarComponent).toMatchSnapshot();
6149
});
62-
63-
test('DefaultAvatar handles default parameters', () => {
64-
const avatarComponent = render(<DefaultAvatar fullName="John Doe" diameter={80} />);
65-
expect(avatarComponent).toMatchSnapshot();
66-
});
67-
68-
test('PictureAvatar handles default parameters', () => {
69-
const avatarComponent = render(<PictureAvatar src={IMAGE_SRC} diameter={80} />);
70-
expect(avatarComponent).toMatchSnapshot();
71-
});
7250
});

0 commit comments

Comments
 (0)