@qiwi/pijma-desktop-extra 0.1.0
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 +0 -0
- package/lib/dts/main/amount/AmountProps.d.ts +9 -0
- package/lib/dts/main/amount/index.d.ts +3 -0
- package/lib/dts/main/checkbox/CheckboxProps.d.ts +9 -0
- package/lib/dts/main/checkbox/index.d.ts +7 -0
- package/lib/dts/main/chip/ChipProps.d.ts +4 -0
- package/lib/dts/main/chip/index.d.ts +4 -0
- package/lib/dts/main/date-picker/DatePickerProps.d.ts +4 -0
- package/lib/dts/main/date-picker/DatePickerState.d.ts +7 -0
- package/lib/dts/main/date-picker/index.d.ts +5 -0
- package/lib/dts/main/date-picker/locale.d.ts +3 -0
- package/lib/dts/main/date-picker/wrap.d.ts +6 -0
- package/lib/dts/main/date-range-picker/DateRangePickerState.d.ts +5 -0
- package/lib/dts/main/date-range-picker/DateRangerPickerProps.d.ts +11 -0
- package/lib/dts/main/date-range-picker/index.d.ts +15 -0
- package/lib/dts/main/divider/DividerProps.d.ts +7 -0
- package/lib/dts/main/divider/index.d.ts +3 -0
- package/lib/dts/main/dropdown/Container.d.ts +24 -0
- package/lib/dts/main/dropdown/ContainerProps.d.ts +13 -0
- package/lib/dts/main/dropdown/DropdownProps.d.ts +10 -0
- package/lib/dts/main/dropdown/index.d.ts +14 -0
- package/lib/dts/main/empty-page/index.d.ts +5 -0
- package/lib/dts/main/error-message/ErrorMessageProps.d.ts +6 -0
- package/lib/dts/main/error-message/index.d.ts +6 -0
- package/lib/dts/main/file-uploader/FileUploaderControl.d.ts +4 -0
- package/lib/dts/main/file-uploader/FileUploaderControlProps.d.ts +12 -0
- package/lib/dts/main/file-uploader/FileUploaderProps.d.ts +15 -0
- package/lib/dts/main/file-uploader/FileUploaderStyles.d.ts +16 -0
- package/lib/dts/main/file-uploader/index.d.ts +4 -0
- package/lib/dts/main/footer/index.d.ts +6 -0
- package/lib/dts/main/header/HeaderProps.d.ts +21 -0
- package/lib/dts/main/header/index.d.ts +5 -0
- package/lib/dts/main/icon/IconProps.d.ts +7 -0
- package/lib/dts/main/icon/index.d.ts +5 -0
- package/lib/dts/main/index.d.ts +29 -0
- package/lib/dts/main/logo/index.d.ts +2 -0
- package/lib/dts/main/menu/MenuProps.d.ts +8 -0
- package/lib/dts/main/menu/index.d.ts +10 -0
- package/lib/dts/main/menu/interfaces.d.ts +9 -0
- package/lib/dts/main/navigation-menu/NavigationMenuProps.d.ts +13 -0
- package/lib/dts/main/navigation-menu/index.d.ts +5 -0
- package/lib/dts/main/obfuscatedPan/ObfuscatedPanProps.d.ts +4 -0
- package/lib/dts/main/obfuscatedPan/index.d.ts +3 -0
- package/lib/dts/main/offset/OffsetProps.d.ts +6 -0
- package/lib/dts/main/offset/index.d.ts +6 -0
- package/lib/dts/main/paginator/PaginatorProps.d.ts +10 -0
- package/lib/dts/main/paginator/index.d.ts +25 -0
- package/lib/dts/main/product/ProductProps.d.ts +8 -0
- package/lib/dts/main/product/ProductState.d.ts +3 -0
- package/lib/dts/main/product/index.d.ts +10 -0
- package/lib/dts/main/select/SelectProps.d.ts +15 -0
- package/lib/dts/main/select/SelectState.d.ts +5 -0
- package/lib/dts/main/select/index.d.ts +14 -0
- package/lib/dts/main/spinner/index.d.ts +2 -0
- package/lib/dts/main/spreader/index.d.ts +6 -0
- package/lib/dts/main/step/StepProps.d.ts +10 -0
- package/lib/dts/main/step/StepStyle.d.ts +9 -0
- package/lib/dts/main/step/index.d.ts +4 -0
- package/lib/dts/main/step/interfaces.d.ts +1 -0
- package/lib/dts/main/stepper/StepperControl.d.ts +4 -0
- package/lib/dts/main/stepper/StepperControlProps.d.ts +10 -0
- package/lib/dts/main/stepper/StepperProps.d.ts +6 -0
- package/lib/dts/main/stepper/index.d.ts +4 -0
- package/lib/dts/main/table/column.d.ts +1 -0
- package/lib/dts/main/table/constants.d.ts +3 -0
- package/lib/dts/main/table/index.d.ts +3 -0
- package/lib/dts/main/theme/color.d.ts +78 -0
- package/lib/dts/main/theme/dimen.d.ts +9 -0
- package/lib/dts/main/theme/grid.d.ts +1 -0
- package/lib/dts/main/theme/index.d.ts +3 -0
- package/lib/dts/main/theme/text.d.ts +19 -0
- package/lib/dts/main/trinary-check-icon/TrinaryCheckboxProps.d.ts +5 -0
- package/lib/dts/main/trinary-check-icon/index.d.ts +4 -0
- package/lib/dts/main/user-profile/UserProfileProps.d.ts +4 -0
- package/lib/dts/main/user-profile/index.d.ts +5 -0
- package/lib/dts/test/amount.d.ts +1 -0
- package/lib/dts/test/checkbox.d.ts +1 -0
- package/lib/dts/test/datePicker.d.ts +1 -0
- package/lib/dts/test/dateRangePicker.d.ts +1 -0
- package/lib/dts/test/divider.d.ts +1 -0
- package/lib/dts/test/dropdown.d.ts +1 -0
- package/lib/dts/test/errorMessage.d.ts +1 -0
- package/lib/dts/test/header.d.ts +1 -0
- package/lib/dts/test/icon.d.ts +1 -0
- package/lib/dts/test/navigationMenu.d.ts +1 -0
- package/lib/dts/test/obfuscatedPan.d.ts +1 -0
- package/lib/dts/test/offset.d.ts +1 -0
- package/lib/dts/test/paginator.d.ts +1 -0
- package/lib/dts/test/product.d.ts +1 -0
- package/lib/dts/test/select.d.ts +1 -0
- package/lib/dts/test/spinner.d.ts +1 -0
- package/lib/dts/test/table.d.ts +1 -0
- package/lib/dts/test/trinary-check-icon.d.ts +1 -0
- package/lib/dts/test/userProfile.d.ts +1 -0
- package/lib/es5/main/amount/AmountProps.js +4 -0
- package/lib/es5/main/amount/index.js +27 -0
- package/lib/es5/main/checkbox/CheckboxProps.js +4 -0
- package/lib/es5/main/checkbox/index.js +65 -0
- package/lib/es5/main/chip/ChipProps.js +4 -0
- package/lib/es5/main/chip/index.js +57 -0
- package/lib/es5/main/date-picker/DatePickerProps.js +4 -0
- package/lib/es5/main/date-picker/DatePickerState.js +4 -0
- package/lib/es5/main/date-picker/index.js +177 -0
- package/lib/es5/main/date-picker/locale.js +59 -0
- package/lib/es5/main/date-picker/wrap.js +28 -0
- package/lib/es5/main/date-range-picker/DateRangePickerState.js +4 -0
- package/lib/es5/main/date-range-picker/DateRangerPickerProps.js +4 -0
- package/lib/es5/main/date-range-picker/index.js +243 -0
- package/lib/es5/main/divider/DividerProps.js +4 -0
- package/lib/es5/main/divider/index.js +42 -0
- package/lib/es5/main/dropdown/Container.js +145 -0
- package/lib/es5/main/dropdown/ContainerProps.js +4 -0
- package/lib/es5/main/dropdown/DropdownProps.js +4 -0
- package/lib/es5/main/dropdown/index.js +86 -0
- package/lib/es5/main/empty-page/index.js +89 -0
- package/lib/es5/main/error-message/ErrorMessageProps.js +4 -0
- package/lib/es5/main/error-message/index.js +71 -0
- package/lib/es5/main/file-uploader/FileUploaderControl.js +28 -0
- package/lib/es5/main/file-uploader/FileUploaderControlProps.js +4 -0
- package/lib/es5/main/file-uploader/FileUploaderProps.js +4 -0
- package/lib/es5/main/file-uploader/FileUploaderStyles.js +60 -0
- package/lib/es5/main/file-uploader/index.js +109 -0
- package/lib/es5/main/footer/index.js +115 -0
- package/lib/es5/main/header/HeaderProps.js +4 -0
- package/lib/es5/main/header/index.js +110 -0
- package/lib/es5/main/icon/IconProps.js +4 -0
- package/lib/es5/main/icon/index.js +54 -0
- package/lib/es5/main/index.js +34 -0
- package/lib/es5/main/logo/index.js +96 -0
- package/lib/es5/main/menu/MenuProps.js +4 -0
- package/lib/es5/main/menu/index.js +137 -0
- package/lib/es5/main/menu/interfaces.js +4 -0
- package/lib/es5/main/navigation-menu/NavigationMenuProps.js +4 -0
- package/lib/es5/main/navigation-menu/index.js +65 -0
- package/lib/es5/main/obfuscatedPan/ObfuscatedPanProps.js +4 -0
- package/lib/es5/main/obfuscatedPan/index.js +22 -0
- package/lib/es5/main/offset/OffsetProps.js +4 -0
- package/lib/es5/main/offset/index.js +34 -0
- package/lib/es5/main/paginator/PaginatorProps.js +4 -0
- package/lib/es5/main/paginator/index.js +140 -0
- package/lib/es5/main/product/ProductProps.js +4 -0
- package/lib/es5/main/product/ProductState.js +4 -0
- package/lib/es5/main/product/index.js +139 -0
- package/lib/es5/main/select/SelectProps.js +4 -0
- package/lib/es5/main/select/SelectState.js +4 -0
- package/lib/es5/main/select/index.js +156 -0
- package/lib/es5/main/spinner/index.js +22 -0
- package/lib/es5/main/spreader/index.js +22 -0
- package/lib/es5/main/step/StepProps.js +4 -0
- package/lib/es5/main/step/StepStyle.js +54 -0
- package/lib/es5/main/step/index.js +46 -0
- package/lib/es5/main/step/interfaces.js +4 -0
- package/lib/es5/main/stepper/StepperControl.js +32 -0
- package/lib/es5/main/stepper/StepperControlProps.js +4 -0
- package/lib/es5/main/stepper/StepperProps.js +4 -0
- package/lib/es5/main/stepper/index.js +54 -0
- package/lib/es5/main/table/column.js +27 -0
- package/lib/es5/main/table/constants.js +25 -0
- package/lib/es5/main/table/index.js +101 -0
- package/lib/es5/main/theme/color.js +127 -0
- package/lib/es5/main/theme/dimen.js +32 -0
- package/lib/es5/main/theme/grid.js +11 -0
- package/lib/es5/main/theme/index.js +25 -0
- package/lib/es5/main/theme/text.js +33 -0
- package/lib/es5/main/trinary-check-icon/TrinaryCheckboxProps.js +4 -0
- package/lib/es5/main/trinary-check-icon/index.js +63 -0
- package/lib/es5/main/user-profile/UserProfileProps.js +4 -0
- package/lib/es5/main/user-profile/index.js +73 -0
- package/lib/es5/test/amount.js +21 -0
- package/lib/es5/test/checkbox.js +47 -0
- package/lib/es5/test/datePicker.js +35 -0
- package/lib/es5/test/dateRangePicker.js +39 -0
- package/lib/es5/test/divider.js +24 -0
- package/lib/es5/test/dropdown.js +71 -0
- package/lib/es5/test/errorMessage.js +29 -0
- package/lib/es5/test/header.js +119 -0
- package/lib/es5/test/icon.js +31 -0
- package/lib/es5/test/navigationMenu.js +105 -0
- package/lib/es5/test/obfuscatedPan.js +21 -0
- package/lib/es5/test/offset.js +18 -0
- package/lib/es5/test/paginator.js +23 -0
- package/lib/es5/test/product.js +52 -0
- package/lib/es5/test/select.js +30 -0
- package/lib/es5/test/spinner.js +18 -0
- package/lib/es5/test/table.js +73 -0
- package/lib/es5/test/trinary-check-icon.js +32 -0
- package/lib/es5/test/userProfile.js +26 -0
- package/lib/es6/main/amount/AmountProps.js +1 -0
- package/lib/es6/main/amount/index.js +15 -0
- package/lib/es6/main/checkbox/CheckboxProps.js +1 -0
- package/lib/es6/main/checkbox/index.js +40 -0
- package/lib/es6/main/chip/ChipProps.js +1 -0
- package/lib/es6/main/chip/index.js +38 -0
- package/lib/es6/main/date-picker/DatePickerProps.js +1 -0
- package/lib/es6/main/date-picker/DatePickerState.js +1 -0
- package/lib/es6/main/date-picker/index.js +143 -0
- package/lib/es6/main/date-picker/locale.js +32 -0
- package/lib/es6/main/date-picker/wrap.js +214 -0
- package/lib/es6/main/date-range-picker/DateRangePickerState.js +1 -0
- package/lib/es6/main/date-range-picker/DateRangerPickerProps.js +1 -0
- package/lib/es6/main/date-range-picker/index.js +207 -0
- package/lib/es6/main/divider/DividerProps.js +1 -0
- package/lib/es6/main/divider/index.js +15 -0
- package/lib/es6/main/dropdown/Container.js +75 -0
- package/lib/es6/main/dropdown/ContainerProps.js +1 -0
- package/lib/es6/main/dropdown/DropdownProps.js +1 -0
- package/lib/es6/main/dropdown/index.js +47 -0
- package/lib/es6/main/empty-page/index.js +70 -0
- package/lib/es6/main/error-message/ErrorMessageProps.js +1 -0
- package/lib/es6/main/error-message/index.js +42 -0
- package/lib/es6/main/file-uploader/FileUploaderControl.js +15 -0
- package/lib/es6/main/file-uploader/FileUploaderControlProps.js +1 -0
- package/lib/es6/main/file-uploader/FileUploaderProps.js +1 -0
- package/lib/es6/main/file-uploader/FileUploaderStyles.js +16 -0
- package/lib/es6/main/file-uploader/index.js +77 -0
- package/lib/es6/main/footer/index.js +90 -0
- package/lib/es6/main/header/HeaderProps.js +1 -0
- package/lib/es6/main/header/index.js +84 -0
- package/lib/es6/main/icon/IconProps.js +1 -0
- package/lib/es6/main/icon/index.js +24 -0
- package/lib/es6/main/index.js +29 -0
- package/lib/es6/main/logo/index.js +83 -0
- package/lib/es6/main/menu/MenuProps.js +1 -0
- package/lib/es6/main/menu/index.js +116 -0
- package/lib/es6/main/menu/interfaces.js +1 -0
- package/lib/es6/main/navigation-menu/NavigationMenuProps.js +1 -0
- package/lib/es6/main/navigation-menu/index.js +38 -0
- package/lib/es6/main/obfuscatedPan/ObfuscatedPanProps.js +1 -0
- package/lib/es6/main/obfuscatedPan/index.js +10 -0
- package/lib/es6/main/offset/OffsetProps.js +1 -0
- package/lib/es6/main/offset/index.js +7 -0
- package/lib/es6/main/paginator/PaginatorProps.js +1 -0
- package/lib/es6/main/paginator/index.js +115 -0
- package/lib/es6/main/product/ProductProps.js +1 -0
- package/lib/es6/main/product/ProductState.js +1 -0
- package/lib/es6/main/product/index.js +89 -0
- package/lib/es6/main/select/SelectProps.js +1 -0
- package/lib/es6/main/select/SelectState.js +1 -0
- package/lib/es6/main/select/index.js +118 -0
- package/lib/es6/main/spinner/index.js +9 -0
- package/lib/es6/main/spreader/index.js +11 -0
- package/lib/es6/main/step/StepProps.js +1 -0
- package/lib/es6/main/step/StepStyle.js +36 -0
- package/lib/es6/main/step/index.js +24 -0
- package/lib/es6/main/step/interfaces.js +1 -0
- package/lib/es6/main/stepper/StepperControl.js +18 -0
- package/lib/es6/main/stepper/StepperControlProps.js +1 -0
- package/lib/es6/main/stepper/StepperProps.js +1 -0
- package/lib/es6/main/stepper/index.js +37 -0
- package/lib/es6/main/table/column.js +16 -0
- package/lib/es6/main/table/constants.js +4 -0
- package/lib/es6/main/table/index.js +116 -0
- package/lib/es6/main/theme/color.js +79 -0
- package/lib/es6/main/theme/dimen.js +8 -0
- package/lib/es6/main/theme/grid.js +1 -0
- package/lib/es6/main/theme/index.js +3 -0
- package/lib/es6/main/theme/text.js +12 -0
- package/lib/es6/main/trinary-check-icon/TrinaryCheckboxProps.js +1 -0
- package/lib/es6/main/trinary-check-icon/index.js +43 -0
- package/lib/es6/main/user-profile/UserProfileProps.js +1 -0
- package/lib/es6/main/user-profile/index.js +32 -0
- package/lib/es6/test/amount.js +16 -0
- package/lib/es6/test/checkbox.js +42 -0
- package/lib/es6/test/datePicker.js +30 -0
- package/lib/es6/test/dateRangePicker.js +34 -0
- package/lib/es6/test/divider.js +19 -0
- package/lib/es6/test/dropdown.js +66 -0
- package/lib/es6/test/errorMessage.js +24 -0
- package/lib/es6/test/header.js +114 -0
- package/lib/es6/test/icon.js +26 -0
- package/lib/es6/test/navigationMenu.js +98 -0
- package/lib/es6/test/obfuscatedPan.js +16 -0
- package/lib/es6/test/offset.js +13 -0
- package/lib/es6/test/paginator.js +18 -0
- package/lib/es6/test/product.js +47 -0
- package/lib/es6/test/select.js +25 -0
- package/lib/es6/test/spinner.js +13 -0
- package/lib/es6/test/table.js +64 -0
- package/lib/es6/test/trinary-check-icon.js +27 -0
- package/lib/es6/test/userProfile.js +21 -0
- package/package.json +83 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider, themes } from '@qiwi/pijma-core';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import renderer from 'react-test-renderer';
|
|
5
|
+
import { DatePicker } from '../main/index.js';
|
|
6
|
+
describe('DatePicker', ()=>{
|
|
7
|
+
it('is properly exported from lib index', ()=>{
|
|
8
|
+
expect(DatePicker).not.toBeUndefined();
|
|
9
|
+
});
|
|
10
|
+
it('renders correctly', ()=>{
|
|
11
|
+
const datePicker = renderer.create(/*#__PURE__*/ _jsx(ThemeProvider, {
|
|
12
|
+
theme: themes.orange,
|
|
13
|
+
children: /*#__PURE__*/ _jsx(DatePicker, {
|
|
14
|
+
title: "Date"
|
|
15
|
+
})
|
|
16
|
+
}), {
|
|
17
|
+
createNodeMock: (element)=>{
|
|
18
|
+
if (element.type === 'input') {
|
|
19
|
+
// mock a focus function
|
|
20
|
+
return {
|
|
21
|
+
focus: ()=>{
|
|
22
|
+
/* noop */ }
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
}).toJSON();
|
|
28
|
+
expect(datePicker).toMatchSnapshot();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider, themes } from '@qiwi/pijma-core';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import renderer from 'react-test-renderer';
|
|
5
|
+
import { DateRangePicker } from '../main/index.js';
|
|
6
|
+
describe('DateRangePicker', ()=>{
|
|
7
|
+
it('is properly exported from lib index', ()=>{
|
|
8
|
+
expect(DateRangePicker).not.toBeUndefined();
|
|
9
|
+
});
|
|
10
|
+
it('renders correctly', ()=>{
|
|
11
|
+
const dateRangePicker = renderer.create(/*#__PURE__*/ _jsx(ThemeProvider, {
|
|
12
|
+
theme: themes.orange,
|
|
13
|
+
children: /*#__PURE__*/ _jsx(DateRangePicker, {
|
|
14
|
+
onChange: ()=>{
|
|
15
|
+
/* noop */ },
|
|
16
|
+
dateTo: new Date('5/8/2019'),
|
|
17
|
+
dateFrom: new Date('5/8/2019'),
|
|
18
|
+
title: "Date"
|
|
19
|
+
})
|
|
20
|
+
}), {
|
|
21
|
+
createNodeMock: (element)=>{
|
|
22
|
+
if (element.type === 'input') {
|
|
23
|
+
// mock a focus function
|
|
24
|
+
return {
|
|
25
|
+
focus: ()=>{
|
|
26
|
+
/* noop */ }
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
}).toJSON();
|
|
32
|
+
expect(dateRangePicker).toMatchSnapshot();
|
|
33
|
+
});
|
|
34
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider, themes } from '@qiwi/pijma-desktop';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import renderer from 'react-test-renderer';
|
|
5
|
+
import { Divider } from '../main/index.js';
|
|
6
|
+
describe('Divider', ()=>{
|
|
7
|
+
it('is properly exported from lib index', ()=>{
|
|
8
|
+
expect(Divider).not.toBeUndefined();
|
|
9
|
+
});
|
|
10
|
+
it('renders correctly', ()=>{
|
|
11
|
+
const divider = renderer.create(/*#__PURE__*/ _jsx(ThemeProvider, {
|
|
12
|
+
theme: themes.orange,
|
|
13
|
+
children: /*#__PURE__*/ _jsx(Divider, {
|
|
14
|
+
active: true
|
|
15
|
+
})
|
|
16
|
+
})).toJSON();
|
|
17
|
+
expect(divider).toMatchSnapshot();
|
|
18
|
+
});
|
|
19
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider, themes } from '@qiwi/pijma-core';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import renderer from 'react-test-renderer';
|
|
5
|
+
import { Container, Dropdown } from '../main/index.js';
|
|
6
|
+
describe('Dropdown', ()=>{
|
|
7
|
+
it('is properly exported from lib index', ()=>{
|
|
8
|
+
expect(Dropdown).not.toBeUndefined();
|
|
9
|
+
});
|
|
10
|
+
it('renders correctly', ()=>{
|
|
11
|
+
const dropdown = renderer.create(/*#__PURE__*/ _jsx(Dropdown, {
|
|
12
|
+
value: "SUCCESSFUL",
|
|
13
|
+
items: [
|
|
14
|
+
{
|
|
15
|
+
name: 'Все',
|
|
16
|
+
value: ''
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'Проведенные',
|
|
20
|
+
value: 'SUCCESSFUL'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Новые',
|
|
24
|
+
value: 'NEW'
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: 'Отклоненные',
|
|
28
|
+
value: 'DECLINED'
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
show: false,
|
|
32
|
+
onChange: ()=>{
|
|
33
|
+
/* noop */ }
|
|
34
|
+
})).toJSON();
|
|
35
|
+
expect(dropdown).toMatchSnapshot();
|
|
36
|
+
});
|
|
37
|
+
it('inner renders correctly', ()=>{
|
|
38
|
+
const container = renderer.create(/*#__PURE__*/ _jsx(ThemeProvider, {
|
|
39
|
+
theme: themes.orange,
|
|
40
|
+
children: /*#__PURE__*/ _jsx(Container, {
|
|
41
|
+
value: "SUCCESSFUL",
|
|
42
|
+
items: [
|
|
43
|
+
{
|
|
44
|
+
name: 'Все',
|
|
45
|
+
value: ''
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'Проведенные',
|
|
49
|
+
value: 'SUCCESSFUL'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'Новые',
|
|
53
|
+
value: 'NEW'
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: 'Отклоненные',
|
|
57
|
+
value: 'DECLINED'
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
onSelect: ()=>{
|
|
61
|
+
/* noop */ }
|
|
62
|
+
})
|
|
63
|
+
})).toJSON();
|
|
64
|
+
expect(container).toMatchSnapshot();
|
|
65
|
+
});
|
|
66
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { ErrorMessage } from '../main/index.js';
|
|
5
|
+
describe('Icon', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(ErrorMessage).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
it('renders correctly', ()=>{
|
|
10
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(ErrorMessage, {
|
|
11
|
+
message: "Сообщение ошибки!!!",
|
|
12
|
+
title: "Заголовок ошибки",
|
|
13
|
+
icon: "plus",
|
|
14
|
+
iconColor: "#00FF00"
|
|
15
|
+
})).toJSON();
|
|
16
|
+
expect(component).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
it('renders correctly', ()=>{
|
|
19
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(ErrorMessage, {
|
|
20
|
+
message: "Сообщение ощибки!!!"
|
|
21
|
+
})).toJSON();
|
|
22
|
+
expect(component).toMatchSnapshot();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { MemoryRouter } from 'react-router';
|
|
4
|
+
import { NavLink } from 'react-router-dom';
|
|
5
|
+
import renderer from 'react-test-renderer';
|
|
6
|
+
import { Header } from '../main/index.js';
|
|
7
|
+
const navItems = [
|
|
8
|
+
{
|
|
9
|
+
name: 'Транзакции',
|
|
10
|
+
path: '/txn'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'Статистика и аналитика',
|
|
14
|
+
path: '/'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'Документы',
|
|
18
|
+
path: '/docs'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Документы123',
|
|
22
|
+
path: '/docs123'
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
describe('Header', ()=>{
|
|
26
|
+
it('is properly exported from lib index', ()=>{
|
|
27
|
+
expect(Header).not.toBeUndefined();
|
|
28
|
+
});
|
|
29
|
+
it('renders correctly', ()=>{
|
|
30
|
+
const header = renderer.create(/*#__PURE__*/ _jsx(MemoryRouter, {
|
|
31
|
+
children: /*#__PURE__*/ _jsx(Header, {
|
|
32
|
+
isLoading: false,
|
|
33
|
+
title: 'Выплаты',
|
|
34
|
+
userName: 'best_test@test.ru',
|
|
35
|
+
selectorData: {
|
|
36
|
+
items: [
|
|
37
|
+
'Test_Agent'
|
|
38
|
+
],
|
|
39
|
+
currentItem: 'Test_Agent'
|
|
40
|
+
},
|
|
41
|
+
// @ts-ignore
|
|
42
|
+
link: NavLink,
|
|
43
|
+
navItems: navItems,
|
|
44
|
+
navActiveItem: {
|
|
45
|
+
pathname: '/docs'
|
|
46
|
+
},
|
|
47
|
+
onItemChange: ()=>{
|
|
48
|
+
/* noop */ },
|
|
49
|
+
onLogout: ()=>{
|
|
50
|
+
/* noop */ }
|
|
51
|
+
})
|
|
52
|
+
})).toJSON();
|
|
53
|
+
expect(header).toMatchSnapshot();
|
|
54
|
+
});
|
|
55
|
+
it('renders correctly', ()=>{
|
|
56
|
+
const header = renderer.create(/*#__PURE__*/ _jsx(MemoryRouter, {
|
|
57
|
+
children: /*#__PURE__*/ _jsx(Header, {
|
|
58
|
+
isLoading: false,
|
|
59
|
+
title: 'Выплаты',
|
|
60
|
+
userName: 'best_test@test.ru',
|
|
61
|
+
selectorData: {
|
|
62
|
+
items: [],
|
|
63
|
+
currentItem: ''
|
|
64
|
+
},
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
link: NavLink,
|
|
67
|
+
navItems: navItems,
|
|
68
|
+
onItemChange: ()=>{
|
|
69
|
+
/* noop */ },
|
|
70
|
+
onLogout: ()=>{
|
|
71
|
+
/* noop */ }
|
|
72
|
+
})
|
|
73
|
+
})).toJSON();
|
|
74
|
+
expect(header).toMatchSnapshot();
|
|
75
|
+
});
|
|
76
|
+
it('renders correctly', ()=>{
|
|
77
|
+
const header = renderer.create(/*#__PURE__*/ _jsx(MemoryRouter, {
|
|
78
|
+
children: /*#__PURE__*/ _jsx(Header, {
|
|
79
|
+
isLoading: false,
|
|
80
|
+
title: 'Выплаты',
|
|
81
|
+
userName: 'best_test@test.ru',
|
|
82
|
+
selectorData: {
|
|
83
|
+
items: [],
|
|
84
|
+
currentItem: ''
|
|
85
|
+
},
|
|
86
|
+
// @ts-ignore
|
|
87
|
+
link: NavLink,
|
|
88
|
+
navItems: [],
|
|
89
|
+
onItemChange: ()=>{
|
|
90
|
+
/* noop */ },
|
|
91
|
+
onLogout: ()=>{
|
|
92
|
+
/* noop */ }
|
|
93
|
+
})
|
|
94
|
+
})).toJSON();
|
|
95
|
+
expect(header).toMatchSnapshot();
|
|
96
|
+
});
|
|
97
|
+
it('renders correctly', ()=>{
|
|
98
|
+
const header = renderer.create(/*#__PURE__*/ _jsx(MemoryRouter, {
|
|
99
|
+
children: /*#__PURE__*/ _jsx(Header, {
|
|
100
|
+
isLoading: true,
|
|
101
|
+
title: 'Выплаты',
|
|
102
|
+
userName: '',
|
|
103
|
+
selectorData: {
|
|
104
|
+
items: [],
|
|
105
|
+
currentItem: ''
|
|
106
|
+
},
|
|
107
|
+
// @ts-ignore
|
|
108
|
+
link: NavLink,
|
|
109
|
+
navItems: navItems
|
|
110
|
+
})
|
|
111
|
+
})).toJSON();
|
|
112
|
+
expect(header).toMatchSnapshot();
|
|
113
|
+
});
|
|
114
|
+
});
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { B2bIcon } from '../main/index.js';
|
|
5
|
+
describe('Icon', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(B2bIcon).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
it('renders correctly', ()=>{
|
|
10
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(B2bIcon, {
|
|
11
|
+
// @ts-ignore
|
|
12
|
+
icon: "plus"
|
|
13
|
+
})).toJSON();
|
|
14
|
+
expect(component).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
it('renders correctly', ()=>{
|
|
17
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(B2bIcon, {
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
icon: "plus",
|
|
20
|
+
iconColor: "#FF0000",
|
|
21
|
+
h: 50,
|
|
22
|
+
w: 50
|
|
23
|
+
})).toJSON();
|
|
24
|
+
expect(component).toMatchSnapshot();
|
|
25
|
+
});
|
|
26
|
+
});
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { MemoryRouter } from 'react-router';
|
|
4
|
+
import { NavLink } from 'react-router-dom';
|
|
5
|
+
import renderer from 'react-test-renderer';
|
|
6
|
+
import { NavigationMenu } from '../main/index.js';
|
|
7
|
+
const navItems = [
|
|
8
|
+
{
|
|
9
|
+
name: 'Транзакции',
|
|
10
|
+
path: '/txn'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: 'Статистика и аналитика',
|
|
14
|
+
path: '/'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'Документы',
|
|
18
|
+
path: '/docs'
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
name: 'Документы123',
|
|
22
|
+
path: '/docs123'
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
describe('NavigationMenu', ()=>{
|
|
26
|
+
it('is properly exported from lib index', ()=>{
|
|
27
|
+
expect(NavigationMenu).not.toBeUndefined();
|
|
28
|
+
});
|
|
29
|
+
it('renders correctly', ()=>{
|
|
30
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(MemoryRouter, {
|
|
31
|
+
children: /*#__PURE__*/ _jsx(NavigationMenu, {
|
|
32
|
+
link: NavLink,
|
|
33
|
+
active: '/txn',
|
|
34
|
+
items: navItems
|
|
35
|
+
})
|
|
36
|
+
})).toJSON();
|
|
37
|
+
expect(component).toMatchSnapshot();
|
|
38
|
+
});
|
|
39
|
+
it('renders correctly', ()=>{
|
|
40
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(MemoryRouter, {
|
|
41
|
+
children: /*#__PURE__*/ _jsx(NavigationMenu, {
|
|
42
|
+
link: NavLink,
|
|
43
|
+
items: []
|
|
44
|
+
})
|
|
45
|
+
})).toJSON();
|
|
46
|
+
expect(component).toMatchSnapshot();
|
|
47
|
+
});
|
|
48
|
+
it('renders correctly', ()=>{
|
|
49
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(MemoryRouter, {
|
|
50
|
+
children: /*#__PURE__*/ _jsx(NavigationMenu, {
|
|
51
|
+
link: NavLink,
|
|
52
|
+
active: '/fqefqw3fawe',
|
|
53
|
+
items: navItems
|
|
54
|
+
})
|
|
55
|
+
})).toJSON();
|
|
56
|
+
expect(component).toMatchSnapshot();
|
|
57
|
+
});
|
|
58
|
+
it('renders correctly', ()=>{
|
|
59
|
+
const items = navItems.map(({ name: value })=>{
|
|
60
|
+
const node = /*#__PURE__*/ _jsx("div", {
|
|
61
|
+
children: value
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
value,
|
|
65
|
+
node
|
|
66
|
+
};
|
|
67
|
+
});
|
|
68
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(MemoryRouter, {
|
|
69
|
+
children: /*#__PURE__*/ _jsx(NavigationMenu, {
|
|
70
|
+
active: 'Документы',
|
|
71
|
+
items: items
|
|
72
|
+
})
|
|
73
|
+
})).toJSON();
|
|
74
|
+
expect(component).toMatchSnapshot();
|
|
75
|
+
});
|
|
76
|
+
it('renders correctly', ()=>{
|
|
77
|
+
const items = navItems.map(({ name: value })=>{
|
|
78
|
+
const node = /*#__PURE__*/ _jsx("div", {
|
|
79
|
+
children: value
|
|
80
|
+
});
|
|
81
|
+
return {
|
|
82
|
+
value,
|
|
83
|
+
node
|
|
84
|
+
};
|
|
85
|
+
});
|
|
86
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(MemoryRouter, {
|
|
87
|
+
children: /*#__PURE__*/ _jsx(NavigationMenu, {
|
|
88
|
+
active: 'Документы',
|
|
89
|
+
items: items,
|
|
90
|
+
isItemSelected: ()=>{
|
|
91
|
+
/* noop */ },
|
|
92
|
+
onChange: ()=>{
|
|
93
|
+
/* noop */ }
|
|
94
|
+
})
|
|
95
|
+
})).toJSON();
|
|
96
|
+
expect(component).toMatchSnapshot();
|
|
97
|
+
});
|
|
98
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { ObfuscatedPan } from '../main/index.js';
|
|
5
|
+
describe('ObfuscatedPan', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(ObfuscatedPan).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
it('renders correctly', ()=>{
|
|
10
|
+
const obfuscatedPan = renderer.create(/*#__PURE__*/ _jsx(ObfuscatedPan, {
|
|
11
|
+
panPrefix: "*",
|
|
12
|
+
pan: "4272291111221978"
|
|
13
|
+
})).toJSON();
|
|
14
|
+
expect(obfuscatedPan).toMatchSnapshot();
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { Offset } from '../main/index.js';
|
|
5
|
+
describe('Offset', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(Offset).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
it('renders correctly', ()=>{
|
|
10
|
+
const offset = renderer.create(/*#__PURE__*/ _jsx(Offset, {})).toJSON();
|
|
11
|
+
expect(offset).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { Paginator } from '../main/index.js';
|
|
5
|
+
describe('Paginator', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(Paginator).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
it('renders correctly', ()=>{
|
|
10
|
+
const paginator = renderer.create(/*#__PURE__*/ _jsx(Paginator, {
|
|
11
|
+
activePage: 2,
|
|
12
|
+
totalItemsCount: 40,
|
|
13
|
+
pageRangeDisplayed: 5,
|
|
14
|
+
itemsCountPerPage: 10
|
|
15
|
+
})).toJSON();
|
|
16
|
+
expect(paginator).toMatchSnapshot();
|
|
17
|
+
});
|
|
18
|
+
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { Product } from '../main/index.js';
|
|
5
|
+
describe('Product', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(Product).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
it('renders correctly', ()=>{
|
|
10
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(Product, {
|
|
11
|
+
title: 'title_qwe',
|
|
12
|
+
onChange: ()=>{
|
|
13
|
+
/* noop */ },
|
|
14
|
+
selectorData: {
|
|
15
|
+
currentItem: 'CurrItemms123',
|
|
16
|
+
items: []
|
|
17
|
+
}
|
|
18
|
+
})).toJSON();
|
|
19
|
+
expect(component).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
it('renders correctly', ()=>{
|
|
22
|
+
const items = [
|
|
23
|
+
{
|
|
24
|
+
name: 'Payout_Test',
|
|
25
|
+
value: 'LNgEv2mW'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'CurrItemms123',
|
|
29
|
+
value: 'LNgEv2mW142341234'
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Payout_Test123',
|
|
33
|
+
value: 'LNgEv2mW123'
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(Product, {
|
|
37
|
+
title: 'title_qwe',
|
|
38
|
+
onChange: ()=>{
|
|
39
|
+
/* noop */ },
|
|
40
|
+
selectorData: {
|
|
41
|
+
currentItem: 'CurrItemms123',
|
|
42
|
+
items
|
|
43
|
+
}
|
|
44
|
+
})).toJSON();
|
|
45
|
+
expect(component).toMatchSnapshot();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ThemeProvider, themes } from '@qiwi/pijma-core';
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import renderer from 'react-test-renderer';
|
|
5
|
+
import { Select } from '../main/index.js';
|
|
6
|
+
describe('Select', ()=>{
|
|
7
|
+
it('closed renders correctly', ()=>{
|
|
8
|
+
const select = renderer.create(/*#__PURE__*/ _jsx(ThemeProvider, {
|
|
9
|
+
theme: themes.orange,
|
|
10
|
+
children: /*#__PURE__*/ _jsx(Select, {
|
|
11
|
+
value: "name",
|
|
12
|
+
items: [
|
|
13
|
+
{
|
|
14
|
+
name: 'name',
|
|
15
|
+
value: 'value'
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
onChange: ()=>{
|
|
19
|
+
/* noop */ },
|
|
20
|
+
title: "test"
|
|
21
|
+
})
|
|
22
|
+
})).toJSON();
|
|
23
|
+
expect(select).toMatchSnapshot();
|
|
24
|
+
});
|
|
25
|
+
});
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { B2bSpinner } from '../main/index.js';
|
|
5
|
+
describe('Offset', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(B2bSpinner).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
it('renders correctly', ()=>{
|
|
10
|
+
const offset = renderer.create(/*#__PURE__*/ _jsx(B2bSpinner, {})).toJSON();
|
|
11
|
+
expect(offset).toMatchSnapshot();
|
|
12
|
+
});
|
|
13
|
+
});
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { columnFactory, Table } from '../main/index.js';
|
|
5
|
+
describe('Table', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(Table).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
});
|
|
10
|
+
describe('columnFactory', ()=>{
|
|
11
|
+
it('handles supported types', ()=>{
|
|
12
|
+
const cases = [
|
|
13
|
+
'foo',
|
|
14
|
+
'bar',
|
|
15
|
+
10,
|
|
16
|
+
{
|
|
17
|
+
accessor: 'baz'
|
|
18
|
+
}
|
|
19
|
+
];
|
|
20
|
+
const mapping = {
|
|
21
|
+
foo: {
|
|
22
|
+
accessor: 'test'
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const result = cases.map((el)=>columnFactory(el, mapping));
|
|
26
|
+
expect(result).toEqual([
|
|
27
|
+
{
|
|
28
|
+
accessor: 'test'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
accessor: 'bar'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
width: 10
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
accessor: 'baz'
|
|
38
|
+
},
|
|
39
|
+
]);
|
|
40
|
+
});
|
|
41
|
+
it('throws err otherwise', ()=>{
|
|
42
|
+
expect(()=>columnFactory()).toThrow('unsupported table column type: undefined');
|
|
43
|
+
});
|
|
44
|
+
it('renders correctly', ()=>{
|
|
45
|
+
const table = renderer.create(/*#__PURE__*/ _jsx(Table, {
|
|
46
|
+
data: [
|
|
47
|
+
{
|
|
48
|
+
name: 'qwe',
|
|
49
|
+
value: 'qweasd'
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
onSelect: ()=>{},
|
|
53
|
+
columns: [
|
|
54
|
+
{
|
|
55
|
+
accessor: 'name'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
accessor: 'value'
|
|
59
|
+
},
|
|
60
|
+
]
|
|
61
|
+
})).toJSON();
|
|
62
|
+
expect(table).toMatchSnapshot();
|
|
63
|
+
});
|
|
64
|
+
});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { TrinaryCheckIcon } from '../main/index.js';
|
|
5
|
+
describe('TrinaryCheckIcon', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(TrinaryCheckIcon).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
it('renders correctly unchecked', ()=>{
|
|
10
|
+
const icon = renderer.create(/*#__PURE__*/ _jsx(TrinaryCheckIcon, {
|
|
11
|
+
value: 0
|
|
12
|
+
})).toJSON();
|
|
13
|
+
expect(icon).toMatchSnapshot();
|
|
14
|
+
});
|
|
15
|
+
it('renders correctly half-checked', ()=>{
|
|
16
|
+
const icon = renderer.create(/*#__PURE__*/ _jsx(TrinaryCheckIcon, {
|
|
17
|
+
value: 1
|
|
18
|
+
})).toJSON();
|
|
19
|
+
expect(icon).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
it('renders correctly checked', ()=>{
|
|
22
|
+
const icon = renderer.create(/*#__PURE__*/ _jsx(TrinaryCheckIcon, {
|
|
23
|
+
value: 2
|
|
24
|
+
})).toJSON();
|
|
25
|
+
expect(icon).toMatchSnapshot();
|
|
26
|
+
});
|
|
27
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import renderer from 'react-test-renderer';
|
|
4
|
+
import { UserProfile } from '../main/index.js';
|
|
5
|
+
describe('UserProfile', ()=>{
|
|
6
|
+
it('is properly exported from lib index', ()=>{
|
|
7
|
+
expect(UserProfile).not.toBeUndefined();
|
|
8
|
+
});
|
|
9
|
+
it('renders correctly', ()=>{
|
|
10
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(UserProfile, {
|
|
11
|
+
userName: 'testName',
|
|
12
|
+
onClick: ()=>{
|
|
13
|
+
/* noop */ }
|
|
14
|
+
})).toJSON();
|
|
15
|
+
expect(component).toMatchSnapshot();
|
|
16
|
+
});
|
|
17
|
+
it('renders correctly', ()=>{
|
|
18
|
+
const component = renderer.create(/*#__PURE__*/ _jsx(UserProfile, {})).toJSON();
|
|
19
|
+
expect(component).toMatchSnapshot();
|
|
20
|
+
});
|
|
21
|
+
});
|