@zohodesk/components 1.1.0 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/assets/Appearance/dark/themes/blue/blue_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/green/green_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/orange/orange_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/red/red_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/dark/themes/yellow/yellow_ComponentTheme_DarkTheme.module.css +24 -24
- package/assets/Appearance/light/themes/blue/blue_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/green/green_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/orange/orange_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/red/red_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/light/themes/yellow/yellow_ComponentTheme_LightTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/blue/blue_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/green/green_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/orange/orange_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/red/red_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/assets/Appearance/pureDark/themes/yellow/yellow_ComponentTheme_PureDarkTheme.module.css +24 -24
- package/es/Button/__tests__/Button.spec.js +61 -0
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
- package/lib/Button/__tests__/Button.spec.js +62 -0
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +440 -0
- package/package.json +12 -7
- package/result.json +1 -0
- package/es/Accordion/__tests__/Accordion.spec.js +0 -79
- package/es/Animation/__tests__/Animation.spec.js +0 -17
- package/es/Avatar/__tests__/Avatar.spec.js +0 -161
- package/es/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -288
- package/es/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -76
- package/es/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -226
- package/es/Buttongroup/__test__/Buttongroup.spec.js +0 -73
- package/es/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
- package/es/Card/__tests__/Card.spec.js +0 -36
- package/es/CheckBox/__tests__/CheckBox.spec.js +0 -12
- package/es/DateTime/__tests__/CalendarView.spec.js +0 -33
- package/es/DateTime/__tests__/DateTime.spec.js +0 -115
- package/es/DateTime/__tests__/DateWidget.spec.js +0 -75
- package/es/DropBox/__tests__/DropBox.spec.js +0 -81
- package/es/DropDown/__tests__/DropDown.spec.js +0 -44
- package/es/DropDown/__tests__/DropDownItem.spec.js +0 -45
- package/es/DropDown/__tests__/DropDownSearch.spec.js +0 -11
- package/es/Label/__tests__/Label.spec.js +0 -120
- package/es/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -101
- package/es/Layout/__tests__/Box.spec.js +0 -114
- package/es/Layout/__tests__/Container.spec.js +0 -120
- package/es/MultiSelect/__tests__/MultiSelect.spec.js +0 -160
- package/es/PopOver/__tests__/PopOver.spec.js +0 -14
- package/es/Popup/__tests__/Popup.spec.js +0 -134
- package/es/Radio/__tests__/Radiospec.js +0 -23
- package/es/Ribbon/__tests__/Ribbon.spec.js +0 -168
- package/es/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -163
- package/es/Select/__tests__/Select.spec.js +0 -345
- package/es/Stencils/__tests__/Stencils.spec.js +0 -69
- package/es/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -49
- package/es/Tab/__tests__/Tab.spec.js +0 -117
- package/es/Tab/__tests__/TabContent.spec.js +0 -16
- package/es/Tab/__tests__/TabContentWrapper.spec.js +0 -50
- package/es/Tab/__tests__/TabWrapper.spec.js +0 -86
- package/es/Tab/__tests__/Tabs.spec.js +0 -115
- package/es/Tag/__tests__/Tag.spec.js +0 -28
- package/es/TextBox/__tests__/TextBox.spec.js +0 -189
- package/es/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
- package/es/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -212
- package/es/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
- package/es/Textarea/__tests__/Textarea.spec.js +0 -171
- package/es/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
- package/es/Tooltip/__tests__/Tooltip.spec.js +0 -52
- package/es/utils/__tests__/constructFullName.spec.js +0 -9
- package/es/utils/__tests__/debounce.spec.js +0 -37
- package/es/utils/__tests__/getInitial.spec.js +0 -23
- package/lib/Accordion/__tests__/Accordion.spec.js +0 -85
- package/lib/Animation/__tests__/Animation.spec.js +0 -23
- package/lib/Avatar/__tests__/Avatar.spec.js +0 -208
- package/lib/Avatar/__tests__/__snapshots__/Avatar.spec.js.snap +0 -288
- package/lib/AvatarTeam/__tests__/AvatarTeam.spec.js +0 -92
- package/lib/AvatarTeam/__tests__/__snapshots__/AvatarTeam.spec.js.snap +0 -226
- package/lib/Buttongroup/__test__/Buttongroup.spec.js +0 -86
- package/lib/Buttongroup/__test__/__snapshots__/Buttongroup.spec.js.snap +0 -146
- package/lib/Card/__tests__/Card.spec.js +0 -56
- package/lib/CheckBox/__tests__/CheckBox.spec.js +0 -18
- package/lib/DateTime/__tests__/CalendarView.spec.js +0 -45
- package/lib/DateTime/__tests__/DateTime.spec.js +0 -127
- package/lib/DateTime/__tests__/DateWidget.spec.js +0 -81
- package/lib/DropBox/__tests__/DropBox.spec.js +0 -87
- package/lib/DropDown/__tests__/DropDown.spec.js +0 -50
- package/lib/DropDown/__tests__/DropDownItem.spec.js +0 -51
- package/lib/DropDown/__tests__/DropDownSearch.spec.js +0 -17
- package/lib/Label/__tests__/Label.spec.js +0 -137
- package/lib/Label/__tests__/__snapshots__/Label.spec.js.snap +0 -101
- package/lib/Layout/__tests__/Box.spec.js +0 -121
- package/lib/Layout/__tests__/Container.spec.js +0 -127
- package/lib/MultiSelect/__tests__/MultiSelect.spec.js +0 -170
- package/lib/PopOver/__tests__/PopOver.spec.js +0 -20
- package/lib/Popup/__tests__/Popup.spec.js +0 -192
- package/lib/Radio/__tests__/Radiospec.js +0 -29
- package/lib/Ribbon/__tests__/Ribbon.spec.js +0 -193
- package/lib/Ribbon/__tests__/__snapshots__/Ribbon.spec.js.snap +0 -163
- package/lib/Select/__tests__/Select.spec.js +0 -383
- package/lib/Stencils/__tests__/Stencils.spec.js +0 -84
- package/lib/Stencils/__tests__/__snapshots__/Stencils.spec.js.snap +0 -49
- package/lib/Tab/__tests__/Tab.spec.js +0 -123
- package/lib/Tab/__tests__/TabContent.spec.js +0 -22
- package/lib/Tab/__tests__/TabContentWrapper.spec.js +0 -59
- package/lib/Tab/__tests__/TabWrapper.spec.js +0 -100
- package/lib/Tab/__tests__/Tabs.spec.js +0 -123
- package/lib/Tag/__tests__/Tag.spec.js +0 -35
- package/lib/TextBox/__tests__/TextBox.spec.js +0 -205
- package/lib/TextBox/__tests__/__snapshots__/TextBox.spec.js.snap +0 -127
- package/lib/TextBoxIcon/__tests__/TextBoxIcon.spec.js +0 -228
- package/lib/TextBoxIcon/__tests__/__snapshots__/TextBoxIcon.spec.js.snap +0 -334
- package/lib/Textarea/__tests__/Textarea.spec.js +0 -186
- package/lib/Textarea/__tests__/__snapshots__/Textarea.spec.js.snap +0 -97
- package/lib/Tooltip/__tests__/Tooltip.spec.js +0 -98
- package/lib/utils/__tests__/constructFullName.spec.js +0 -12
- package/lib/utils/__tests__/debounce.spec.js +0 -40
- package/lib/utils/__tests__/getInitial.spec.js +0 -26
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Avatar from '../Avatar';
|
|
3
|
-
import renderer from 'react-test-renderer';
|
|
4
|
-
let avatarURL = 'avatar.jpg';
|
|
5
|
-
describe('Avatar component', () => {
|
|
6
|
-
it('should display initial', () => {
|
|
7
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
8
|
-
name: "vimalesan a"
|
|
9
|
-
}));
|
|
10
|
-
let tree = ele.toJSON();
|
|
11
|
-
expect(tree).toMatchSnapshot();
|
|
12
|
-
});
|
|
13
|
-
it('should display avatar image and initial while avatar loading...', () => {
|
|
14
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
15
|
-
name: "vimalesan a",
|
|
16
|
-
src: avatarURL
|
|
17
|
-
}));
|
|
18
|
-
let tree = ele.toJSON();
|
|
19
|
-
expect(tree).toMatchSnapshot();
|
|
20
|
-
});
|
|
21
|
-
it('should display initial if invalid url', () => {
|
|
22
|
-
Avatar.invalidImageURLs.push(avatarURL);
|
|
23
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
24
|
-
name: "vimalesan a",
|
|
25
|
-
src: avatarURL
|
|
26
|
-
}));
|
|
27
|
-
let tree = ele.toJSON();
|
|
28
|
-
expect(tree).toMatchSnapshot();
|
|
29
|
-
});
|
|
30
|
-
it('should display image valid url', () => {
|
|
31
|
-
Avatar.invalidImageURLs.length = 0;
|
|
32
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
33
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
34
|
-
name: "vimalesan a",
|
|
35
|
-
src: avatarURL
|
|
36
|
-
}));
|
|
37
|
-
let tree = ele.toJSON();
|
|
38
|
-
expect(tree).toMatchSnapshot();
|
|
39
|
-
});
|
|
40
|
-
it('should the palette is default', () => {
|
|
41
|
-
Avatar.invalidImageURLs.length = 0;
|
|
42
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
43
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
44
|
-
name: "vimalesan a",
|
|
45
|
-
src: avatarURL,
|
|
46
|
-
palette: "default"
|
|
47
|
-
}));
|
|
48
|
-
let tree = ele.toJSON();
|
|
49
|
-
expect(tree).toMatchSnapshot();
|
|
50
|
-
});
|
|
51
|
-
it('should the palette is secondary', () => {
|
|
52
|
-
Avatar.invalidImageURLs.length = 0;
|
|
53
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
54
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
55
|
-
name: "vimalesan a",
|
|
56
|
-
src: avatarURL,
|
|
57
|
-
palette: "secondary"
|
|
58
|
-
}));
|
|
59
|
-
let tree = ele.toJSON();
|
|
60
|
-
expect(tree).toMatchSnapshot();
|
|
61
|
-
});
|
|
62
|
-
it('should the palette is info', () => {
|
|
63
|
-
Avatar.invalidImageURLs.length = 0;
|
|
64
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
65
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
66
|
-
name: "vimalesan a",
|
|
67
|
-
src: avatarURL,
|
|
68
|
-
palette: "info"
|
|
69
|
-
}));
|
|
70
|
-
let tree = ele.toJSON();
|
|
71
|
-
expect(tree).toMatchSnapshot();
|
|
72
|
-
});
|
|
73
|
-
it('should the shape is square', () => {
|
|
74
|
-
Avatar.invalidImageURLs.length = 0;
|
|
75
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
76
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
77
|
-
name: "vimalesan a",
|
|
78
|
-
src: avatarURL,
|
|
79
|
-
shape: "square"
|
|
80
|
-
}));
|
|
81
|
-
let tree = ele.toJSON();
|
|
82
|
-
expect(tree).toMatchSnapshot();
|
|
83
|
-
});
|
|
84
|
-
it('should the size is small', () => {
|
|
85
|
-
Avatar.invalidImageURLs.length = 0;
|
|
86
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
87
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
88
|
-
name: "vimalesan a",
|
|
89
|
-
src: avatarURL,
|
|
90
|
-
size: "square"
|
|
91
|
-
}));
|
|
92
|
-
let tree = ele.toJSON();
|
|
93
|
-
expect(tree).toMatchSnapshot();
|
|
94
|
-
});
|
|
95
|
-
it('should the size is xsmall', () => {
|
|
96
|
-
Avatar.invalidImageURLs.length = 0;
|
|
97
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
98
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
99
|
-
name: "vimalesan a",
|
|
100
|
-
src: avatarURL,
|
|
101
|
-
size: "xsmall"
|
|
102
|
-
}));
|
|
103
|
-
let tree = ele.toJSON();
|
|
104
|
-
expect(tree).toMatchSnapshot();
|
|
105
|
-
});
|
|
106
|
-
it('should the size is xmedium', () => {
|
|
107
|
-
Avatar.invalidImageURLs.length = 0;
|
|
108
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
109
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
110
|
-
name: "vimalesan a",
|
|
111
|
-
src: avatarURL,
|
|
112
|
-
size: "xmedium"
|
|
113
|
-
}));
|
|
114
|
-
let tree = ele.toJSON();
|
|
115
|
-
expect(tree).toMatchSnapshot();
|
|
116
|
-
});
|
|
117
|
-
it('should the size is large', () => {
|
|
118
|
-
Avatar.invalidImageURLs.length = 0;
|
|
119
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
120
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
121
|
-
name: "vimalesan a",
|
|
122
|
-
src: avatarURL,
|
|
123
|
-
size: "large"
|
|
124
|
-
}));
|
|
125
|
-
let tree = ele.toJSON();
|
|
126
|
-
expect(tree).toMatchSnapshot();
|
|
127
|
-
});
|
|
128
|
-
it('should the size is xlarge', () => {
|
|
129
|
-
Avatar.invalidImageURLs.length = 0;
|
|
130
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
131
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
132
|
-
name: "vimalesan a",
|
|
133
|
-
src: avatarURL,
|
|
134
|
-
size: "xlarge"
|
|
135
|
-
}));
|
|
136
|
-
let tree = ele.toJSON();
|
|
137
|
-
expect(tree).toMatchSnapshot();
|
|
138
|
-
});
|
|
139
|
-
it('should have title', () => {
|
|
140
|
-
Avatar.invalidImageURLs.length = 0;
|
|
141
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
142
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
143
|
-
name: "vimalesan a",
|
|
144
|
-
src: avatarURL,
|
|
145
|
-
title: "Sample Title"
|
|
146
|
-
}));
|
|
147
|
-
let tree = ele.toJSON();
|
|
148
|
-
expect(tree).toMatchSnapshot();
|
|
149
|
-
});
|
|
150
|
-
it('should no need title', () => {
|
|
151
|
-
Avatar.invalidImageURLs.length = 0;
|
|
152
|
-
Avatar.validImageURLs.push(avatarURL);
|
|
153
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(Avatar, {
|
|
154
|
-
name: "vimalesan a",
|
|
155
|
-
src: avatarURL,
|
|
156
|
-
needTitle: false
|
|
157
|
-
}));
|
|
158
|
-
let tree = ele.toJSON();
|
|
159
|
-
expect(tree).toMatchSnapshot();
|
|
160
|
-
});
|
|
161
|
-
});
|
|
@@ -1,288 +0,0 @@
|
|
|
1
|
-
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
-
|
|
3
|
-
exports[`Avatar component should display avatar image and initial while avatar loading... 1`] = `
|
|
4
|
-
<div
|
|
5
|
-
className="avatar medium medium circle primary text_black
|
|
6
|
-
border"
|
|
7
|
-
data-id="Avatar"
|
|
8
|
-
data-title="vimalesan a"
|
|
9
|
-
onClick={[Function]}
|
|
10
|
-
>
|
|
11
|
-
<span
|
|
12
|
-
className="initial initialTxt"
|
|
13
|
-
data-id="Avatar_AvatarInitial"
|
|
14
|
-
>
|
|
15
|
-
VA
|
|
16
|
-
</span>
|
|
17
|
-
<img
|
|
18
|
-
className="none"
|
|
19
|
-
data-id="Avatar_AvatarImg"
|
|
20
|
-
name="vimalesan a"
|
|
21
|
-
onError={[Function]}
|
|
22
|
-
onLoad={[Function]}
|
|
23
|
-
src="avatar.jpg"
|
|
24
|
-
/>
|
|
25
|
-
</div>
|
|
26
|
-
`;
|
|
27
|
-
|
|
28
|
-
exports[`Avatar component should display image valid url 1`] = `
|
|
29
|
-
<div
|
|
30
|
-
className="avatar medium medium circle primary text_black
|
|
31
|
-
"
|
|
32
|
-
data-id="Avatar"
|
|
33
|
-
data-title="vimalesan a"
|
|
34
|
-
onClick={[Function]}
|
|
35
|
-
>
|
|
36
|
-
<img
|
|
37
|
-
className="image"
|
|
38
|
-
data-id="Avatar_AvatarImg"
|
|
39
|
-
name="vimalesan a"
|
|
40
|
-
onError={[Function]}
|
|
41
|
-
onLoad={[Function]}
|
|
42
|
-
src="avatar.jpg"
|
|
43
|
-
/>
|
|
44
|
-
</div>
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
exports[`Avatar component should display initial 1`] = `
|
|
48
|
-
<div
|
|
49
|
-
className="avatar medium medium circle primary text_black
|
|
50
|
-
border"
|
|
51
|
-
data-id="Avatar"
|
|
52
|
-
data-title="vimalesan a"
|
|
53
|
-
onClick={[Function]}
|
|
54
|
-
>
|
|
55
|
-
<span
|
|
56
|
-
className="initial initialTxt"
|
|
57
|
-
data-id="Avatar_AvatarInitial"
|
|
58
|
-
>
|
|
59
|
-
VA
|
|
60
|
-
</span>
|
|
61
|
-
</div>
|
|
62
|
-
`;
|
|
63
|
-
|
|
64
|
-
exports[`Avatar component should display initial if invalid url 1`] = `
|
|
65
|
-
<div
|
|
66
|
-
className="avatar medium medium circle primary text_black
|
|
67
|
-
border"
|
|
68
|
-
data-id="Avatar"
|
|
69
|
-
data-title="vimalesan a"
|
|
70
|
-
onClick={[Function]}
|
|
71
|
-
>
|
|
72
|
-
<span
|
|
73
|
-
className="initial initialTxt"
|
|
74
|
-
data-id="Avatar_AvatarInitial"
|
|
75
|
-
>
|
|
76
|
-
VA
|
|
77
|
-
</span>
|
|
78
|
-
</div>
|
|
79
|
-
`;
|
|
80
|
-
|
|
81
|
-
exports[`Avatar component should have title 1`] = `
|
|
82
|
-
<div
|
|
83
|
-
className="avatar medium medium circle primary text_black
|
|
84
|
-
"
|
|
85
|
-
data-id="Avatar"
|
|
86
|
-
data-title="Sample Title"
|
|
87
|
-
onClick={[Function]}
|
|
88
|
-
>
|
|
89
|
-
<img
|
|
90
|
-
className="image"
|
|
91
|
-
data-id="Avatar_AvatarImg"
|
|
92
|
-
name="vimalesan a"
|
|
93
|
-
onError={[Function]}
|
|
94
|
-
onLoad={[Function]}
|
|
95
|
-
src="avatar.jpg"
|
|
96
|
-
/>
|
|
97
|
-
</div>
|
|
98
|
-
`;
|
|
99
|
-
|
|
100
|
-
exports[`Avatar component should no need title 1`] = `
|
|
101
|
-
<div
|
|
102
|
-
className="avatar medium medium circle primary text_black
|
|
103
|
-
"
|
|
104
|
-
data-id="Avatar"
|
|
105
|
-
data-title=""
|
|
106
|
-
onClick={[Function]}
|
|
107
|
-
>
|
|
108
|
-
<img
|
|
109
|
-
className="image"
|
|
110
|
-
data-id="Avatar_AvatarImg"
|
|
111
|
-
name="vimalesan a"
|
|
112
|
-
onError={[Function]}
|
|
113
|
-
onLoad={[Function]}
|
|
114
|
-
src="avatar.jpg"
|
|
115
|
-
/>
|
|
116
|
-
</div>
|
|
117
|
-
`;
|
|
118
|
-
|
|
119
|
-
exports[`Avatar component should the palette is default 1`] = `
|
|
120
|
-
<div
|
|
121
|
-
className="avatar medium medium circle default text_black
|
|
122
|
-
"
|
|
123
|
-
data-id="Avatar"
|
|
124
|
-
data-title="vimalesan a"
|
|
125
|
-
onClick={[Function]}
|
|
126
|
-
>
|
|
127
|
-
<img
|
|
128
|
-
className="image"
|
|
129
|
-
data-id="Avatar_AvatarImg"
|
|
130
|
-
name="vimalesan a"
|
|
131
|
-
onError={[Function]}
|
|
132
|
-
onLoad={[Function]}
|
|
133
|
-
src="avatar.jpg"
|
|
134
|
-
/>
|
|
135
|
-
</div>
|
|
136
|
-
`;
|
|
137
|
-
|
|
138
|
-
exports[`Avatar component should the palette is info 1`] = `
|
|
139
|
-
<div
|
|
140
|
-
className="avatar medium medium circle info text_black
|
|
141
|
-
"
|
|
142
|
-
data-id="Avatar"
|
|
143
|
-
data-title="vimalesan a"
|
|
144
|
-
onClick={[Function]}
|
|
145
|
-
>
|
|
146
|
-
<img
|
|
147
|
-
className="image"
|
|
148
|
-
data-id="Avatar_AvatarImg"
|
|
149
|
-
name="vimalesan a"
|
|
150
|
-
onError={[Function]}
|
|
151
|
-
onLoad={[Function]}
|
|
152
|
-
src="avatar.jpg"
|
|
153
|
-
/>
|
|
154
|
-
</div>
|
|
155
|
-
`;
|
|
156
|
-
|
|
157
|
-
exports[`Avatar component should the palette is secondary 1`] = `
|
|
158
|
-
<div
|
|
159
|
-
className="avatar medium medium circle secondary text_white
|
|
160
|
-
"
|
|
161
|
-
data-id="Avatar"
|
|
162
|
-
data-title="vimalesan a"
|
|
163
|
-
onClick={[Function]}
|
|
164
|
-
>
|
|
165
|
-
<img
|
|
166
|
-
className="image"
|
|
167
|
-
data-id="Avatar_AvatarImg"
|
|
168
|
-
name="vimalesan a"
|
|
169
|
-
onError={[Function]}
|
|
170
|
-
onLoad={[Function]}
|
|
171
|
-
src="avatar.jpg"
|
|
172
|
-
/>
|
|
173
|
-
</div>
|
|
174
|
-
`;
|
|
175
|
-
|
|
176
|
-
exports[`Avatar component should the shape is square 1`] = `
|
|
177
|
-
<div
|
|
178
|
-
className="avatar medium medium square primary text_black
|
|
179
|
-
"
|
|
180
|
-
data-id="Avatar"
|
|
181
|
-
data-title="vimalesan a"
|
|
182
|
-
onClick={[Function]}
|
|
183
|
-
>
|
|
184
|
-
<img
|
|
185
|
-
className="image"
|
|
186
|
-
data-id="Avatar_AvatarImg"
|
|
187
|
-
name="vimalesan a"
|
|
188
|
-
onError={[Function]}
|
|
189
|
-
onLoad={[Function]}
|
|
190
|
-
src="avatar.jpg"
|
|
191
|
-
/>
|
|
192
|
-
</div>
|
|
193
|
-
`;
|
|
194
|
-
|
|
195
|
-
exports[`Avatar component should the size is large 1`] = `
|
|
196
|
-
<div
|
|
197
|
-
className="avatar large large circle primary text_black
|
|
198
|
-
"
|
|
199
|
-
data-id="Avatar"
|
|
200
|
-
data-title="vimalesan a"
|
|
201
|
-
onClick={[Function]}
|
|
202
|
-
>
|
|
203
|
-
<img
|
|
204
|
-
className="image"
|
|
205
|
-
data-id="Avatar_AvatarImg"
|
|
206
|
-
name="vimalesan a"
|
|
207
|
-
onError={[Function]}
|
|
208
|
-
onLoad={[Function]}
|
|
209
|
-
src="avatar.jpg"
|
|
210
|
-
/>
|
|
211
|
-
</div>
|
|
212
|
-
`;
|
|
213
|
-
|
|
214
|
-
exports[`Avatar component should the size is small 1`] = `
|
|
215
|
-
<div
|
|
216
|
-
className="avatar square circle primary text_black
|
|
217
|
-
"
|
|
218
|
-
data-id="Avatar"
|
|
219
|
-
data-title="vimalesan a"
|
|
220
|
-
onClick={[Function]}
|
|
221
|
-
>
|
|
222
|
-
<img
|
|
223
|
-
className="image"
|
|
224
|
-
data-id="Avatar_AvatarImg"
|
|
225
|
-
name="vimalesan a"
|
|
226
|
-
onError={[Function]}
|
|
227
|
-
onLoad={[Function]}
|
|
228
|
-
src="avatar.jpg"
|
|
229
|
-
/>
|
|
230
|
-
</div>
|
|
231
|
-
`;
|
|
232
|
-
|
|
233
|
-
exports[`Avatar component should the size is xlarge 1`] = `
|
|
234
|
-
<div
|
|
235
|
-
className="avatar xlarge xlarge circle primary text_black
|
|
236
|
-
"
|
|
237
|
-
data-id="Avatar"
|
|
238
|
-
data-title="vimalesan a"
|
|
239
|
-
onClick={[Function]}
|
|
240
|
-
>
|
|
241
|
-
<img
|
|
242
|
-
className="image"
|
|
243
|
-
data-id="Avatar_AvatarImg"
|
|
244
|
-
name="vimalesan a"
|
|
245
|
-
onError={[Function]}
|
|
246
|
-
onLoad={[Function]}
|
|
247
|
-
src="avatar.jpg"
|
|
248
|
-
/>
|
|
249
|
-
</div>
|
|
250
|
-
`;
|
|
251
|
-
|
|
252
|
-
exports[`Avatar component should the size is xmedium 1`] = `
|
|
253
|
-
<div
|
|
254
|
-
className="avatar xmedium xmedium circle primary text_black
|
|
255
|
-
"
|
|
256
|
-
data-id="Avatar"
|
|
257
|
-
data-title="vimalesan a"
|
|
258
|
-
onClick={[Function]}
|
|
259
|
-
>
|
|
260
|
-
<img
|
|
261
|
-
className="image"
|
|
262
|
-
data-id="Avatar_AvatarImg"
|
|
263
|
-
name="vimalesan a"
|
|
264
|
-
onError={[Function]}
|
|
265
|
-
onLoad={[Function]}
|
|
266
|
-
src="avatar.jpg"
|
|
267
|
-
/>
|
|
268
|
-
</div>
|
|
269
|
-
`;
|
|
270
|
-
|
|
271
|
-
exports[`Avatar component should the size is xsmall 1`] = `
|
|
272
|
-
<div
|
|
273
|
-
className="avatar xsmall xsmall circle primary text_black
|
|
274
|
-
"
|
|
275
|
-
data-id="Avatar"
|
|
276
|
-
data-title="vimalesan a"
|
|
277
|
-
onClick={[Function]}
|
|
278
|
-
>
|
|
279
|
-
<img
|
|
280
|
-
className="image"
|
|
281
|
-
data-id="Avatar_AvatarImg"
|
|
282
|
-
name="vimalesan a"
|
|
283
|
-
onError={[Function]}
|
|
284
|
-
onLoad={[Function]}
|
|
285
|
-
src="avatar.jpg"
|
|
286
|
-
/>
|
|
287
|
-
</div>
|
|
288
|
-
`;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import AvatarTeam from '../AvatarTeam';
|
|
3
|
-
import renderer from 'react-test-renderer';
|
|
4
|
-
describe('AvatarTeam component', () => {
|
|
5
|
-
it('should display initial', () => {
|
|
6
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
7
|
-
name: "vimalesan a"
|
|
8
|
-
}));
|
|
9
|
-
let tree = ele.toJSON();
|
|
10
|
-
expect(tree).toMatchSnapshot();
|
|
11
|
-
});
|
|
12
|
-
it('should is filled', () => {
|
|
13
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
14
|
-
name: "vimalesan a",
|
|
15
|
-
isFilled: true
|
|
16
|
-
}));
|
|
17
|
-
let tree = ele.toJSON();
|
|
18
|
-
expect(tree).toMatchSnapshot();
|
|
19
|
-
});
|
|
20
|
-
it('should the palette is secondary', () => {
|
|
21
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
22
|
-
name: "vimalesan a",
|
|
23
|
-
palette: "secondary"
|
|
24
|
-
}));
|
|
25
|
-
let tree = ele.toJSON();
|
|
26
|
-
expect(tree).toMatchSnapshot();
|
|
27
|
-
});
|
|
28
|
-
it('should the palette is info', () => {
|
|
29
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
30
|
-
name: "vimalesan a",
|
|
31
|
-
palette: "info"
|
|
32
|
-
}));
|
|
33
|
-
let tree = ele.toJSON();
|
|
34
|
-
expect(tree).toMatchSnapshot();
|
|
35
|
-
});
|
|
36
|
-
it('should the size is small', () => {
|
|
37
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
38
|
-
name: "vimalesan a",
|
|
39
|
-
size: "small"
|
|
40
|
-
}));
|
|
41
|
-
let tree = ele.toJSON();
|
|
42
|
-
expect(tree).toMatchSnapshot();
|
|
43
|
-
});
|
|
44
|
-
it('should the size is xsmall', () => {
|
|
45
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
46
|
-
name: "vimalesan a",
|
|
47
|
-
size: "xsmall"
|
|
48
|
-
}));
|
|
49
|
-
let tree = ele.toJSON();
|
|
50
|
-
expect(tree).toMatchSnapshot();
|
|
51
|
-
});
|
|
52
|
-
it('should the size is xmedium', () => {
|
|
53
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
54
|
-
name: "vimalesan a",
|
|
55
|
-
size: "xmedium"
|
|
56
|
-
}));
|
|
57
|
-
let tree = ele.toJSON();
|
|
58
|
-
expect(tree).toMatchSnapshot();
|
|
59
|
-
});
|
|
60
|
-
it('should the size is large', () => {
|
|
61
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
62
|
-
name: "vimalesan a",
|
|
63
|
-
size: "large"
|
|
64
|
-
}));
|
|
65
|
-
let tree = ele.toJSON();
|
|
66
|
-
expect(tree).toMatchSnapshot();
|
|
67
|
-
});
|
|
68
|
-
it('should the size is xlarge', () => {
|
|
69
|
-
let ele = renderer.create( /*#__PURE__*/React.createElement(AvatarTeam, {
|
|
70
|
-
name: "vimalesan a",
|
|
71
|
-
size: "xlarge"
|
|
72
|
-
}));
|
|
73
|
-
let tree = ele.toJSON();
|
|
74
|
-
expect(tree).toMatchSnapshot();
|
|
75
|
-
});
|
|
76
|
-
});
|