react-restyle-components 0.1.86 → 0.1.87
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/lib/cjs/src/App.js +2 -3
- package/lib/cjs/src/__mocks__/styleMock.js +2 -0
- package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.spec.d.ts +1 -0
- package/lib/cjs/src/core-components/molecules/autocomplete/autocomplete.spec.js +72 -0
- package/lib/cjs/src/core-components/molecules/multi-select/multi-select.component.js +0 -1
- package/lib/package.json +73 -24
- package/lib/src/App.css +3 -2
- package/lib/src/App.js +2 -3
- package/lib/src/core-components/molecules/autocomplete/autocomplete.css +6 -1
- package/lib/src/core-components/molecules/autocomplete/autocomplete.spec.d.ts +1 -0
- package/lib/src/core-components/molecules/autocomplete/autocomplete.spec.js +67 -0
- package/lib/src/core-components/molecules/multi-select/multi-select.component.js +0 -1
- package/lib/tc.css +1 -1
- package/package.json +73 -24
- package/lib/cjs/src/core-components/atoms/buttons/buttons.test.js +0 -13
- package/lib/cjs/src/core-components/atoms/check-box/checkBox.test.js +0 -13
- package/lib/cjs/src/core-components/atoms/date-picker/date-picker.test.js +0 -14
- package/lib/cjs/src/core-components/atoms/form/form.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/form/form.test.js +0 -99
- package/lib/cjs/src/core-components/atoms/icons/icons.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/icons/icons.test.js +0 -15
- package/lib/cjs/src/core-components/atoms/input/input-pin.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/input/input-pin.test.js +0 -17
- package/lib/cjs/src/core-components/atoms/input/input.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/input/input.test.js +0 -17
- package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/input-dropdown/input-dropdown.test.js +0 -13
- package/lib/cjs/src/core-components/atoms/loader/loader.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/loader/loader.test.js +0 -13
- package/lib/cjs/src/core-components/atoms/radio/radio.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/radio/radio.test.js +0 -13
- package/lib/cjs/src/core-components/atoms/stepper/stepper.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/stepper/stepper.test.js +0 -12
- package/lib/cjs/src/core-components/atoms/tabs/tabs.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/tabs/tabs.test.js +0 -18
- package/lib/cjs/src/core-components/atoms/timer/timer.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/timer/timer.test.js +0 -19
- package/lib/cjs/src/core-components/atoms/tooltip/tooltip.component.test.d.ts +0 -1
- package/lib/cjs/src/core-components/atoms/tooltip/tooltip.component.test.js +0 -14
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.test.d.ts +0 -1
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.test.js +0 -14
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.test.d.ts +0 -1
- package/lib/cjs/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.test.js +0 -21
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.test.d.ts +0 -1
- package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.test.js +0 -15
- package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.test.d.ts +0 -1
- package/lib/cjs/src/core-components/molecules/modal-confirm/modal-confirm.test.js +0 -15
- package/lib/cjs/src/core-components/molecules/multi-select/multi-select.test.d.ts +0 -1
- package/lib/cjs/src/core-components/molecules/multi-select/multi-select.test.js +0 -15
- package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.test.d.ts +0 -1
- package/lib/cjs/src/core-components/molecules/multi-select-with-field/multi-select-with-field.test.js +0 -17
- package/lib/src/core-components/atoms/buttons/buttons.test.d.ts +0 -1
- package/lib/src/core-components/atoms/buttons/buttons.test.js +0 -8
- package/lib/src/core-components/atoms/check-box/checkBox.test.d.ts +0 -1
- package/lib/src/core-components/atoms/check-box/checkBox.test.js +0 -8
- package/lib/src/core-components/atoms/date-picker/date-picker.test.d.ts +0 -1
- package/lib/src/core-components/atoms/date-picker/date-picker.test.js +0 -9
- package/lib/src/core-components/atoms/form/form.test.d.ts +0 -1
- package/lib/src/core-components/atoms/form/form.test.js +0 -94
- package/lib/src/core-components/atoms/icons/icons.test.d.ts +0 -1
- package/lib/src/core-components/atoms/icons/icons.test.js +0 -10
- package/lib/src/core-components/atoms/input/input-pin.test.d.ts +0 -1
- package/lib/src/core-components/atoms/input/input-pin.test.js +0 -12
- package/lib/src/core-components/atoms/input/input.test.d.ts +0 -1
- package/lib/src/core-components/atoms/input/input.test.js +0 -12
- package/lib/src/core-components/atoms/input-dropdown/input-dropdown.test.d.ts +0 -1
- package/lib/src/core-components/atoms/input-dropdown/input-dropdown.test.js +0 -8
- package/lib/src/core-components/atoms/loader/loader.test.d.ts +0 -1
- package/lib/src/core-components/atoms/loader/loader.test.js +0 -8
- package/lib/src/core-components/atoms/radio/radio.test.d.ts +0 -1
- package/lib/src/core-components/atoms/radio/radio.test.js +0 -8
- package/lib/src/core-components/atoms/stepper/stepper.test.d.ts +0 -1
- package/lib/src/core-components/atoms/stepper/stepper.test.js +0 -7
- package/lib/src/core-components/atoms/tabs/tabs.test.d.ts +0 -1
- package/lib/src/core-components/atoms/tabs/tabs.test.js +0 -13
- package/lib/src/core-components/atoms/timer/timer.test.d.ts +0 -1
- package/lib/src/core-components/atoms/timer/timer.test.js +0 -14
- package/lib/src/core-components/atoms/tooltip/tooltip.component.test.d.ts +0 -1
- package/lib/src/core-components/atoms/tooltip/tooltip.component.test.js +0 -9
- package/lib/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.test.d.ts +0 -1
- package/lib/src/core-components/molecules/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.test.js +0 -9
- package/lib/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.test.d.ts +0 -1
- package/lib/src/core-components/molecules/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.test.js +0 -16
- package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.test.d.ts +0 -1
- package/lib/src/core-components/molecules/css-multiline-input/css-multiline-input.test.js +0 -10
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.test.d.ts +0 -1
- package/lib/src/core-components/molecules/modal-confirm/modal-confirm.test.js +0 -10
- package/lib/src/core-components/molecules/multi-select/multi-select.test.d.ts +0 -1
- package/lib/src/core-components/molecules/multi-select/multi-select.test.js +0 -10
- package/lib/src/core-components/molecules/multi-select-with-field/multi-select-with-field.test.d.ts +0 -1
- package/lib/src/core-components/molecules/multi-select-with-field/multi-select-with-field.test.js +0 -12
- /package/lib/cjs/src/{core-components/atoms/buttons/buttons.test.d.ts → __mocks__/styleMock.d.ts} +0 -0
- /package/lib/{cjs/src/core-components/atoms/check-box/checkBox.test.d.ts → src/__mocks__/styleMock.d.ts} +0 -0
- /package/lib/{cjs/src/core-components/atoms/date-picker/date-picker.test.d.ts → src/__mocks__/styleMock.js} +0 -0
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const react_2 = require("@testing-library/react");
|
|
8
|
-
const user_event_1 = __importDefault(require("@testing-library/user-event"));
|
|
9
|
-
const form_component_1 = require("./form.component");
|
|
10
|
-
describe('Checkbox component', () => {
|
|
11
|
-
it('render checkbox correctly', () => {
|
|
12
|
-
const checkbox = (0, react_2.render)(react_1.default.createElement(form_component_1.CheckBox, null));
|
|
13
|
-
expect(checkbox).toMatchSnapshot();
|
|
14
|
-
});
|
|
15
|
-
});
|
|
16
|
-
describe('Input component', () => {
|
|
17
|
-
it('render input correctly', () => {
|
|
18
|
-
const inputComp = (0, react_2.render)(react_1.default.createElement(form_component_1.Input, { type: "text", value: "test", onChange: (val) => jest.fn(), onBlur: (value) => jest.fn(), onKeyDown: (val) => jest.fn() }));
|
|
19
|
-
const input = inputComp.getByTestId('INPT');
|
|
20
|
-
react_2.fireEvent.change(input, { target: { value: 'check' } });
|
|
21
|
-
user_event_1.default.type(input, 'value');
|
|
22
|
-
react_2.fireEvent.blur(input);
|
|
23
|
-
react_2.fireEvent.keyDown(input, {
|
|
24
|
-
key: 'Escape',
|
|
25
|
-
code: 'Escape',
|
|
26
|
-
keyCode: 27,
|
|
27
|
-
charCode: 27,
|
|
28
|
-
});
|
|
29
|
-
react_2.fireEvent.keyPress(input, { key: 'Enter', keyCode: 13 });
|
|
30
|
-
expect(input).toMatchSnapshot();
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
describe('Toggle component', () => {
|
|
34
|
-
it('render toggle correctly', () => {
|
|
35
|
-
const toggle = (0, react_2.render)(react_1.default.createElement(form_component_1.Toggle, null));
|
|
36
|
-
expect(toggle).toMatchSnapshot();
|
|
37
|
-
});
|
|
38
|
-
});
|
|
39
|
-
// describe('SelectOption component', () => {
|
|
40
|
-
// it('render selectOption correctly', () => {
|
|
41
|
-
// const select = render(
|
|
42
|
-
// <SelectOption key='test' onChange={value => jest.fn()} value='test' />,
|
|
43
|
-
// );
|
|
44
|
-
// const selectOption = select.getByTestId('SELECT');
|
|
45
|
-
// fireEvent.change(selectOption, {target: {value: 'check'}});
|
|
46
|
-
// userEvent.type(selectOption, 'value');
|
|
47
|
-
// expect(select).toMatchSnapshot();
|
|
48
|
-
// });
|
|
49
|
-
// });
|
|
50
|
-
describe('MultilineInput component', () => {
|
|
51
|
-
it('render multilineInput correctly', () => {
|
|
52
|
-
const multi = (0, react_2.render)(react_1.default.createElement(form_component_1.MultilineInput, null));
|
|
53
|
-
expect(multi).toMatchSnapshot();
|
|
54
|
-
});
|
|
55
|
-
});
|
|
56
|
-
// describe('Clock component', () => {
|
|
57
|
-
// it('render clock correctly', () => {
|
|
58
|
-
// const clock = render(
|
|
59
|
-
// <Clock value='2022-02-20' onChange={value => jest.fn()} />,
|
|
60
|
-
// );
|
|
61
|
-
// expect(clock).toMatchSnapshot();
|
|
62
|
-
// });
|
|
63
|
-
// });
|
|
64
|
-
describe('Label component', () => {
|
|
65
|
-
it('render label correctly', () => {
|
|
66
|
-
const label = (0, react_2.render)(react_1.default.createElement(form_component_1.Label, { htmlFor: "vsdvrf" }));
|
|
67
|
-
expect(label).toMatchSnapshot();
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
describe('InputDate component', () => {
|
|
71
|
-
it('render inputDate correctly', () => {
|
|
72
|
-
const inputDate = (0, react_2.render)(react_1.default.createElement(form_component_1.InputDate, null));
|
|
73
|
-
expect(inputDate).toMatchSnapshot();
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
// describe('InputDateTime component', () => {
|
|
77
|
-
// it('render inputDateTime correctly', () => {
|
|
78
|
-
// const inputDateTime = render(<InputDateTime />);
|
|
79
|
-
// expect(inputDateTime).toMatchSnapshot();
|
|
80
|
-
// });
|
|
81
|
-
// });
|
|
82
|
-
describe('InputFile component', () => {
|
|
83
|
-
it('render inputFile correctly', () => {
|
|
84
|
-
const inputFile = (0, react_2.render)(react_1.default.createElement(form_component_1.InputFile, null));
|
|
85
|
-
expect(inputFile).toMatchSnapshot();
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
describe('InputRadio component', () => {
|
|
89
|
-
it('render inputRadio correctly', () => {
|
|
90
|
-
const inputRadio = (0, react_2.render)(react_1.default.createElement(form_component_1.InputRadio, null));
|
|
91
|
-
expect(inputRadio).toMatchSnapshot();
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
describe('InputWrapper component', () => {
|
|
95
|
-
it('render inputWrapper correctly', () => {
|
|
96
|
-
const inputWrapper = (0, react_2.render)(react_1.default.createElement(form_component_1.InputWrapper, null));
|
|
97
|
-
expect(inputWrapper).toMatchSnapshot();
|
|
98
|
-
});
|
|
99
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const _core_utils_1 = require("@core-utils");
|
|
8
|
-
const icons_component_1 = require("./icons.component");
|
|
9
|
-
it('render Icon correctly', () => {
|
|
10
|
-
const icon = (0, _core_utils_1.render)(react_1.default.createElement(icons_component_1.Icon, { nameIcon: "FaHistory", propsIcon: {
|
|
11
|
-
color: '#000000',
|
|
12
|
-
size: 24,
|
|
13
|
-
} }));
|
|
14
|
-
expect(icon).toMatchSnapshot();
|
|
15
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const _core_utils_1 = require("@core-utils");
|
|
9
|
-
const input_pin_component_1 = require("./input-pin.component");
|
|
10
|
-
it('render InputOtp correctly without error', () => {
|
|
11
|
-
const pinInput = (0, _core_utils_1.render)(react_1.default.createElement(input_pin_component_1.InputPin, { title: "Enter your Aadhaar Number", hasError: false, errorMsg: "Uh oh! You\u2019ve entered an invalid aadhaar number", onPinChanged: () => jest.fn(), defaultPin: [] }));
|
|
12
|
-
expect(pinInput).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
it('render InputOtp correctly with error', () => {
|
|
15
|
-
const pinInput = (0, _core_utils_1.render)(react_1.default.createElement(input_pin_component_1.InputPin, { title: "Enter your Aadhaar Number", hasError: true, errorMsg: "Uh oh! You\u2019ve entered an invalid aadhaar number", onPinChanged: () => jest.fn(), defaultPin: [] }));
|
|
16
|
-
expect(pinInput).toMatchSnapshot();
|
|
17
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const _core_utils_1 = require("@core-utils");
|
|
9
|
-
const input_component_1 = require("./input.component");
|
|
10
|
-
it('render Input correctly without error', () => {
|
|
11
|
-
const input = (0, _core_utils_1.render)(react_1.default.createElement(input_component_1.Input, { className: "h-1 relative top-1 border-red-600 border-b-0 dummy", title: 'input', hasError: false, defaultValue: '', inputStyle: " border-b-0 invisible ", onChange: () => jest.fn() }));
|
|
12
|
-
expect(input).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
it('render Input correctly with error', () => {
|
|
15
|
-
const input = (0, _core_utils_1.render)(react_1.default.createElement(input_component_1.Input, { className: "h-1 relative top-1 border-red-600 border-b-0 dummy", title: 'input', hasError: true, defaultValue: '', inputStyle: " border-b-0 invisible ", onChange: () => jest.fn() }));
|
|
16
|
-
expect(input).toMatchSnapshot();
|
|
17
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const _core_utils_1 = require("@core-utils");
|
|
9
|
-
const input_dropdown_component_1 = require("./input-dropdown.component");
|
|
10
|
-
it('render InputDropdown correctly', () => {
|
|
11
|
-
const inputDropDown = (0, _core_utils_1.render)(react_1.default.createElement(input_dropdown_component_1.InputDropdown, { title: "Source of funds", items: ['Bank account', 'UPI', 'Credit Card'], hasError: true, onChange: () => jest.fn() }));
|
|
12
|
-
expect(inputDropDown).toMatchSnapshot();
|
|
13
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const _core_utils_1 = require("@core-utils");
|
|
9
|
-
const loader_component_1 = require("./loader.component");
|
|
10
|
-
it('render Loader correctly', () => {
|
|
11
|
-
const loader = (0, _core_utils_1.render)(react_1.default.createElement(loader_component_1.Loader, null));
|
|
12
|
-
expect(loader).toMatchSnapshot();
|
|
13
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const _core_utils_1 = require("@core-utils");
|
|
9
|
-
const radio_component_1 = require("./radio.component");
|
|
10
|
-
it('render Radio correctly', () => {
|
|
11
|
-
const radio = (0, _core_utils_1.render)(react_1.default.createElement(radio_component_1.Radio, { title: "Title", data: [], onChange: () => jest.fn() }));
|
|
12
|
-
expect(radio).toMatchSnapshot();
|
|
13
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const _core_utils_1 = require("@core-utils");
|
|
8
|
-
const stepper_component_1 = require("./stepper.component");
|
|
9
|
-
it('render Stepper correctly', () => {
|
|
10
|
-
const stepper = (0, _core_utils_1.render)(react_1.default.createElement(stepper_component_1.Stepper, { steps: ['1', '2', '3', '4'], currentStep: 3, onStepClick: () => jest.fn(), className: "mt-4" }));
|
|
11
|
-
expect(stepper).toMatchSnapshot();
|
|
12
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const _core_utils_1 = require("@core-utils");
|
|
8
|
-
const tabs_component_1 = require("./tabs.component");
|
|
9
|
-
it('render Tabs correctly', () => {
|
|
10
|
-
const tabs = (0, _core_utils_1.render)(react_1.default.createElement(tabs_component_1.Tabs, { options: [
|
|
11
|
-
{ title: 'Work History', icon: 'FaHistory' },
|
|
12
|
-
{ title: 'Book Order', icon: 'FaBook' },
|
|
13
|
-
{ title: 'Make Frame', icon: 'MdFilterFrames' },
|
|
14
|
-
], onSelect: (item) => {
|
|
15
|
-
console.log({ item });
|
|
16
|
-
} }));
|
|
17
|
-
expect(tabs).toMatchSnapshot();
|
|
18
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/await-async-query */
|
|
7
|
-
/* eslint-disable testing-library/prefer-screen-queries */
|
|
8
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const _core_utils_1 = require("@core-utils");
|
|
11
|
-
const timer_component_1 = require("./timer.component");
|
|
12
|
-
it('render Timer correctly', () => {
|
|
13
|
-
const time = (0, _core_utils_1.render)(react_1.default.createElement(timer_component_1.Timer, { onClear: () => { } }));
|
|
14
|
-
expect(time).toMatchSnapshot();
|
|
15
|
-
});
|
|
16
|
-
it('render Timer with minute correctly', () => {
|
|
17
|
-
const time = (0, _core_utils_1.render)(react_1.default.createElement(timer_component_1.Timer, { onClear: () => { } }));
|
|
18
|
-
expect(time.findByText('minute')).toBeTruthy();
|
|
19
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const react_2 = require("@testing-library/react");
|
|
8
|
-
const tooltip_component_1 = require("./tooltip.component");
|
|
9
|
-
describe('Tooltip component', () => {
|
|
10
|
-
it('render tooltip correctly', () => {
|
|
11
|
-
const tooltip = (0, react_2.render)(react_1.default.createElement(tooltip_component_1.Tooltip, null));
|
|
12
|
-
expect(tooltip).toMatchSnapshot();
|
|
13
|
-
});
|
|
14
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const _core_utils_1 = require("@core-utils");
|
|
8
|
-
const auto_complete_filter_multiple_select_multiple_fields_display_component_1 = require("./auto-complete-filter-multiple-select-multiple-fields-display.component");
|
|
9
|
-
it('render AutoCompleteFilterMultipleSelectMultipleFieldsDisplay correctly', () => {
|
|
10
|
-
const autoCompleteFilterMultipleSelectMultipleFieldsDisplay = (0, _core_utils_1.render)(react_1.default.createElement(auto_complete_filter_multiple_select_multiple_fields_display_component_1.AutoCompleteFilterMultipleSelectMultipleFieldsDisplay, { data: [], onUpdate: (item) => {
|
|
11
|
-
console.log({ item });
|
|
12
|
-
}, onSelect: (item) => { } }));
|
|
13
|
-
expect(autoCompleteFilterMultipleSelectMultipleFieldsDisplay).toMatchSnapshot();
|
|
14
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const react_1 = __importDefault(require("react"));
|
|
7
|
-
const react_2 = require("@testing-library/react");
|
|
8
|
-
const auto_complete_filter_single_select_multiple_fields_display_component_1 = require("./auto-complete-filter-single-select-multiple-fields-display.component");
|
|
9
|
-
describe('AutoCompleteFilterSingleSelectMultiFieldsDisplay component', () => {
|
|
10
|
-
it('render autoCompleteFilterSingleSelectMultiFieldsDisplay correctly', () => {
|
|
11
|
-
const autoCompleteFilterSingleSelectMultiFieldsDisplay = (0, react_2.render)(react_1.default.createElement(auto_complete_filter_single_select_multiple_fields_display_component_1.AutoCompleteFilterSingleSelectMultiFieldsDisplay, { data: {
|
|
12
|
-
list: [
|
|
13
|
-
{ code: 'Lims', name: 'plus' },
|
|
14
|
-
{ code: 'Lims', name: 'plus' },
|
|
15
|
-
{ code: 'Lims', name: 'plus' },
|
|
16
|
-
],
|
|
17
|
-
displayKey: ['name'],
|
|
18
|
-
}, onSelect: () => jest.fn(), onFilter: () => jest.fn() }));
|
|
19
|
-
expect(autoCompleteFilterSingleSelectMultiFieldsDisplay).toMatchSnapshot();
|
|
20
|
-
});
|
|
21
|
-
});
|
package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/cjs/src/core-components/molecules/css-multiline-input/css-multiline-input.test.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/await-async-query */
|
|
7
|
-
/* eslint-disable testing-library/prefer-screen-queries */
|
|
8
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const _core_utils_1 = require("@core-utils");
|
|
11
|
-
const css_multiline_input_component_1 = require("./css-multiline-input.component");
|
|
12
|
-
it('render CSSMultiline correctly', () => {
|
|
13
|
-
const result = (0, _core_utils_1.render)(react_1.default.createElement(css_multiline_input_component_1.CSSMultiline, { onChange: () => { } }));
|
|
14
|
-
expect(result).toMatchSnapshot();
|
|
15
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
7
|
-
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const _core_utils_1 = require("@core-utils");
|
|
9
|
-
const modal_confirm_component_1 = require("./modal-confirm.component");
|
|
10
|
-
it('render ModalConfirm correctly', () => {
|
|
11
|
-
const modalConfirm = (0, _core_utils_1.render)(react_1.default.createElement(modal_confirm_component_1.ModalConfirm, { visible: true, title: "Confirm", message: "Are you sure delete?", onClick: () => jest.fn(), onClose: () => {
|
|
12
|
-
jest.fn();
|
|
13
|
-
} }));
|
|
14
|
-
expect(modalConfirm).toMatchSnapshot();
|
|
15
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/await-async-query */
|
|
7
|
-
/* eslint-disable testing-library/prefer-screen-queries */
|
|
8
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const _core_utils_1 = require("@core-utils");
|
|
11
|
-
const multi_select_component_1 = require("./multi-select.component");
|
|
12
|
-
it('render MultiSelect correctly', () => {
|
|
13
|
-
const result = (0, _core_utils_1.render)(react_1.default.createElement(multi_select_component_1.MultiSelect, { options: ['UPI', 'CASH'], selectedItems: ['CASH'], onSelect: () => { } }));
|
|
14
|
-
expect(result).toMatchSnapshot();
|
|
15
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable testing-library/await-async-query */
|
|
7
|
-
/* eslint-disable testing-library/prefer-screen-queries */
|
|
8
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
9
|
-
const react_1 = __importDefault(require("react"));
|
|
10
|
-
const _core_utils_1 = require("@core-utils");
|
|
11
|
-
const multi_select_with_field_component_1 = require("./multi-select-with-field.component");
|
|
12
|
-
it('render MultiSelectWithField correctly', () => {
|
|
13
|
-
const result = (0, _core_utils_1.render)(react_1.default.createElement(multi_select_with_field_component_1.MultiSelectWithField, { displayField: 'code', options: [{ code: 'UPI' }, { code: 'CARD' }, { code: 'CASH' }], selectedItems: [{ code: 'CASH' }], onSelect: (item) => {
|
|
14
|
-
console.log({ item });
|
|
15
|
-
} }));
|
|
16
|
-
expect(result).toMatchSnapshot();
|
|
17
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { render } from '@core-utils';
|
|
4
|
-
import { Button } from './buttons.component';
|
|
5
|
-
it('render Button correctly', () => {
|
|
6
|
-
const button = render(React.createElement(Button, { className: "bg-gray-light w-40", onClick: () => jest.fn() }, "Permanent Address"));
|
|
7
|
-
expect(button).toMatchSnapshot();
|
|
8
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { render } from '@core-utils';
|
|
4
|
-
import { CheckBox } from './checkBox.component';
|
|
5
|
-
it('render CheckBox correctly', () => {
|
|
6
|
-
const checkbox = render(React.createElement(CheckBox, { title: "Title", data: [], onChange: () => jest.fn() }));
|
|
7
|
-
expect(checkbox).toMatchSnapshot();
|
|
8
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { render } from '@core-utils';
|
|
4
|
-
import { DatePickerComp } from './date-picker.component';
|
|
5
|
-
import dayjs from 'dayjs';
|
|
6
|
-
it('render DatePicker correctly', () => {
|
|
7
|
-
const datepicker = render(React.createElement(DatePickerComp, { title: "Date", className: "mt-6", value: dayjs().format('YYYY-MM-DD'), showFormat: 'dd-MM-yyyy' }));
|
|
8
|
-
expect(datepicker).toMatchSnapshot();
|
|
9
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render, fireEvent } from '@testing-library/react';
|
|
3
|
-
import userEvent from '@testing-library/user-event';
|
|
4
|
-
import { CheckBox, Input, Toggle, MultilineInput, Label, InputDate, InputFile, InputRadio, InputWrapper, } from './form.component';
|
|
5
|
-
describe('Checkbox component', () => {
|
|
6
|
-
it('render checkbox correctly', () => {
|
|
7
|
-
const checkbox = render(React.createElement(CheckBox, null));
|
|
8
|
-
expect(checkbox).toMatchSnapshot();
|
|
9
|
-
});
|
|
10
|
-
});
|
|
11
|
-
describe('Input component', () => {
|
|
12
|
-
it('render input correctly', () => {
|
|
13
|
-
const inputComp = render(React.createElement(Input, { type: "text", value: "test", onChange: (val) => jest.fn(), onBlur: (value) => jest.fn(), onKeyDown: (val) => jest.fn() }));
|
|
14
|
-
const input = inputComp.getByTestId('INPT');
|
|
15
|
-
fireEvent.change(input, { target: { value: 'check' } });
|
|
16
|
-
userEvent.type(input, 'value');
|
|
17
|
-
fireEvent.blur(input);
|
|
18
|
-
fireEvent.keyDown(input, {
|
|
19
|
-
key: 'Escape',
|
|
20
|
-
code: 'Escape',
|
|
21
|
-
keyCode: 27,
|
|
22
|
-
charCode: 27,
|
|
23
|
-
});
|
|
24
|
-
fireEvent.keyPress(input, { key: 'Enter', keyCode: 13 });
|
|
25
|
-
expect(input).toMatchSnapshot();
|
|
26
|
-
});
|
|
27
|
-
});
|
|
28
|
-
describe('Toggle component', () => {
|
|
29
|
-
it('render toggle correctly', () => {
|
|
30
|
-
const toggle = render(React.createElement(Toggle, null));
|
|
31
|
-
expect(toggle).toMatchSnapshot();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
// describe('SelectOption component', () => {
|
|
35
|
-
// it('render selectOption correctly', () => {
|
|
36
|
-
// const select = render(
|
|
37
|
-
// <SelectOption key='test' onChange={value => jest.fn()} value='test' />,
|
|
38
|
-
// );
|
|
39
|
-
// const selectOption = select.getByTestId('SELECT');
|
|
40
|
-
// fireEvent.change(selectOption, {target: {value: 'check'}});
|
|
41
|
-
// userEvent.type(selectOption, 'value');
|
|
42
|
-
// expect(select).toMatchSnapshot();
|
|
43
|
-
// });
|
|
44
|
-
// });
|
|
45
|
-
describe('MultilineInput component', () => {
|
|
46
|
-
it('render multilineInput correctly', () => {
|
|
47
|
-
const multi = render(React.createElement(MultilineInput, null));
|
|
48
|
-
expect(multi).toMatchSnapshot();
|
|
49
|
-
});
|
|
50
|
-
});
|
|
51
|
-
// describe('Clock component', () => {
|
|
52
|
-
// it('render clock correctly', () => {
|
|
53
|
-
// const clock = render(
|
|
54
|
-
// <Clock value='2022-02-20' onChange={value => jest.fn()} />,
|
|
55
|
-
// );
|
|
56
|
-
// expect(clock).toMatchSnapshot();
|
|
57
|
-
// });
|
|
58
|
-
// });
|
|
59
|
-
describe('Label component', () => {
|
|
60
|
-
it('render label correctly', () => {
|
|
61
|
-
const label = render(React.createElement(Label, { htmlFor: "vsdvrf" }));
|
|
62
|
-
expect(label).toMatchSnapshot();
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
describe('InputDate component', () => {
|
|
66
|
-
it('render inputDate correctly', () => {
|
|
67
|
-
const inputDate = render(React.createElement(InputDate, null));
|
|
68
|
-
expect(inputDate).toMatchSnapshot();
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
// describe('InputDateTime component', () => {
|
|
72
|
-
// it('render inputDateTime correctly', () => {
|
|
73
|
-
// const inputDateTime = render(<InputDateTime />);
|
|
74
|
-
// expect(inputDateTime).toMatchSnapshot();
|
|
75
|
-
// });
|
|
76
|
-
// });
|
|
77
|
-
describe('InputFile component', () => {
|
|
78
|
-
it('render inputFile correctly', () => {
|
|
79
|
-
const inputFile = render(React.createElement(InputFile, null));
|
|
80
|
-
expect(inputFile).toMatchSnapshot();
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
describe('InputRadio component', () => {
|
|
84
|
-
it('render inputRadio correctly', () => {
|
|
85
|
-
const inputRadio = render(React.createElement(InputRadio, null));
|
|
86
|
-
expect(inputRadio).toMatchSnapshot();
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
describe('InputWrapper component', () => {
|
|
90
|
-
it('render inputWrapper correctly', () => {
|
|
91
|
-
const inputWrapper = render(React.createElement(InputWrapper, null));
|
|
92
|
-
expect(inputWrapper).toMatchSnapshot();
|
|
93
|
-
});
|
|
94
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { render } from '@core-utils';
|
|
3
|
-
import { Icon } from './icons.component';
|
|
4
|
-
it('render Icon correctly', () => {
|
|
5
|
-
const icon = render(React.createElement(Icon, { nameIcon: "FaHistory", propsIcon: {
|
|
6
|
-
color: '#000000',
|
|
7
|
-
size: 24,
|
|
8
|
-
} }));
|
|
9
|
-
expect(icon).toMatchSnapshot();
|
|
10
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { render } from '@core-utils';
|
|
4
|
-
import { InputPin } from './input-pin.component';
|
|
5
|
-
it('render InputOtp correctly without error', () => {
|
|
6
|
-
const pinInput = render(React.createElement(InputPin, { title: "Enter your Aadhaar Number", hasError: false, errorMsg: "Uh oh! You\u2019ve entered an invalid aadhaar number", onPinChanged: () => jest.fn(), defaultPin: [] }));
|
|
7
|
-
expect(pinInput).toMatchSnapshot();
|
|
8
|
-
});
|
|
9
|
-
it('render InputOtp correctly with error', () => {
|
|
10
|
-
const pinInput = render(React.createElement(InputPin, { title: "Enter your Aadhaar Number", hasError: true, errorMsg: "Uh oh! You\u2019ve entered an invalid aadhaar number", onPinChanged: () => jest.fn(), defaultPin: [] }));
|
|
11
|
-
expect(pinInput).toMatchSnapshot();
|
|
12
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/* eslint-disable testing-library/render-result-naming-convention */
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { render } from '@core-utils';
|
|
4
|
-
import { Input } from './input.component';
|
|
5
|
-
it('render Input correctly without error', () => {
|
|
6
|
-
const input = render(React.createElement(Input, { className: "h-1 relative top-1 border-red-600 border-b-0 dummy", title: 'input', hasError: false, defaultValue: '', inputStyle: " border-b-0 invisible ", onChange: () => jest.fn() }));
|
|
7
|
-
expect(input).toMatchSnapshot();
|
|
8
|
-
});
|
|
9
|
-
it('render Input correctly with error', () => {
|
|
10
|
-
const input = render(React.createElement(Input, { className: "h-1 relative top-1 border-red-600 border-b-0 dummy", title: 'input', hasError: true, defaultValue: '', inputStyle: " border-b-0 invisible ", onChange: () => jest.fn() }));
|
|
11
|
-
expect(input).toMatchSnapshot();
|
|
12
|
-
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|