@dxc-technology/halstack-react 0.0.0-5b2ad05 → 0.0.0-5b6503c
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/V3Select/index.d.ts +27 -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/box/index.d.ts +25 -0
- package/dist/button/index.d.ts +24 -0
- package/dist/card/index.d.ts +22 -0
- package/dist/checkbox/index.d.ts +24 -0
- package/dist/chip/index.d.ts +22 -0
- package/dist/common/variables.js +60 -64
- package/dist/date/Date.js +6 -6
- package/dist/date/index.d.ts +27 -0
- package/dist/dialog/index.d.ts +18 -0
- package/dist/dropdown/index.d.ts +26 -0
- package/dist/file-input/FileItem.js +8 -1
- package/dist/file-input/index.d.ts +1 -1
- package/dist/footer/index.d.ts +25 -0
- package/dist/header/index.d.ts +25 -0
- package/dist/heading/index.d.ts +17 -0
- package/dist/input-text/InputText.js +4 -4
- package/dist/input-text/index.d.ts +36 -0
- package/dist/link/index.d.ts +23 -0
- package/dist/main.d.ts +36 -4
- package/dist/main.js +3 -3
- package/dist/paginator/Paginator.js +51 -29
- package/dist/paginator/index.d.ts +20 -0
- package/dist/password-input/PasswordInput.js +6 -1
- 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 +193 -182
- package/dist/sidenav/index.d.ts +13 -0
- 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/text-input/TextInput.js +3 -0
- package/dist/toggle/index.d.ts +21 -0
- package/dist/toggle-group/index.d.ts +21 -0
- package/dist/upload/Upload.js +3 -3
- package/dist/upload/index.d.ts +15 -0
- package/dist/wizard/index.d.ts +18 -0
- package/package.json +1 -1
- package/test/Date.test.js +34 -36
- package/test/InputText.test.js +16 -24
- package/test/Paginator.test.js +5 -1
- package/test/ResultsetTable.test.js +5 -4
- package/test/Select.test.js +415 -0
- package/test/TextInput.test.js +5 -5
- package/test/Upload.test.js +4 -4
package/test/Upload.test.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { render, fireEvent, act, createEvent } from "@testing-library/react";
|
|
3
|
-
import
|
|
3
|
+
import DxcUpload from "../src/upload/Upload";
|
|
4
4
|
|
|
5
5
|
describe("Upload component tests", () => {
|
|
6
6
|
test("Upload renders with correct text", () => {
|
|
7
|
-
const { getByText } = render(<
|
|
7
|
+
const { getByText } = render(<DxcUpload margin="small"></DxcUpload>);
|
|
8
8
|
expect(getByText("There are no files to upload")).toBeTruthy();
|
|
9
9
|
expect(getByText("Drag and drop your files here or choose one from your computer")).toBeTruthy();
|
|
10
10
|
expect(getByText("CHOOSE FILES")).toBeTruthy();
|
|
@@ -12,7 +12,7 @@ describe("Upload component tests", () => {
|
|
|
12
12
|
|
|
13
13
|
test("Upload shows file information", () => {
|
|
14
14
|
const myfunction = jest.fn();
|
|
15
|
-
const { getByText } = render(<
|
|
15
|
+
const { getByText } = render(<DxcUpload margin="small"></DxcUpload>);
|
|
16
16
|
|
|
17
17
|
const dropZone = getByText("There are no files to upload");
|
|
18
18
|
const dropEvent = createEvent.drop(dropZone);
|
|
@@ -36,7 +36,7 @@ describe("Upload component tests", () => {
|
|
|
36
36
|
test("Calls correct function callbackUpload", () => {
|
|
37
37
|
const onCallbackUpload = jest.fn(() => new Promise((resolve) => setTimeout(resolve, 1000)));
|
|
38
38
|
const myfunction = jest.fn();
|
|
39
|
-
const { getByText } = render(<
|
|
39
|
+
const { getByText } = render(<DxcUpload margin="small" callbackUpload={onCallbackUpload}></DxcUpload>);
|
|
40
40
|
|
|
41
41
|
const dropZone = getByText("There are no files to upload");
|
|
42
42
|
const dropEvent = createEvent.drop(dropZone);
|