@zohodesk/dot 1.0.0-temp-195.3 → 1.0.0-temp-198.2
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/.cli/UnValidatedFiles.html +1 -1
- package/.cli/propValidation_report.html +1 -1
- package/es/ActionButton/ActionButton.module.css +192 -192
- package/es/AlphabeticList/AlphabeticList.module.css +57 -57
- package/es/AttachmentViewer/AttachmentViewer.module.css +352 -352
- package/es/ChannelIcon/ChannelIcon.module.css +225 -225
- package/es/DotProvider/DotProvider.js +60 -0
- package/es/DotProvider/hooks/useDotProvider.js +55 -0
- package/es/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +97 -0
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +3 -0
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +1 -0
- package/es/DotProvider/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +1 -0
- package/es/DotProvider/props/defaultProps.js +11 -0
- package/es/DotProvider/props/propTypes.js +16 -0
- package/es/DotProvider/utils/assetPromiseHandlers/fontSizeAssetPromise.js +4 -0
- package/es/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +28 -0
- package/es/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +29 -0
- package/es/DotProvider/utils/assetPromiseHandlers/zoomSizeAssetPromise.js +4 -0
- package/es/DotProvider/utils/constants.js +14 -0
- package/es/DotProvider/utils/errorValidation.js +17 -0
- package/es/DotProvider/utils/getAssetsImportPromises.js +17 -0
- package/es/DotProvider/utils/sizeAssetsConfig.js +12 -0
- package/es/DotProvider/utils/themeAppearanceAssetsConfig.js +47 -0
- package/es/DotProvider/utils/themeColorAssetsConfig.js +221 -0
- package/es/FormAction/FormAction.module.css +100 -100
- package/es/IconButton/IconButton.module.css +22 -22
- package/es/ImportantNotes/__tests__/ImportantNotes.spec.js +96 -0
- package/es/ImportantNotes/__tests__/__snapshots__/ImportantNotes.spec.js.snap +333 -0
- package/es/TagWithIcon/TagWithIcon.module.css +66 -66
- package/es/Upload/__tests__/Upload.spec.js +140 -0
- package/es/Upload/__tests__/__snapshots__/Upload.spec.js.snap +459 -0
- package/es/Upload/props/propTypes.js +1 -1
- package/es/avatar/AvatarIcon/AvatarIcon.module.css +58 -58
- package/es/common/dot_boxShadow.module.css +0 -2
- package/es/emptystate/CommonEmptyState/CommonEmptyState.module.css +92 -92
- package/es/form/fields/ValidationMessage/ValidationMessage.module.css +27 -27
- package/es/layout/SubtabLayout/SubtabLayout.module.css +164 -164
- package/es/list/Comment/Comment.module.css +29 -29
- package/es/list/Dot/Dot.module.css +15 -15
- package/es/list/ListLayout/ListLayout.module.css +79 -79
- package/es/list/Subject/Subject.module.css +34 -34
- package/es/list/Thread/Thread.module.css +42 -42
- package/es/version2/GlobalNotification/GlobalNotification.module.css +177 -177
- package/es/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +87 -87
- package/es/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +132 -132
- package/lib/ActionButton/ActionButton.module.css +192 -192
- package/lib/AlphabeticList/AlphabeticList.module.css +57 -57
- package/lib/AttachmentViewer/AttachmentViewer.module.css +352 -352
- package/lib/ChannelIcon/ChannelIcon.module.css +225 -225
- package/lib/DotProvider/DotProvider.js +88 -0
- package/lib/DotProvider/hooks/useDotProvider.js +83 -0
- package/lib/DotProvider/hooks/useDownloadAssetsAndSetAttr.js +119 -0
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/blue/Blue_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/green/Green_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/orange/Orange_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/red/Red_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Dark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_Light_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/component/yellow/Yellow_PureDark_Component.js +7 -0
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/blue/Blue_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/green/Green_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/orange/Orange_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/red/Red_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Dark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_Light_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/dot/yellow/Yellow_PureDark_Dot.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/blue/Blue_PureDark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/green/Green_PureDark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/orange/Orange_PureDark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/red/Red_PureDark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Dark_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_Light_SVG.js +3 -0
- package/lib/DotProvider/libraryChunks/themes/svg/yellow/Yellow_PureDark_SVG.js +3 -0
- package/lib/DotProvider/props/defaultProps.js +20 -0
- package/lib/DotProvider/props/propTypes.js +28 -0
- package/lib/DotProvider/utils/assetPromiseHandlers/fontSizeAssetPromise.js +12 -0
- package/lib/DotProvider/utils/assetPromiseHandlers/themeAppearanceAssetPromise.js +39 -0
- package/lib/DotProvider/utils/assetPromiseHandlers/themeColorAssetPromise.js +40 -0
- package/lib/DotProvider/utils/assetPromiseHandlers/zoomSizeAssetPromise.js +12 -0
- package/lib/DotProvider/utils/constants.js +34 -0
- package/lib/DotProvider/utils/errorValidation.js +25 -0
- package/lib/DotProvider/utils/getAssetsImportPromises.js +22 -0
- package/lib/DotProvider/utils/sizeAssetsConfig.js +31 -0
- package/lib/DotProvider/utils/themeAppearanceAssetsConfig.js +69 -0
- package/lib/DotProvider/utils/themeColorAssetsConfig.js +249 -0
- package/lib/FormAction/FormAction.module.css +100 -100
- package/lib/IconButton/IconButton.module.css +22 -22
- package/lib/ImportantNotes/__tests__/ImportantNotes.spec.js +96 -0
- package/lib/ImportantNotes/__tests__/__snapshots__/ImportantNotes.spec.js.snap +333 -0
- package/lib/TagWithIcon/TagWithIcon.module.css +66 -66
- package/lib/Upload/__tests__/Upload.spec.js +140 -0
- package/lib/Upload/__tests__/__snapshots__/Upload.spec.js.snap +459 -0
- package/lib/Upload/props/propTypes.js +1 -1
- package/lib/avatar/AvatarIcon/AvatarIcon.module.css +58 -58
- package/lib/common/dot_boxShadow.module.css +0 -2
- package/lib/emptystate/CommonEmptyState/CommonEmptyState.module.css +92 -92
- package/lib/form/fields/ValidationMessage/ValidationMessage.module.css +27 -27
- package/lib/layout/SubtabLayout/SubtabLayout.module.css +164 -164
- package/lib/list/Comment/Comment.module.css +29 -29
- package/lib/list/Dot/Dot.module.css +15 -15
- package/lib/list/ListLayout/ListLayout.module.css +79 -79
- package/lib/list/Subject/Subject.module.css +34 -34
- package/lib/list/Thread/Thread.module.css +42 -42
- package/lib/version2/GlobalNotification/GlobalNotification.module.css +177 -177
- package/lib/version2/lookup/AlertHeader/css/AlertHeaderNew.module.css +87 -87
- package/lib/version2/notification/DesktopNotificationHeader/DesktopNotificationHeader.module.css +132 -132
- package/package.json +4 -4
- package/result.json +1 -1
- package/unittest/index.html +1 -1
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
.varClass {
|
|
2
|
-
--tag_bg_color: var(--zdt_tagWithIconGrey_bg);
|
|
3
|
-
--tag_text_color: var(--zdt_tagWithIconGrey_text);
|
|
4
|
-
--tag_border_color: var(--zdt_tagWithIconGrey_border);
|
|
5
|
-
--tag_small_fontSize: var(--zd_font_size10);
|
|
6
|
-
--tag_large_fontSize: var(--zd_font_size12);
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.wrapper {
|
|
10
|
-
composes: varClass;
|
|
11
|
-
color: var(--tag_text_color);
|
|
12
|
-
background-color: var(--tag_bg_color);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.small,
|
|
16
|
-
.large {
|
|
17
|
-
max-width: 100% ;
|
|
18
|
-
height: var(--zd_size18) ;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.small, .large {
|
|
22
|
-
border: 1px solid var(--tag_border_color);
|
|
23
|
-
border-radius: var(--zd_size4);
|
|
24
|
-
padding: 0 var(--zd_size6) ;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.bold {
|
|
28
|
-
composes: semibold from '~@zohodesk/components/lib/common/common.module.css';
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.small_text {
|
|
32
|
-
font-size: var(--tag_small_fontSize);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.large_text {
|
|
36
|
-
font-size: var(--tag_large_fontSize);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.text {
|
|
40
|
-
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
[dir=ltr] .iconSpace {
|
|
44
|
-
margin-right: var(--zd_size4) ;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
[dir=rtl] .iconSpace {
|
|
48
|
-
margin-left: var(--zd_size4) ;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.yellow {
|
|
52
|
-
--tag_bg_color: var(--zdt_tagWithIconYellow_bg);
|
|
53
|
-
--tag_text_color: var(--zdt_tagWithIconYellow_text);
|
|
54
|
-
--tag_border_color: var(--zdt_tagWithIconYellow_border);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
.grey {
|
|
58
|
-
--tag_bg_color: var(--zdt_tagWithIconGrey_bg);
|
|
59
|
-
--tag_text_color: var(--zdt_tagWithIconGrey_text);
|
|
60
|
-
--tag_border_color: var(--zdt_tagWithIconGrey_border);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.blue {
|
|
64
|
-
--tag_bg_color: var(--zdt_tagWithIconBlue_bg);
|
|
65
|
-
--tag_text_color: var(--zdt_tagWithIconBlue_text);
|
|
66
|
-
--tag_border_color: var(--zdt_tagWithIconBlue_border);
|
|
1
|
+
.varClass {
|
|
2
|
+
--tag_bg_color: var(--zdt_tagWithIconGrey_bg);
|
|
3
|
+
--tag_text_color: var(--zdt_tagWithIconGrey_text);
|
|
4
|
+
--tag_border_color: var(--zdt_tagWithIconGrey_border);
|
|
5
|
+
--tag_small_fontSize: var(--zd_font_size10);
|
|
6
|
+
--tag_large_fontSize: var(--zd_font_size12);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.wrapper {
|
|
10
|
+
composes: varClass;
|
|
11
|
+
color: var(--tag_text_color);
|
|
12
|
+
background-color: var(--tag_bg_color);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.small,
|
|
16
|
+
.large {
|
|
17
|
+
max-width: 100% ;
|
|
18
|
+
height: var(--zd_size18) ;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.small, .large {
|
|
22
|
+
border: 1px solid var(--tag_border_color);
|
|
23
|
+
border-radius: var(--zd_size4);
|
|
24
|
+
padding: 0 var(--zd_size6) ;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.bold {
|
|
28
|
+
composes: semibold from '~@zohodesk/components/lib/common/common.module.css';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.small_text {
|
|
32
|
+
font-size: var(--tag_small_fontSize);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.large_text {
|
|
36
|
+
font-size: var(--tag_large_fontSize);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.text {
|
|
40
|
+
composes: dotted from '~@zohodesk/components/lib/common/common.module.css';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
[dir=ltr] .iconSpace {
|
|
44
|
+
margin-right: var(--zd_size4) ;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[dir=rtl] .iconSpace {
|
|
48
|
+
margin-left: var(--zd_size4) ;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.yellow {
|
|
52
|
+
--tag_bg_color: var(--zdt_tagWithIconYellow_bg);
|
|
53
|
+
--tag_text_color: var(--zdt_tagWithIconYellow_text);
|
|
54
|
+
--tag_border_color: var(--zdt_tagWithIconYellow_border);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.grey {
|
|
58
|
+
--tag_bg_color: var(--zdt_tagWithIconGrey_bg);
|
|
59
|
+
--tag_text_color: var(--zdt_tagWithIconGrey_text);
|
|
60
|
+
--tag_border_color: var(--zdt_tagWithIconGrey_border);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.blue {
|
|
64
|
+
--tag_bg_color: var(--zdt_tagWithIconBlue_bg);
|
|
65
|
+
--tag_text_color: var(--zdt_tagWithIconBlue_text);
|
|
66
|
+
--tag_border_color: var(--zdt_tagWithIconBlue_border);
|
|
67
67
|
}
|
|
@@ -2,10 +2,150 @@ import React from 'react';
|
|
|
2
2
|
import { render } from '@testing-library/react';
|
|
3
3
|
import Upload from "../Upload";
|
|
4
4
|
describe('Upload', () => {
|
|
5
|
+
const mockOnRemove = jest.fn();
|
|
6
|
+
const mockEleRef = jest.fn();
|
|
7
|
+
const size = ['small', 'medium'];
|
|
8
|
+
const palette = ['light', 'night'];
|
|
5
9
|
test('rendering the defult props', () => {
|
|
6
10
|
const {
|
|
7
11
|
asFragment
|
|
8
12
|
} = render( /*#__PURE__*/React.createElement(Upload, null));
|
|
9
13
|
expect(asFragment()).toMatchSnapshot();
|
|
10
14
|
});
|
|
15
|
+
test('rendering the isPreview prop', () => {
|
|
16
|
+
const {
|
|
17
|
+
asFragment
|
|
18
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
19
|
+
isPreview: true
|
|
20
|
+
}));
|
|
21
|
+
expect(asFragment()).toMatchSnapshot();
|
|
22
|
+
});
|
|
23
|
+
test('rendering the isPreview prop is false', () => {
|
|
24
|
+
const {
|
|
25
|
+
asFragment
|
|
26
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
27
|
+
isPreview: false
|
|
28
|
+
}));
|
|
29
|
+
expect(asFragment()).toMatchSnapshot();
|
|
30
|
+
});
|
|
31
|
+
test('rendering the tooltip prop', () => {
|
|
32
|
+
const {
|
|
33
|
+
asFragment
|
|
34
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
35
|
+
tooltip: "Tooltip"
|
|
36
|
+
}));
|
|
37
|
+
expect(asFragment()).toMatchSnapshot();
|
|
38
|
+
});
|
|
39
|
+
test('rendering the dataId prop with isPreview isPreviewType are true ', () => {
|
|
40
|
+
const {
|
|
41
|
+
asFragment
|
|
42
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
43
|
+
dataId: "TestdataId",
|
|
44
|
+
isPreview: true,
|
|
45
|
+
isPreviewType: true,
|
|
46
|
+
onRemove: mockOnRemove
|
|
47
|
+
}));
|
|
48
|
+
expect(asFragment()).toMatchSnapshot();
|
|
49
|
+
});
|
|
50
|
+
test('rendering the dataId prop with isPreviewType is false', () => {
|
|
51
|
+
const {
|
|
52
|
+
asFragment
|
|
53
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
54
|
+
dataId: "TestdataId",
|
|
55
|
+
isPreview: true,
|
|
56
|
+
onRemove: mockOnRemove,
|
|
57
|
+
isPreviewType: false
|
|
58
|
+
}));
|
|
59
|
+
expect(asFragment()).toMatchSnapshot();
|
|
60
|
+
});
|
|
61
|
+
test('rendering the dataSelectorId prop', () => {
|
|
62
|
+
const {
|
|
63
|
+
asFragment
|
|
64
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
65
|
+
dataSelectorId: "selectorId"
|
|
66
|
+
}));
|
|
67
|
+
expect(asFragment()).toMatchSnapshot();
|
|
68
|
+
});
|
|
69
|
+
test('rendering the progressValue prop', () => {
|
|
70
|
+
const {
|
|
71
|
+
asFragment
|
|
72
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
73
|
+
isPreview: true,
|
|
74
|
+
progressValue: "90"
|
|
75
|
+
}));
|
|
76
|
+
expect(asFragment()).toMatchSnapshot();
|
|
77
|
+
});
|
|
78
|
+
test('rendering the iconName prop', () => {
|
|
79
|
+
const {
|
|
80
|
+
asFragment
|
|
81
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
82
|
+
isPreviewType: false,
|
|
83
|
+
iconName: "ZD-close"
|
|
84
|
+
}));
|
|
85
|
+
expect(asFragment()).toMatchSnapshot();
|
|
86
|
+
});
|
|
87
|
+
test('rendering the fileSize prop', () => {
|
|
88
|
+
const {
|
|
89
|
+
asFragment
|
|
90
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
91
|
+
isPreviewType: false,
|
|
92
|
+
fileSize: "400kb"
|
|
93
|
+
}));
|
|
94
|
+
expect(asFragment()).toMatchSnapshot();
|
|
95
|
+
});
|
|
96
|
+
test('rendering the imgSrc prop', () => {
|
|
97
|
+
const {
|
|
98
|
+
asFragment
|
|
99
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
100
|
+
isPreviewType: true,
|
|
101
|
+
imgSrc: "http://sampleImageUrl.com"
|
|
102
|
+
}));
|
|
103
|
+
expect(asFragment()).toMatchSnapshot();
|
|
104
|
+
});
|
|
105
|
+
test('rendering the isPreviewType true prop', () => {
|
|
106
|
+
const {
|
|
107
|
+
asFragment
|
|
108
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
109
|
+
isPreviewType: true
|
|
110
|
+
}));
|
|
111
|
+
expect(asFragment()).toMatchSnapshot();
|
|
112
|
+
});
|
|
113
|
+
test('rendering the isPreviewType false prop', () => {
|
|
114
|
+
const {
|
|
115
|
+
asFragment
|
|
116
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
117
|
+
isPreviewType: false
|
|
118
|
+
}));
|
|
119
|
+
expect(asFragment()).toMatchSnapshot();
|
|
120
|
+
});
|
|
121
|
+
test('rendering the onRemove prop', () => {
|
|
122
|
+
const {
|
|
123
|
+
asFragment
|
|
124
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
125
|
+
onRemove: mockOnRemove
|
|
126
|
+
}));
|
|
127
|
+
expect(asFragment()).toMatchSnapshot();
|
|
128
|
+
});
|
|
129
|
+
test.each(size)('rendering the size of - %s', size => {
|
|
130
|
+
const {
|
|
131
|
+
asFragment
|
|
132
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
133
|
+
size: size
|
|
134
|
+
}));
|
|
135
|
+
expect(asFragment()).toMatchSnapshot();
|
|
136
|
+
});
|
|
137
|
+
test.each(palette)('rendering the palette of - %s', palette => {
|
|
138
|
+
const {
|
|
139
|
+
asFragment
|
|
140
|
+
} = render( /*#__PURE__*/React.createElement(Upload, {
|
|
141
|
+
palette: palette
|
|
142
|
+
}));
|
|
143
|
+
expect(asFragment()).toMatchSnapshot();
|
|
144
|
+
});
|
|
145
|
+
test('eleRef prop is a function', () => {
|
|
146
|
+
render( /*#__PURE__*/React.createElement(Upload, {
|
|
147
|
+
getRef: mockEleRef
|
|
148
|
+
}));
|
|
149
|
+
expect(mockEleRef).toHaveBeenCalled();
|
|
150
|
+
});
|
|
11
151
|
});
|