@dxc-technology/halstack-react 0.0.0-a9c6846 → 0.0.0-acb1a24
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 +1 -1
- package/dist/ThemeContext.js +44 -42
- package/dist/V3Select/V3Select.js +549 -0
- package/dist/V3Select/index.d.ts +27 -0
- package/dist/V3Textarea/V3Textarea.js +264 -0
- package/dist/V3Textarea/index.d.ts +27 -0
- package/dist/accordion/index.d.ts +28 -0
- package/dist/accordion-group/index.d.ts +16 -0
- package/dist/alert/Alert.js +5 -5
- package/dist/box/index.d.ts +25 -0
- package/dist/button/Button.js +3 -3
- package/dist/button/index.d.ts +24 -0
- package/dist/card/index.d.ts +22 -0
- package/dist/checkbox/Checkbox.js +4 -5
- package/dist/checkbox/index.d.ts +24 -0
- package/dist/chip/index.d.ts +22 -0
- package/dist/common/variables.js +223 -90
- package/dist/date/index.d.ts +27 -0
- package/dist/{new-date/NewDate.js → date-input/DateInput.js} +36 -36
- package/dist/{new-date → date-input}/index.d.ts +3 -3
- package/dist/dialog/index.d.ts +18 -0
- package/dist/dropdown/index.d.ts +26 -0
- package/dist/file-input/FileInput.js +6 -3
- package/dist/file-input/FileItem.js +8 -1
- package/dist/file-input/index.d.ts +1 -1
- package/dist/footer/Footer.js +44 -18
- package/dist/footer/Icons.js +77 -0
- package/dist/footer/index.d.ts +25 -0
- package/dist/header/Header.js +122 -55
- package/dist/header/Icons.js +59 -0
- package/dist/header/index.d.ts +25 -0
- package/dist/heading/Heading.js +12 -0
- package/dist/heading/index.d.ts +17 -0
- package/dist/input-text/Icons.js +22 -0
- package/dist/input-text/InputText.js +4 -6
- package/dist/input-text/index.d.ts +36 -0
- package/dist/layout/ApplicationLayout.js +4 -8
- package/dist/layout/Icons.js +55 -0
- package/dist/link/index.d.ts +23 -0
- package/dist/main.d.ts +38 -5
- package/dist/main.js +30 -30
- package/dist/{number/Number.js → number-input/NumberInput.js} +9 -11
- package/dist/{number/NumberContext.js → number-input/NumberInputContext.js} +2 -2
- package/dist/{number → number-input}/index.d.ts +3 -3
- package/dist/paginator/Icons.js +66 -0
- package/dist/paginator/Paginator.js +53 -37
- package/dist/paginator/index.d.ts +20 -0
- package/dist/{password/Password.js → password-input/PasswordInput.js} +14 -11
- package/dist/{password → password-input}/index.d.ts +5 -5
- package/dist/progress-bar/index.d.ts +18 -0
- package/dist/radio/index.d.ts +23 -0
- package/dist/resultsetTable/index.d.ts +19 -0
- package/dist/select/Select.js +848 -301
- package/dist/select/index.d.ts +53 -0
- package/dist/sidenav/index.d.ts +13 -0
- package/dist/slider/Slider.js +104 -19
- package/dist/slider/index.d.ts +29 -0
- package/dist/spinner/index.d.ts +17 -0
- package/dist/switch/index.d.ts +24 -0
- package/dist/table/index.d.ts +13 -0
- package/dist/tabs/index.d.ts +19 -0
- package/dist/tag/index.d.ts +24 -0
- package/dist/{new-input-text/NewInputText.js → text-input/TextInput.js} +49 -57
- package/dist/{new-input-text → text-input}/index.d.ts +1 -1
- package/dist/textarea/Textarea.js +227 -122
- package/dist/{new-textarea → textarea}/index.d.ts +1 -1
- package/dist/toggle/index.d.ts +21 -0
- package/dist/toggle-group/ToggleGroup.js +132 -28
- package/dist/toggle-group/index.d.ts +21 -0
- package/dist/upload/buttons-upload/ButtonsUpload.js +7 -11
- package/dist/upload/buttons-upload/Icons.js +40 -0
- package/dist/upload/dragAndDropArea/DragAndDropArea.js +14 -14
- package/dist/upload/dragAndDropArea/Icons.js +39 -0
- package/dist/upload/file-upload/FileToUpload.js +26 -21
- package/dist/upload/file-upload/Icons.js +66 -0
- package/dist/upload/index.d.ts +15 -0
- package/dist/upload/transaction/Icons.js +160 -0
- package/dist/upload/transaction/Transaction.js +11 -38
- package/dist/wizard/Icons.js +65 -0
- package/dist/wizard/Wizard.js +3 -9
- package/dist/wizard/index.d.ts +18 -0
- package/package.json +6 -10
- package/test/Date.test.js +13 -11
- package/test/{NewDate.test.js → DateInput.test.js} +33 -23
- package/test/Footer.test.js +2 -7
- package/test/Header.test.js +5 -10
- package/test/Heading.test.js +60 -12
- package/test/{Number.test.js → NumberInput.test.js} +47 -45
- package/test/Paginator.test.js +5 -1
- package/test/PasswordInput.test.js +83 -0
- package/test/ResultsetTable.test.js +5 -4
- package/test/Select.test.js +374 -171
- package/test/Slider.test.js +9 -17
- package/test/{NewInputText.test.js → TextInput.test.js} +51 -53
- package/test/{NewTextarea.test.js → Textarea.test.js} +16 -18
- package/test/ToggleGroup.test.js +5 -1
- package/test/Upload.test.js +1 -1
- package/test/V3Select.test.js +212 -0
- package/test/{TextArea.test.js → V3TextArea.test.js} +6 -7
- package/dist/checkbox/Checkbox.stories.js +0 -144
- package/dist/checkbox/readme.md +0 -116
- package/dist/date/Date.stories.js +0 -205
- package/dist/date/readme.md +0 -73
- package/dist/footer/Footer.stories.js +0 -94
- package/dist/footer/dxc_logo.svg +0 -15
- package/dist/footer/readme.md +0 -41
- package/dist/header/Header.stories.js +0 -176
- package/dist/header/close_icon.svg +0 -1
- package/dist/header/dxc_logo_black.svg +0 -8
- package/dist/header/hamb_menu_black.svg +0 -1
- package/dist/header/hamb_menu_white.svg +0 -1
- package/dist/header/readme.md +0 -33
- package/dist/input-text/InputText.stories.js +0 -209
- package/dist/input-text/error.svg +0 -1
- package/dist/input-text/readme.md +0 -91
- package/dist/layout/facebook.svg +0 -45
- package/dist/layout/linkedin.svg +0 -50
- package/dist/layout/twitter.svg +0 -53
- package/dist/link/readme.md +0 -51
- package/dist/new-textarea/NewTextarea.js +0 -362
- package/dist/paginator/images/next.svg +0 -3
- package/dist/paginator/images/nextPage.svg +0 -3
- package/dist/paginator/images/previous.svg +0 -3
- package/dist/paginator/images/previousPage.svg +0 -3
- package/dist/paginator/readme.md +0 -50
- package/dist/password/styles.css +0 -3
- package/dist/progress-bar/ProgressBar.stories.js +0 -280
- package/dist/progress-bar/readme.md +0 -63
- package/dist/radio/Radio.stories.js +0 -166
- package/dist/radio/readme.md +0 -70
- package/dist/resultsetTable/arrow_downward-24px_wht.svg +0 -1
- package/dist/resultsetTable/arrow_upward-24px_wht.svg +0 -1
- package/dist/resultsetTable/unfold_more-24px_wht.svg +0 -1
- package/dist/slider/Slider.stories.js +0 -241
- package/dist/slider/readme.md +0 -64
- package/dist/spinner/Spinner.stories.js +0 -183
- package/dist/spinner/readme.md +0 -65
- package/dist/switch/Switch.stories.js +0 -134
- package/dist/switch/readme.md +0 -133
- package/dist/tabs/Tabs.stories.js +0 -130
- package/dist/tabs/readme.md +0 -78
- package/dist/tabs-for-sections/TabsForSections.js +0 -92
- package/dist/tabs-for-sections/readme.md +0 -78
- package/dist/toggle/Toggle.stories.js +0 -297
- package/dist/toggle/readme.md +0 -80
- package/dist/upload/Upload.stories.js +0 -72
- package/dist/upload/buttons-upload/drag-drop-icon.svg +0 -4
- package/dist/upload/buttons-upload/upload-button.svg +0 -1
- package/dist/upload/dragAndDropArea/upload_drop.svg +0 -4
- package/dist/upload/dragAndDropArea/upload_file.svg +0 -4
- package/dist/upload/file-upload/audio-icon.svg +0 -4
- package/dist/upload/file-upload/close.svg +0 -4
- package/dist/upload/file-upload/file-icon.svg +0 -4
- package/dist/upload/file-upload/video-icon.svg +0 -4
- package/dist/upload/readme.md +0 -37
- package/dist/upload/transaction/audio-icon-err.svg +0 -4
- package/dist/upload/transaction/audio-icon.svg +0 -4
- package/dist/upload/transaction/error-icon.svg +0 -4
- package/dist/upload/transaction/file-icon-err.svg +0 -4
- package/dist/upload/transaction/file-icon.svg +0 -4
- package/dist/upload/transaction/image-icon-err.svg +0 -4
- package/dist/upload/transaction/image-icon.svg +0 -4
- package/dist/upload/transaction/success-icon.svg +0 -4
- package/dist/upload/transaction/video-icon-err.svg +0 -4
- package/dist/upload/transaction/video-icon.svg +0 -4
- package/dist/wizard/invalid_icon.svg +0 -5
- package/dist/wizard/valid_icon.svg +0 -5
- package/dist/wizard/validation-wrong.svg +0 -6
- package/test/Password.test.js +0 -83
- package/test/TabsForSections.test.js +0 -34
package/test/Slider.test.js
CHANGED
|
@@ -4,7 +4,7 @@ import DxcSlider from "../src/slider/Slider";
|
|
|
4
4
|
|
|
5
5
|
describe("Slider component tests", () => {
|
|
6
6
|
test("Slider renders with correct text", () => {
|
|
7
|
-
const { getByText } = render(<DxcSlider minValue={0} maxValue={100} showLimitsValues
|
|
7
|
+
const { getByText } = render(<DxcSlider minValue={0} maxValue={100} showLimitsValues />);
|
|
8
8
|
expect(getByText("0")).toBeTruthy();
|
|
9
9
|
expect(getByText("100")).toBeTruthy();
|
|
10
10
|
});
|
|
@@ -12,37 +12,29 @@ describe("Slider component tests", () => {
|
|
|
12
12
|
test("Calls correct function onChange in controlled slider", () => {
|
|
13
13
|
const onChange = jest.fn();
|
|
14
14
|
const { getByRole } = render(
|
|
15
|
-
<DxcSlider minValue={0} maxValue={100} onChange={onChange} showLimitsValues value={13} showInput
|
|
15
|
+
<DxcSlider minValue={0} maxValue={100} onChange={onChange} showLimitsValues value={13} showInput />
|
|
16
16
|
);
|
|
17
17
|
act(() => {
|
|
18
18
|
fireEvent.change(getByRole("textbox"), { target: { value: 25 } });
|
|
19
19
|
});
|
|
20
|
-
expect(onChange).toHaveBeenCalledWith(
|
|
20
|
+
expect(onChange).toHaveBeenCalledWith(25);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
test("Calls correct function onChange in uncontrolled slider", () => {
|
|
24
24
|
const onChange = jest.fn();
|
|
25
25
|
const { getByRole } = render(
|
|
26
|
-
<DxcSlider minValue={0} maxValue={100} onChange={onChange} showLimitsValues showInput
|
|
26
|
+
<DxcSlider minValue={0} maxValue={100} onChange={onChange} showLimitsValues showInput />
|
|
27
27
|
);
|
|
28
28
|
act(() => {
|
|
29
29
|
fireEvent.change(getByRole("textbox"), { target: { value: 25 } });
|
|
30
30
|
});
|
|
31
|
-
expect(onChange).toHaveBeenCalledWith(
|
|
31
|
+
expect(onChange).toHaveBeenCalledWith(25);
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
test("Disabled slider have disabled input", () => {
|
|
35
35
|
const onChange = jest.fn();
|
|
36
36
|
const { getByRole } = render(
|
|
37
|
-
<DxcSlider
|
|
38
|
-
minValue={0}
|
|
39
|
-
maxValue={100}
|
|
40
|
-
onChange={onChange}
|
|
41
|
-
showLimitsValues
|
|
42
|
-
disabled
|
|
43
|
-
showInput
|
|
44
|
-
value={13}
|
|
45
|
-
></DxcSlider>
|
|
37
|
+
<DxcSlider minValue={0} maxValue={100} onChange={onChange} showLimitsValues disabled showInput value={13} />
|
|
46
38
|
);
|
|
47
39
|
act(() => {
|
|
48
40
|
fireEvent.change(getByRole("textbox"), { target: { value: 25 } });
|
|
@@ -54,7 +46,7 @@ describe("Slider component tests", () => {
|
|
|
54
46
|
test("Calls correct function onDragEnd", () => {
|
|
55
47
|
const onDragEnd = jest.fn();
|
|
56
48
|
const { getByRole } = render(
|
|
57
|
-
<DxcSlider minValue={0} maxValue={100} showLimitsValues showInput onDragEnd={onDragEnd} value={25}
|
|
49
|
+
<DxcSlider minValue={0} maxValue={100} showLimitsValues showInput onDragEnd={onDragEnd} value={25} />
|
|
58
50
|
);
|
|
59
51
|
act(() => {
|
|
60
52
|
fireEvent.mouseDown(getByRole("slider"));
|
|
@@ -64,7 +56,7 @@ describe("Slider component tests", () => {
|
|
|
64
56
|
});
|
|
65
57
|
|
|
66
58
|
test("Calls correct function labelFormatCallback", () => {
|
|
67
|
-
const labelFormatCallback = jest.fn(x => `${x}$`);
|
|
59
|
+
const labelFormatCallback = jest.fn((x) => `${x}$`);
|
|
68
60
|
const { getByText } = render(
|
|
69
61
|
<DxcSlider
|
|
70
62
|
minValue={0}
|
|
@@ -73,7 +65,7 @@ describe("Slider component tests", () => {
|
|
|
73
65
|
showInput
|
|
74
66
|
value={25}
|
|
75
67
|
labelFormatCallback={labelFormatCallback}
|
|
76
|
-
|
|
68
|
+
/>
|
|
77
69
|
);
|
|
78
70
|
expect(getByText("0$")).toBeTruthy();
|
|
79
71
|
expect(getByText("100$")).toBeTruthy();
|
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { render, fireEvent, waitForElementToBeRemoved } from "@testing-library/react";
|
|
3
3
|
import userEvent from "@testing-library/user-event";
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import DxcTextInput from "../src/text-input/TextInput";
|
|
6
6
|
|
|
7
7
|
const countries = [
|
|
8
8
|
"Afghanistan",
|
|
@@ -29,38 +29,36 @@ const countries = [
|
|
|
29
29
|
"Djibouti",
|
|
30
30
|
];
|
|
31
31
|
|
|
32
|
-
describe("
|
|
32
|
+
describe("TextInput component tests", () => {
|
|
33
33
|
test("Renders with correct label", () => {
|
|
34
|
-
const { getByText } = render(<
|
|
34
|
+
const { getByText } = render(<DxcTextInput label="Example label" />);
|
|
35
35
|
expect(getByText("Example label")).toBeTruthy();
|
|
36
36
|
});
|
|
37
37
|
test("Renders with correct label and helper text", () => {
|
|
38
|
-
const { getByText } = render(<
|
|
38
|
+
const { getByText } = render(<DxcTextInput label="Example label" helperText="Example helper text" />);
|
|
39
39
|
expect(getByText("Example label")).toBeTruthy();
|
|
40
40
|
expect(getByText("Example helper text")).toBeTruthy();
|
|
41
41
|
});
|
|
42
42
|
test("Renders with correct label and optional", () => {
|
|
43
|
-
const { getByText } = render(<
|
|
43
|
+
const { getByText } = render(<DxcTextInput label="Example label" helperText="Example helper text" optional />);
|
|
44
44
|
expect(getByText("Example label")).toBeTruthy();
|
|
45
45
|
expect(getByText("(Optional)")).toBeTruthy();
|
|
46
46
|
expect(getByText("Example helper text")).toBeTruthy();
|
|
47
47
|
});
|
|
48
48
|
test("Renders with correct placeholder", () => {
|
|
49
|
-
const { getByRole } = render(<
|
|
49
|
+
const { getByRole } = render(<DxcTextInput label="Example label" placeholder="Placeholder" />);
|
|
50
50
|
const input = getByRole("textbox");
|
|
51
51
|
expect(input.getAttribute("placeholder")).toBe("Placeholder");
|
|
52
52
|
});
|
|
53
53
|
test("Renders with error message", () => {
|
|
54
|
-
const { getByText } = render(
|
|
55
|
-
<DxcNewInputText label="Error label" placeholder="Placeholder" error="Error message." />
|
|
56
|
-
);
|
|
54
|
+
const { getByText } = render(<DxcTextInput label="Error label" placeholder="Placeholder" error="Error message." />);
|
|
57
55
|
expect(getByText("Error message.")).toBeTruthy();
|
|
58
56
|
});
|
|
59
57
|
test("Not optional constraint (onBlur)", () => {
|
|
60
58
|
const onChange = jest.fn();
|
|
61
59
|
const onBlur = jest.fn();
|
|
62
60
|
const { getByRole } = render(
|
|
63
|
-
<
|
|
61
|
+
<DxcTextInput label="Input label" placeholder="Placeholder" onChange={onChange} onBlur={onBlur} clearable />
|
|
64
62
|
);
|
|
65
63
|
const input = getByRole("textbox");
|
|
66
64
|
|
|
@@ -76,7 +74,7 @@ describe("NewInputText component tests", () => {
|
|
|
76
74
|
test("Not optional constraint (onChange)", () => {
|
|
77
75
|
const onChange = jest.fn();
|
|
78
76
|
const { getByRole } = render(
|
|
79
|
-
<
|
|
77
|
+
<DxcTextInput label="Input label" placeholder="Placeholder" onChange={onChange} clearable />
|
|
80
78
|
);
|
|
81
79
|
const input = getByRole("textbox");
|
|
82
80
|
|
|
@@ -90,8 +88,8 @@ describe("NewInputText component tests", () => {
|
|
|
90
88
|
test("Pattern constraint", () => {
|
|
91
89
|
const onChange = jest.fn();
|
|
92
90
|
const onBlur = jest.fn();
|
|
93
|
-
const { getByRole
|
|
94
|
-
<
|
|
91
|
+
const { getByRole } = render(
|
|
92
|
+
<DxcTextInput
|
|
95
93
|
label="Input label"
|
|
96
94
|
placeholder="Placeholder"
|
|
97
95
|
onChange={onChange}
|
|
@@ -120,8 +118,8 @@ describe("NewInputText component tests", () => {
|
|
|
120
118
|
test("Length constraint", () => {
|
|
121
119
|
const onChange = jest.fn();
|
|
122
120
|
const onBlur = jest.fn();
|
|
123
|
-
const { getByRole
|
|
124
|
-
<
|
|
121
|
+
const { getByRole } = render(
|
|
122
|
+
<DxcTextInput
|
|
125
123
|
label="Input label"
|
|
126
124
|
placeholder="Placeholder"
|
|
127
125
|
onChange={onChange}
|
|
@@ -150,8 +148,8 @@ describe("NewInputText component tests", () => {
|
|
|
150
148
|
test("Pattern and length constraints", () => {
|
|
151
149
|
const onChange = jest.fn();
|
|
152
150
|
const onBlur = jest.fn();
|
|
153
|
-
const { getByRole
|
|
154
|
-
<
|
|
151
|
+
const { getByRole } = render(
|
|
152
|
+
<DxcTextInput
|
|
155
153
|
label="Input label"
|
|
156
154
|
placeholder="Placeholder"
|
|
157
155
|
onChange={onChange}
|
|
@@ -185,7 +183,7 @@ describe("NewInputText component tests", () => {
|
|
|
185
183
|
});
|
|
186
184
|
test("onChange function is called correctly", () => {
|
|
187
185
|
const onChange = jest.fn();
|
|
188
|
-
const { getByRole } = render(<
|
|
186
|
+
const { getByRole } = render(<DxcTextInput label="Input label" onChange={onChange} />);
|
|
189
187
|
const input = getByRole("textbox");
|
|
190
188
|
userEvent.type(input, "onchange event test");
|
|
191
189
|
expect(input.value).toBe("onchange event test");
|
|
@@ -195,7 +193,7 @@ describe("NewInputText component tests", () => {
|
|
|
195
193
|
test("onBlur function is called correctly", () => {
|
|
196
194
|
const onBlur = jest.fn();
|
|
197
195
|
const onChange = jest.fn();
|
|
198
|
-
const { getByRole } = render(<
|
|
196
|
+
const { getByRole } = render(<DxcTextInput label="Input label" onChange={onChange} onBlur={onBlur} />);
|
|
199
197
|
const input = getByRole("textbox");
|
|
200
198
|
fireEvent.change(input, { target: { value: "Blur test" } });
|
|
201
199
|
fireEvent.blur(input);
|
|
@@ -203,7 +201,7 @@ describe("NewInputText component tests", () => {
|
|
|
203
201
|
expect(onBlur).toHaveBeenCalledWith({ value: "Blur test", error: null });
|
|
204
202
|
});
|
|
205
203
|
test("Clear action onClick cleans the input", () => {
|
|
206
|
-
const { getByRole } = render(<
|
|
204
|
+
const { getByRole } = render(<DxcTextInput label="Input label" clearable />);
|
|
207
205
|
const input = getByRole("textbox");
|
|
208
206
|
userEvent.type(input, "Test");
|
|
209
207
|
const closeAction = getByRole("button");
|
|
@@ -228,7 +226,7 @@ describe("NewInputText component tests", () => {
|
|
|
228
226
|
</svg>
|
|
229
227
|
),
|
|
230
228
|
};
|
|
231
|
-
const { getByRole } = render(<
|
|
229
|
+
const { getByRole } = render(<DxcTextInput label="Disabled input label" action={action} disabled />);
|
|
232
230
|
const input = getByRole("textbox");
|
|
233
231
|
expect(input.disabled).toBeTruthy();
|
|
234
232
|
userEvent.click(getByRole("button"));
|
|
@@ -236,7 +234,7 @@ describe("NewInputText component tests", () => {
|
|
|
236
234
|
});
|
|
237
235
|
test("Disabled input (clear default action should not be displayed, even with text written on the input)", () => {
|
|
238
236
|
const { getByRole, queryByRole } = render(
|
|
239
|
-
<
|
|
237
|
+
<DxcTextInput label="Disabled input label" value="Sample text" disabled clearable />
|
|
240
238
|
);
|
|
241
239
|
const input = getByRole("textbox");
|
|
242
240
|
expect(input.disabled).toBeTruthy();
|
|
@@ -244,7 +242,7 @@ describe("NewInputText component tests", () => {
|
|
|
244
242
|
});
|
|
245
243
|
test("Disabled input (suffix and preffix must be displayed)", () => {
|
|
246
244
|
const { getByRole, getByText } = render(
|
|
247
|
-
<
|
|
245
|
+
<DxcTextInput label="Disabled input label" value="Sample text" prefix="+34" suffix="USD" disabled />
|
|
248
246
|
);
|
|
249
247
|
const input = getByRole("textbox");
|
|
250
248
|
expect(input.disabled).toBeTruthy();
|
|
@@ -269,13 +267,13 @@ describe("NewInputText component tests", () => {
|
|
|
269
267
|
</svg>
|
|
270
268
|
),
|
|
271
269
|
};
|
|
272
|
-
const { getByRole, getByTestId } = render(<
|
|
270
|
+
const { getByRole, getByTestId } = render(<DxcTextInput label="Input label" action={action} />);
|
|
273
271
|
expect(getByTestId("image")).toBeTruthy();
|
|
274
272
|
userEvent.click(getByRole("button"));
|
|
275
273
|
expect(onClick).toHaveBeenCalled();
|
|
276
274
|
});
|
|
277
275
|
test("Renders with correct prefix and suffix", () => {
|
|
278
|
-
const { getByText } = render(<
|
|
276
|
+
const { getByText } = render(<DxcTextInput label="Input label" prefix="+34" suffix="USD" />);
|
|
279
277
|
expect(getByText("+34")).toBeTruthy();
|
|
280
278
|
expect(getByText("USD")).toBeTruthy();
|
|
281
279
|
});
|
|
@@ -297,7 +295,7 @@ describe("NewInputText component tests", () => {
|
|
|
297
295
|
</svg>
|
|
298
296
|
),
|
|
299
297
|
};
|
|
300
|
-
const { getByRole, getAllByRole } = render(<
|
|
298
|
+
const { getByRole, getAllByRole } = render(<DxcTextInput label="Example label" clearable action={action} />);
|
|
301
299
|
const input = getByRole("textbox");
|
|
302
300
|
expect(input.getAttribute("aria-autocomplete")).toBeNull();
|
|
303
301
|
expect(input.getAttribute("aria-controls")).toBeNull();
|
|
@@ -312,7 +310,7 @@ describe("NewInputText component tests", () => {
|
|
|
312
310
|
});
|
|
313
311
|
test("Autosuggest has correct accesibility attributes", () => {
|
|
314
312
|
const { getByRole, getAllByRole } = render(
|
|
315
|
-
<
|
|
313
|
+
<DxcTextInput label="Autocomplete Countries" optional suggestions={countries} />
|
|
316
314
|
);
|
|
317
315
|
const input = getByRole("combobox");
|
|
318
316
|
const inputId = input.id;
|
|
@@ -329,11 +327,11 @@ describe("NewInputText component tests", () => {
|
|
|
329
327
|
});
|
|
330
328
|
});
|
|
331
329
|
|
|
332
|
-
describe("
|
|
330
|
+
describe("TextInput component synchronous autosuggest tests", () => {
|
|
333
331
|
test("Autosuggest is displayed when the input gains focus", async () => {
|
|
334
332
|
const onChange = jest.fn();
|
|
335
333
|
const { getByRole, getByText } = render(
|
|
336
|
-
<
|
|
334
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
337
335
|
);
|
|
338
336
|
const input = getByRole("combobox");
|
|
339
337
|
fireEvent.focus(input);
|
|
@@ -347,7 +345,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
347
345
|
test("Autosuggest is displayed when the user clicks the input", async () => {
|
|
348
346
|
const onChange = jest.fn();
|
|
349
347
|
const { getByRole, getByText } = render(
|
|
350
|
-
<
|
|
348
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
351
349
|
);
|
|
352
350
|
const input = getByRole("combobox");
|
|
353
351
|
userEvent.click(input);
|
|
@@ -361,7 +359,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
361
359
|
test("Autosuggest is displayed while the user is writing (if closed previously, if open stays open)", async () => {
|
|
362
360
|
const onChange = jest.fn();
|
|
363
361
|
const { getByRole, queryByRole, getByText, getAllByText } = render(
|
|
364
|
-
<
|
|
362
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
365
363
|
);
|
|
366
364
|
const input = getByRole("combobox");
|
|
367
365
|
fireEvent.focus(input);
|
|
@@ -380,7 +378,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
380
378
|
test("Autosuggest is not displayed when prop suggestions is an empty array", async () => {
|
|
381
379
|
const onChange = jest.fn();
|
|
382
380
|
const { queryByRole } = render(
|
|
383
|
-
<
|
|
381
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={[]} onChange={onChange} />
|
|
384
382
|
);
|
|
385
383
|
const input = queryByRole("textbox");
|
|
386
384
|
fireEvent.focus(input);
|
|
@@ -389,7 +387,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
389
387
|
test("Autosuggest shows 'No results found' message when there are no matches with the user's input", async () => {
|
|
390
388
|
const onChange = jest.fn();
|
|
391
389
|
const { getByRole, getByText } = render(
|
|
392
|
-
<
|
|
390
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
393
391
|
);
|
|
394
392
|
const input = getByRole("combobox");
|
|
395
393
|
fireEvent.focus(input);
|
|
@@ -400,10 +398,10 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
400
398
|
expect(list).toBeTruthy();
|
|
401
399
|
expect(getByText("No results found")).toBeTruthy();
|
|
402
400
|
});
|
|
403
|
-
test("Autosuggest uncontrolled
|
|
401
|
+
test("Autosuggest uncontrolled - Suggestion selected by click", async () => {
|
|
404
402
|
const onChange = jest.fn();
|
|
405
403
|
const { getByRole, getByText, queryByRole } = render(
|
|
406
|
-
<
|
|
404
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
407
405
|
);
|
|
408
406
|
const input = getByRole("combobox");
|
|
409
407
|
fireEvent.focus(input);
|
|
@@ -416,10 +414,10 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
416
414
|
expect(input.value).toBe("Albania");
|
|
417
415
|
expect(queryByRole("listbox")).toBeFalsy();
|
|
418
416
|
});
|
|
419
|
-
test("Autosuggest controlled
|
|
417
|
+
test("Autosuggest controlled - Suggestion selected by click", async () => {
|
|
420
418
|
const onChange = jest.fn();
|
|
421
419
|
const { getByRole, getByText, queryByRole } = render(
|
|
422
|
-
<
|
|
420
|
+
<DxcTextInput label="Autocomplete Countries" value="Andor" suggestions={countries} onChange={onChange} />
|
|
423
421
|
);
|
|
424
422
|
const input = getByRole("combobox");
|
|
425
423
|
fireEvent.focus(input);
|
|
@@ -435,7 +433,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
435
433
|
const onChange = jest.fn();
|
|
436
434
|
const onBlur = jest.fn();
|
|
437
435
|
const { getByRole, getByText } = render(
|
|
438
|
-
<
|
|
436
|
+
<DxcTextInput
|
|
439
437
|
label="Autocomplete Countries"
|
|
440
438
|
suggestions={countries}
|
|
441
439
|
onChange={onChange}
|
|
@@ -458,7 +456,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
458
456
|
const onChange = jest.fn();
|
|
459
457
|
const onBlur = jest.fn();
|
|
460
458
|
const { getByText, getByRole } = render(
|
|
461
|
-
<
|
|
459
|
+
<DxcTextInput
|
|
462
460
|
label="Autocomplete Countries"
|
|
463
461
|
suggestions={countries}
|
|
464
462
|
onChange={onChange}
|
|
@@ -481,7 +479,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
481
479
|
Element.prototype.scrollTo = () => {};
|
|
482
480
|
const onChange = jest.fn();
|
|
483
481
|
const { getByRole, queryByRole } = render(
|
|
484
|
-
<
|
|
482
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
485
483
|
);
|
|
486
484
|
const input = getByRole("combobox");
|
|
487
485
|
fireEvent.keyDown(input, { key: "ArrowDown", code: "ArrowDown", keyCode: 40, charCode: 40 });
|
|
@@ -495,7 +493,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
495
493
|
Element.prototype.scrollTo = () => {};
|
|
496
494
|
const onChange = jest.fn();
|
|
497
495
|
const { getByRole, queryByRole } = render(
|
|
498
|
-
<
|
|
496
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
499
497
|
);
|
|
500
498
|
const input = getByRole("combobox");
|
|
501
499
|
fireEvent.keyDown(input, { key: "ArrowUp", code: "ArrowUp", keyCode: 38, charCode: 38 });
|
|
@@ -509,7 +507,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
509
507
|
Element.prototype.scrollTo = () => {};
|
|
510
508
|
const onChange = jest.fn();
|
|
511
509
|
const { getByRole, queryByRole } = render(
|
|
512
|
-
<
|
|
510
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
513
511
|
);
|
|
514
512
|
const input = getByRole("combobox");
|
|
515
513
|
fireEvent.focus(input);
|
|
@@ -524,7 +522,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
524
522
|
Element.prototype.scrollTo = () => {};
|
|
525
523
|
const onChange = jest.fn();
|
|
526
524
|
const { getByRole, queryByRole } = render(
|
|
527
|
-
<
|
|
525
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
528
526
|
);
|
|
529
527
|
const input = getByRole("combobox");
|
|
530
528
|
fireEvent.focus(input);
|
|
@@ -538,13 +536,13 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
538
536
|
Element.prototype.scrollTo = () => {};
|
|
539
537
|
const onChange = jest.fn();
|
|
540
538
|
const { getByRole, queryByRole } = render(
|
|
541
|
-
<
|
|
539
|
+
<DxcTextInput label="Autocomplete Countries" suggestions={countries} onChange={onChange} />
|
|
542
540
|
);
|
|
543
541
|
const input = getByRole("combobox");
|
|
544
542
|
fireEvent.focus(input);
|
|
545
543
|
userEvent.type(input, "Ba");
|
|
546
544
|
fireEvent.keyDown(input, { key: "ArrowUp", code: "ArrowUp", keyCode: 38, charCode: 38 });
|
|
547
|
-
fireEvent.keyDown(input, { key: "ArrowUp", code: "
|
|
545
|
+
fireEvent.keyDown(input, { key: "ArrowUp", code: "ArrowUpp", keyCode: 38, charCode: 38 });
|
|
548
546
|
fireEvent.keyDown(input, { key: "ArrowDown", code: "ArrowDown", keyCode: 40, charCode: 40 });
|
|
549
547
|
fireEvent.keyDown(input, { key: "Enter", code: "Enter", keyCode: 13, charCode: 13 });
|
|
550
548
|
expect(input.value).toBe("Barbados");
|
|
@@ -555,7 +553,7 @@ describe("NewInputText component synchronous autosuggest tests", () => {
|
|
|
555
553
|
});
|
|
556
554
|
});
|
|
557
555
|
|
|
558
|
-
describe("
|
|
556
|
+
describe("TextInput component asynchronous autosuggest tests", () => {
|
|
559
557
|
test("Autosuggest 'Searching...' message is shown", async () => {
|
|
560
558
|
const callbackFunc = jest.fn((newValue) => {
|
|
561
559
|
const result = new Promise((resolve) =>
|
|
@@ -569,7 +567,7 @@ describe("NewInputText component asynchronous autosuggest tests", () => {
|
|
|
569
567
|
});
|
|
570
568
|
const onChange = jest.fn();
|
|
571
569
|
const { getByRole, getByText } = render(
|
|
572
|
-
<
|
|
570
|
+
<DxcTextInput label="Autosuggest Countries" suggestions={callbackFunc} onChange={onChange} />
|
|
573
571
|
);
|
|
574
572
|
const input = getByRole("combobox");
|
|
575
573
|
fireEvent.focus(input);
|
|
@@ -599,7 +597,7 @@ describe("NewInputText component asynchronous autosuggest tests", () => {
|
|
|
599
597
|
});
|
|
600
598
|
const onChange = jest.fn();
|
|
601
599
|
const { getByRole, queryByText, queryByRole } = render(
|
|
602
|
-
<
|
|
600
|
+
<DxcTextInput label="Autosuggest Countries" suggestions={callbackFunc} onChange={onChange} />
|
|
603
601
|
);
|
|
604
602
|
const input = getByRole("combobox");
|
|
605
603
|
fireEvent.focus(input);
|
|
@@ -623,7 +621,7 @@ describe("NewInputText component asynchronous autosuggest tests", () => {
|
|
|
623
621
|
});
|
|
624
622
|
const onChange = jest.fn();
|
|
625
623
|
const { getByRole, getByText, queryByText, queryByRole } = render(
|
|
626
|
-
<
|
|
624
|
+
<DxcTextInput label="Autosuggest Countries" suggestions={callbackFunc} onChange={onChange} />
|
|
627
625
|
);
|
|
628
626
|
const input = getByRole("combobox");
|
|
629
627
|
fireEvent.focus(input);
|
|
@@ -655,7 +653,7 @@ describe("NewInputText component asynchronous autosuggest tests", () => {
|
|
|
655
653
|
});
|
|
656
654
|
const onChange = jest.fn();
|
|
657
655
|
const { getByRole, getByText } = render(
|
|
658
|
-
<
|
|
656
|
+
<DxcTextInput label="Autosuggest Countries" onChange={onChange} suggestions={callbackFunc} />
|
|
659
657
|
);
|
|
660
658
|
const input = getByRole("combobox");
|
|
661
659
|
fireEvent.focus(input);
|
|
@@ -680,7 +678,7 @@ describe("NewInputText component asynchronous autosuggest tests", () => {
|
|
|
680
678
|
});
|
|
681
679
|
const onChange = jest.fn();
|
|
682
680
|
const { getByRole, getByText, queryByRole } = render(
|
|
683
|
-
<
|
|
681
|
+
<DxcTextInput label="Autosuggest Countries" value="Denm" onChange={onChange} suggestions={callbackFunc} />
|
|
684
682
|
);
|
|
685
683
|
const input = getByRole("combobox");
|
|
686
684
|
fireEvent.focus(input);
|
|
@@ -705,7 +703,7 @@ describe("NewInputText component asynchronous autosuggest tests", () => {
|
|
|
705
703
|
});
|
|
706
704
|
const onChange = jest.fn();
|
|
707
705
|
const { getByRole, getByText } = render(
|
|
708
|
-
<
|
|
706
|
+
<DxcTextInput label="Autosuggest Countries" onChange={onChange} suggestions={callbackFunc} />
|
|
709
707
|
);
|
|
710
708
|
const input = getByRole("combobox");
|
|
711
709
|
fireEvent.focus(input);
|
|
@@ -724,7 +722,7 @@ describe("NewInputText component asynchronous autosuggest tests", () => {
|
|
|
724
722
|
});
|
|
725
723
|
const onChange = jest.fn();
|
|
726
724
|
const { getByRole, getByText } = render(
|
|
727
|
-
<
|
|
725
|
+
<DxcTextInput label="Autosuggest Countries" onChange={onChange} suggestions={errorCallbackFunc} />
|
|
728
726
|
);
|
|
729
727
|
const input = getByRole("combobox");
|
|
730
728
|
fireEvent.focus(input);
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, fireEvent } from "@testing-library/react";
|
|
3
3
|
import userEvent from "@testing-library/user-event";
|
|
4
|
-
import
|
|
4
|
+
import DxcTextarea from "../src/textarea/Textarea";
|
|
5
5
|
|
|
6
|
-
describe("
|
|
6
|
+
describe("Textarea component tests", () => {
|
|
7
7
|
test("Renders with correct label", () => {
|
|
8
|
-
const { getByText } = render(<
|
|
8
|
+
const { getByText } = render(<DxcTextarea label="Example label" />);
|
|
9
9
|
expect(getByText("Example label")).toBeTruthy();
|
|
10
10
|
});
|
|
11
11
|
test("Renders with correct label and helper text", () => {
|
|
12
|
-
const { getByText } = render(<
|
|
12
|
+
const { getByText } = render(<DxcTextarea label="Example label" helperText="Example helper text" />);
|
|
13
13
|
expect(getByText("Example label")).toBeTruthy();
|
|
14
14
|
expect(getByText("Example helper text")).toBeTruthy();
|
|
15
15
|
});
|
|
16
16
|
test("Renders with correct label and optional", () => {
|
|
17
17
|
const { getByText, getByRole } = render(
|
|
18
|
-
<
|
|
18
|
+
<DxcTextarea label="Example label" helperText="Example helper text" optional />
|
|
19
19
|
);
|
|
20
20
|
const textarea = getByRole("textbox");
|
|
21
21
|
expect(getByText("Example label")).toBeTruthy();
|
|
@@ -24,24 +24,24 @@ describe("NewTextarea component tests", () => {
|
|
|
24
24
|
expect(textarea.getAttribute("aria-required")).toBe("false");
|
|
25
25
|
});
|
|
26
26
|
test("Renders with correct placeholder", () => {
|
|
27
|
-
const { getByRole } = render(<
|
|
27
|
+
const { getByRole } = render(<DxcTextarea placeholder="Placeholder" />);
|
|
28
28
|
const textarea = getByRole("textbox");
|
|
29
29
|
expect(textarea.getAttribute("placeholder")).toBe("Placeholder");
|
|
30
30
|
});
|
|
31
31
|
test("Renders with error message", () => {
|
|
32
|
-
const { getByText, getByRole } = render(<
|
|
32
|
+
const { getByText, getByRole } = render(<DxcTextarea error="Error message." />);
|
|
33
33
|
const textarea = getByRole("textbox");
|
|
34
34
|
expect(getByText("Error message.")).toBeTruthy();
|
|
35
35
|
expect(textarea.getAttribute("aria-invalid")).toBe("true");
|
|
36
36
|
expect(textarea.getAttribute("aria-describedBy")).not.toBeNull();
|
|
37
37
|
});
|
|
38
38
|
test("Renders with correct default rows", () => {
|
|
39
|
-
const { getByLabelText } = render(<
|
|
39
|
+
const { getByLabelText } = render(<DxcTextarea label="Example label" rows={10} />);
|
|
40
40
|
const textarea = getByLabelText("Example label");
|
|
41
41
|
expect(textarea.rows).toBe(10);
|
|
42
42
|
});
|
|
43
43
|
test("Renders with correct accesibility attributes", () => {
|
|
44
|
-
const { getByLabelText } = render(<
|
|
44
|
+
const { getByLabelText } = render(<DxcTextarea label="Example label" />);
|
|
45
45
|
const textarea = getByLabelText("Example label");
|
|
46
46
|
expect(textarea.getAttribute("aria-invalid")).toBe("false");
|
|
47
47
|
expect(textarea.getAttribute("aria-describedBy")).toBeNull();
|
|
@@ -51,7 +51,7 @@ describe("NewTextarea component tests", () => {
|
|
|
51
51
|
const onChange = jest.fn();
|
|
52
52
|
const onBlur = jest.fn();
|
|
53
53
|
const { getByLabelText } = render(
|
|
54
|
-
<
|
|
54
|
+
<DxcTextarea label="Example label" placeholder="Placeholder" onChange={onChange} onBlur={onBlur} />
|
|
55
55
|
);
|
|
56
56
|
const textarea = getByLabelText("Example label");
|
|
57
57
|
|
|
@@ -67,7 +67,7 @@ describe("NewTextarea component tests", () => {
|
|
|
67
67
|
test("Not optional constraint (onChange)", () => {
|
|
68
68
|
const onChange = jest.fn();
|
|
69
69
|
const { getByLabelText } = render(
|
|
70
|
-
<
|
|
70
|
+
<DxcTextarea label="Example label" placeholder="Placeholder" onChange={onChange} />
|
|
71
71
|
);
|
|
72
72
|
const textarea = getByLabelText("Example label");
|
|
73
73
|
|
|
@@ -83,7 +83,7 @@ describe("NewTextarea component tests", () => {
|
|
|
83
83
|
const onChange = jest.fn();
|
|
84
84
|
const onBlur = jest.fn();
|
|
85
85
|
const { getByLabelText } = render(
|
|
86
|
-
<
|
|
86
|
+
<DxcTextarea
|
|
87
87
|
label="Example label"
|
|
88
88
|
placeholder="Placeholder"
|
|
89
89
|
onChange={onChange}
|
|
@@ -112,7 +112,7 @@ describe("NewTextarea component tests", () => {
|
|
|
112
112
|
const onChange = jest.fn();
|
|
113
113
|
const onBlur = jest.fn();
|
|
114
114
|
const { getByLabelText } = render(
|
|
115
|
-
<
|
|
115
|
+
<DxcTextarea
|
|
116
116
|
label="Example label"
|
|
117
117
|
placeholder="Placeholder"
|
|
118
118
|
onChange={onChange}
|
|
@@ -141,7 +141,7 @@ describe("NewTextarea component tests", () => {
|
|
|
141
141
|
const onChange = jest.fn();
|
|
142
142
|
const onBlur = jest.fn();
|
|
143
143
|
const { getByLabelText, getByText, queryByText } = render(
|
|
144
|
-
<
|
|
144
|
+
<DxcTextarea
|
|
145
145
|
label="Example label"
|
|
146
146
|
placeholder="Placeholder"
|
|
147
147
|
onChange={onChange}
|
|
@@ -174,7 +174,7 @@ describe("NewTextarea component tests", () => {
|
|
|
174
174
|
});
|
|
175
175
|
test("onBlur function is called correctly", () => {
|
|
176
176
|
const onBlur = jest.fn();
|
|
177
|
-
const { getByLabelText } = render(<
|
|
177
|
+
const { getByLabelText } = render(<DxcTextarea label="Example label" onBlur={onBlur} />);
|
|
178
178
|
const textarea = getByLabelText("Example label");
|
|
179
179
|
fireEvent.change(textarea, { target: { value: "Blur test" } });
|
|
180
180
|
fireEvent.blur(textarea);
|
|
@@ -183,9 +183,7 @@ describe("NewTextarea component tests", () => {
|
|
|
183
183
|
});
|
|
184
184
|
test("onChange function is called correctly", () => {
|
|
185
185
|
const onChange = jest.fn();
|
|
186
|
-
const { getByLabelText } = render(
|
|
187
|
-
<DxcNewTextarea label="Example label" value="Test value" onChange={onChange} />
|
|
188
|
-
);
|
|
186
|
+
const { getByLabelText } = render(<DxcTextarea label="Example label" value="Test value" onChange={onChange} />);
|
|
189
187
|
const textarea = getByLabelText("Example label");
|
|
190
188
|
fireEvent.change(textarea, { target: { value: "Controlled test" } });
|
|
191
189
|
expect(onChange).toHaveBeenCalled();
|
package/test/ToggleGroup.test.js
CHANGED
|
@@ -23,7 +23,11 @@ const options = [
|
|
|
23
23
|
|
|
24
24
|
describe("Toggle group component tests", () => {
|
|
25
25
|
test("Toggle group renders with correct labels", () => {
|
|
26
|
-
const { getByText } = render(
|
|
26
|
+
const { getByText } = render(
|
|
27
|
+
<DxcToggleGroup label="Toggle group label" helperText="Toggle group helper text" options={options} />
|
|
28
|
+
);
|
|
29
|
+
expect(getByText("Toggle group label")).toBeTruthy();
|
|
30
|
+
expect(getByText("Toggle group helper text")).toBeTruthy();
|
|
27
31
|
expect(getByText("Amazon")).toBeTruthy();
|
|
28
32
|
expect(getByText("Ebay")).toBeTruthy();
|
|
29
33
|
expect(getByText("Apple")).toBeTruthy();
|
package/test/Upload.test.js
CHANGED
|
@@ -34,7 +34,7 @@ describe("Upload component tests", () => {
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
test("Calls correct function callbackUpload", () => {
|
|
37
|
-
const onCallbackUpload = jest.fn(() => new Promise(resolve => setTimeout(resolve, 1000)));
|
|
37
|
+
const onCallbackUpload = jest.fn(() => new Promise((resolve) => setTimeout(resolve, 1000)));
|
|
38
38
|
const myfunction = jest.fn();
|
|
39
39
|
const { getByText } = render(<DxcUpload margin="small" callbackUpload={onCallbackUpload}></DxcUpload>);
|
|
40
40
|
|