@onewelcome/react-lib-components 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/dist/Button/BaseButton.d.ts +4 -4
- package/dist/Button/Button.d.ts +3 -3
- package/dist/Button/IconButton.d.ts +4 -4
- package/dist/ContextMenu/ContextMenu.d.ts +5 -5
- package/dist/ContextMenu/ContextMenuItem.d.ts +2 -2
- package/dist/DataGrid/DataGrid.d.ts +6 -6
- package/dist/DataGrid/DataGridActions/DataGridActions.d.ts +4 -4
- package/dist/DataGrid/DataGridActions/DataGridColumnsToggle.d.ts +3 -3
- package/dist/DataGrid/DataGridBody/DataGridBody.d.ts +3 -3
- package/dist/DataGrid/DataGridBody/DataGridCell.d.ts +2 -2
- package/dist/DataGrid/DataGridBody/DataGridRow.d.ts +3 -3
- package/dist/DataGrid/DataGridHeader/DataGridHeader.d.ts +3 -3
- package/dist/DataGrid/DataGridHeader/DataGridHeaderCell.d.ts +3 -3
- package/dist/DataGrid/datagrid.interfaces.d.ts +1 -1
- package/dist/Form/Checkbox/Checkbox.d.ts +5 -5
- package/dist/Form/Fieldset/Fieldset.d.ts +3 -3
- package/dist/Form/Form.d.ts +1 -1
- package/dist/Form/FormControl/FormControl.d.ts +3 -3
- package/dist/Form/FormGroup/FormGroup.d.ts +5 -5
- package/dist/Form/FormHelperText/FormHelperText.d.ts +3 -3
- package/dist/Form/FormSelectorWrapper/FormSelectorWrapper.d.ts +6 -6
- package/dist/Form/Input/Input.d.ts +5 -5
- package/dist/Form/Label/Label.d.ts +2 -2
- package/dist/Form/Radio/Radio.d.ts +5 -5
- package/dist/Form/Select/Option.d.ts +2 -2
- package/dist/Form/Select/Select.d.ts +5 -5
- package/dist/Form/Textarea/Textarea.d.ts +6 -6
- package/dist/Form/Toggle/Toggle.d.ts +3 -3
- package/dist/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/InputWrapper/InputWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/RadioWrapper/RadioWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/SelectWrapper/SelectWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/TextareaWrapper/TextareaWrapper.d.ts +4 -4
- package/dist/Form/Wrapper/Wrapper/Wrapper.d.ts +6 -6
- package/dist/Form/form.interfaces.d.ts +1 -1
- package/dist/Icon/Icon.d.ts +3 -3
- package/dist/Link/Link.d.ts +7 -7
- package/dist/Notifications/BaseModal/BaseModal.d.ts +4 -4
- package/dist/Notifications/BaseModal/BaseModalActions/BaseModalActions.d.ts +2 -2
- package/dist/Notifications/BaseModal/BaseModalContent/BaseModalContent.d.ts +2 -2
- package/dist/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.d.ts +2 -2
- package/dist/Notifications/Dialog/Dialog.d.ts +5 -5
- package/dist/Notifications/Dialog/DialogActions/DialogActions.d.ts +3 -3
- package/dist/Notifications/Dialog/DialogTitle/DialogTitle.d.ts +2 -2
- package/dist/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.d.ts +3 -3
- package/dist/Notifications/DiscardChangesModal/DiscardChangesModal.d.ts +7 -7
- package/dist/Notifications/Modal/Modal.d.ts +1 -1
- package/dist/Notifications/Modal/ModalActions/ModalActions.d.ts +1 -1
- package/dist/Notifications/Modal/ModalContent/ModalContent.d.ts +1 -1
- package/dist/Notifications/Modal/ModalHeader/ModalHeader.d.ts +1 -1
- package/dist/Notifications/SlideInModal/SlideInModal.d.ts +3 -3
- package/dist/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.d.ts +3 -3
- package/dist/Notifications/Snackbar/SnackbarItem/SnackbarItem.d.ts +2 -2
- package/dist/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.d.ts +3 -3
- package/dist/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.d.ts +2 -2
- package/dist/Notifications/Snackbar/interfaces.d.ts +2 -2
- package/dist/Pagination/Pagination.d.ts +3 -3
- package/dist/Popover/Popover.d.ts +3 -3
- package/dist/Skeleton/Skeleton.d.ts +3 -3
- package/dist/StatusIndicator/StatusIndicator.d.ts +5 -5
- package/dist/Tabs/Tab.d.ts +1 -1
- package/dist/Tabs/TabButton.d.ts +2 -2
- package/dist/Tabs/TabPanel.d.ts +2 -2
- package/dist/Tabs/Tabs.d.ts +4 -4
- package/dist/TextEllipsis/TextEllipsis.d.ts +2 -2
- package/dist/Tiles/Tile.d.ts +5 -5
- package/dist/Tiles/Tiles.d.ts +2 -2
- package/dist/Tooltip/Tooltip.d.ts +3 -3
- package/dist/Typography/Typography.d.ts +3 -3
- package/dist/Wizard/BaseWizardSteps/BaseWizardSteps.d.ts +2 -2
- package/dist/Wizard/Wizard.d.ts +3 -3
- package/dist/Wizard/WizardActions/WizardActions.d.ts +2 -2
- package/dist/Wizard/WizardStateProvider.d.ts +2 -2
- package/dist/Wizard/WizardSteps/WizardSteps.d.ts +2 -2
- package/dist/Wizard/wizardStateReducer.d.ts +5 -5
- package/dist/_BaseStyling_/BaseStyling.d.ts +1 -1
- package/dist/hooks/usePosition.d.ts +4 -4
- package/dist/hooks/useRepeater.d.ts +1 -1
- package/dist/hooks/useScroll.d.ts +1 -1
- package/dist/hooks/useSpacing.d.ts +1 -1
- package/dist/hooks/useWrapper.d.ts +1 -1
- package/dist/index.d.ts +55 -55
- package/dist/react-lib-components.cjs.development.js +672 -576
- package/dist/react-lib-components.cjs.development.js.map +1 -1
- package/dist/react-lib-components.cjs.production.min.js +1 -1
- package/dist/react-lib-components.cjs.production.min.js.map +1 -1
- package/dist/react-lib-components.esm.js +672 -576
- package/dist/react-lib-components.esm.js.map +1 -1
- package/package.json +27 -16
- package/src/Breadcrumbs/Breadcrumbs.test.tsx +15 -15
- package/src/Breadcrumbs/Breadcrumbs.tsx +11 -11
- package/src/Button/BaseButton.module.scss +1 -1
- package/src/Button/BaseButton.test.tsx +27 -27
- package/src/Button/BaseButton.tsx +8 -8
- package/src/Button/Button.module.scss +5 -5
- package/src/Button/Button.test.tsx +39 -39
- package/src/Button/Button.tsx +10 -10
- package/src/Button/IconButton.module.scss +5 -5
- package/src/Button/IconButton.test.tsx +29 -29
- package/src/Button/IconButton.tsx +11 -11
- package/src/ContextMenu/ContextMenu.test.tsx +81 -76
- package/src/ContextMenu/ContextMenu.tsx +43 -41
- package/src/ContextMenu/ContextMenuItem.module.scss +1 -1
- package/src/ContextMenu/ContextMenuItem.tsx +5 -5
- package/src/DataGrid/DataGrid.test.tsx +193 -193
- package/src/DataGrid/DataGrid.tsx +26 -26
- package/src/DataGrid/DataGridActions/DataGridActions.test.tsx +63 -63
- package/src/DataGrid/DataGridActions/DataGridActions.tsx +15 -15
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.module.scss +1 -1
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.test.tsx +21 -21
- package/src/DataGrid/DataGridActions/DataGridColumnsToggle.tsx +20 -20
- package/src/DataGrid/DataGridBody/DataGridBody.test.tsx +40 -40
- package/src/DataGrid/DataGridBody/DataGridBody.tsx +10 -10
- package/src/DataGrid/DataGridBody/DataGridCell.module.scss +1 -1
- package/src/DataGrid/DataGridBody/DataGridCell.test.tsx +25 -25
- package/src/DataGrid/DataGridBody/DataGridCell.tsx +6 -6
- package/src/DataGrid/DataGridBody/DataGridRow.test.tsx +38 -38
- package/src/DataGrid/DataGridBody/DataGridRow.tsx +8 -8
- package/src/DataGrid/DataGridHeader/DataGridHeader.module.scss +1 -2
- package/src/DataGrid/DataGridHeader/DataGridHeader.test.tsx +119 -119
- package/src/DataGrid/DataGridHeader/DataGridHeader.tsx +13 -13
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.module.scss +2 -0
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.test.tsx +51 -51
- package/src/DataGrid/DataGridHeader/DataGridHeaderCell.tsx +14 -14
- package/src/DataGrid/datagrid.interfaces.ts +1 -1
- package/src/Form/Checkbox/Checkbox.test.tsx +74 -74
- package/src/Form/Checkbox/Checkbox.tsx +27 -27
- package/src/Form/Fieldset/Fieldset.module.scss +1 -1
- package/src/Form/Fieldset/Fieldset.test.tsx +35 -35
- package/src/Form/Fieldset/Fieldset.tsx +27 -27
- package/src/Form/Form.test.tsx +18 -18
- package/src/Form/Form.tsx +3 -3
- package/src/Form/FormControl/FormControl.test.tsx +22 -22
- package/src/Form/FormControl/FormControl.tsx +10 -10
- package/src/Form/FormGroup/FormGroup.test.tsx +37 -37
- package/src/Form/FormGroup/FormGroup.tsx +16 -16
- package/src/Form/FormHelperText/FormHelperText.test.tsx +18 -18
- package/src/Form/FormHelperText/FormHelperText.tsx +7 -7
- package/src/Form/FormSelectorWrapper/FormSelectorWrapper.test.tsx +15 -15
- package/src/Form/FormSelectorWrapper/FormSelectorWrapper.tsx +14 -14
- package/src/Form/Input/Input.module.scss +20 -44
- package/src/Form/Input/Input.test.tsx +86 -59
- package/src/Form/Input/Input.tsx +96 -35
- package/src/Form/Label/Label.test.tsx +13 -13
- package/src/Form/Label/Label.tsx +6 -6
- package/src/Form/Radio/Radio.test.tsx +35 -35
- package/src/Form/Radio/Radio.tsx +17 -17
- package/src/Form/Select/Option.test.tsx +10 -10
- package/src/Form/Select/Option.tsx +8 -8
- package/src/Form/Select/Select.module.scss +7 -9
- package/src/Form/Select/Select.test.tsx +144 -141
- package/src/Form/Select/Select.tsx +79 -78
- package/src/Form/Textarea/Textarea.module.scss +8 -18
- package/src/Form/Textarea/Textarea.test.tsx +27 -27
- package/src/Form/Textarea/Textarea.tsx +33 -13
- package/src/Form/Toggle/Toggle.module.scss +1 -1
- package/src/Form/Toggle/Toggle.test.tsx +22 -22
- package/src/Form/Toggle/Toggle.tsx +10 -10
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.test.tsx +39 -39
- package/src/Form/Wrapper/CheckboxWrapper/CheckboxWrapper.tsx +12 -12
- package/src/Form/Wrapper/InputWrapper/InputWrapper.module.scss +2 -8
- package/src/Form/Wrapper/InputWrapper/InputWrapper.test.tsx +55 -55
- package/src/Form/Wrapper/InputWrapper/InputWrapper.tsx +30 -35
- package/src/Form/Wrapper/RadioWrapper/RadioWrapper.test.tsx +35 -35
- package/src/Form/Wrapper/RadioWrapper/RadioWrapper.tsx +12 -12
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.test.tsx +55 -55
- package/src/Form/Wrapper/SelectWrapper/SelectWrapper.tsx +12 -12
- package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.module.scss +2 -11
- package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.test.tsx +50 -50
- package/src/Form/Wrapper/TextareaWrapper/TextareaWrapper.tsx +22 -22
- package/src/Form/Wrapper/Wrapper/Wrapper.module.scss +2 -2
- package/src/Form/Wrapper/Wrapper/Wrapper.test.tsx +11 -11
- package/src/Form/Wrapper/Wrapper/Wrapper.tsx +17 -17
- package/src/Form/form.interfaces.ts +1 -1
- package/src/Icon/Icon.module.scss +71 -71
- package/src/Icon/Icon.test.tsx +18 -18
- package/src/Icon/Icon.tsx +70 -70
- package/src/Link/Link.module.scss +5 -5
- package/src/Link/Link.test.tsx +76 -76
- package/src/Link/Link.tsx +27 -27
- package/src/Link/types.d.ts +1 -1
- package/src/Notifications/BaseModal/BaseModal.module.scss +1 -1
- package/src/Notifications/BaseModal/BaseModal.test.tsx +53 -53
- package/src/Notifications/BaseModal/BaseModal.tsx +16 -16
- package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.test.tsx +13 -13
- package/src/Notifications/BaseModal/BaseModalActions/BaseModalActions.tsx +5 -5
- package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.test.tsx +16 -16
- package/src/Notifications/BaseModal/BaseModalContent/BaseModalContent.tsx +5 -5
- package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.test.tsx +19 -19
- package/src/Notifications/BaseModal/BaseModalHeader/BaseModalHeader.tsx +10 -10
- package/src/Notifications/Dialog/Dialog.test.tsx +35 -35
- package/src/Notifications/Dialog/Dialog.tsx +19 -19
- package/src/Notifications/Dialog/DialogActions/DialogActions.test.tsx +14 -14
- package/src/Notifications/Dialog/DialogActions/DialogActions.tsx +6 -6
- package/src/Notifications/Dialog/DialogTitle/DialogTitle.test.tsx +12 -12
- package/src/Notifications/Dialog/DialogTitle/DialogTitle.tsx +6 -6
- package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.test.tsx +20 -20
- package/src/Notifications/DiscardChangesModal/DiscardChangesDialog/DiscardChangesDialog.tsx +7 -7
- package/src/Notifications/DiscardChangesModal/DiscardChangesModal.test.tsx +36 -36
- package/src/Notifications/DiscardChangesModal/DiscardChangesModal.tsx +8 -8
- package/src/Notifications/Modal/Modal.test.tsx +6 -6
- package/src/Notifications/Modal/Modal.tsx +1 -1
- package/src/Notifications/Modal/ModalActions/ModalActions.tsx +2 -2
- package/src/Notifications/Modal/ModalContent/ModalContent.tsx +2 -2
- package/src/Notifications/Modal/ModalHeader/ModalHeader.tsx +2 -2
- package/src/Notifications/SlideInModal/SlideInModal.test.tsx +16 -16
- package/src/Notifications/SlideInModal/SlideInModal.tsx +16 -11
- package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.test.tsx +16 -16
- package/src/Notifications/Snackbar/SnackbarContainer/SnackbarContainer.tsx +6 -6
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.module.scss +2 -2
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.test.tsx +17 -17
- package/src/Notifications/Snackbar/SnackbarItem/SnackbarItem.tsx +23 -23
- package/src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.test.tsx +32 -32
- package/src/Notifications/Snackbar/SnackbarProvider/SnackbarProvider.tsx +18 -18
- package/src/Notifications/Snackbar/SnackbarProvider/SnackbarStateProvider.tsx +3 -3
- package/src/Notifications/Snackbar/interfaces.ts +2 -2
- package/src/Notifications/Snackbar/useSnackbar.ts +2 -2
- package/src/Pagination/Pagination.module.scss +2 -0
- package/src/Pagination/Pagination.test.tsx +47 -47
- package/src/Pagination/Pagination.tsx +35 -35
- package/src/Popover/Popover.test.tsx +19 -19
- package/src/Popover/Popover.tsx +7 -7
- package/src/Skeleton/Skeleton.module.scss +2 -2
- package/src/Skeleton/Skeleton.test.tsx +29 -29
- package/src/Skeleton/Skeleton.tsx +10 -10
- package/src/StatusIndicator/StatusIndicator.test.tsx +38 -38
- package/src/StatusIndicator/StatusIndicator.tsx +9 -9
- package/src/Tabs/Tab.test.tsx +13 -13
- package/src/Tabs/Tab.tsx +1 -1
- package/src/Tabs/TabButton.test.tsx +28 -28
- package/src/Tabs/TabButton.tsx +7 -7
- package/src/Tabs/TabPanel.test.tsx +30 -30
- package/src/Tabs/TabPanel.tsx +4 -4
- package/src/Tabs/Tabs.test.tsx +93 -93
- package/src/Tabs/Tabs.tsx +25 -25
- package/src/TextEllipsis/TextEllipsis.test.tsx +22 -22
- package/src/TextEllipsis/TextEllipsis.tsx +6 -6
- package/src/Tiles/Tile.module.scss +1 -1
- package/src/Tiles/Tile.test.tsx +42 -42
- package/src/Tiles/Tile.tsx +22 -22
- package/src/Tiles/Tiles.test.tsx +30 -30
- package/src/Tiles/Tiles.tsx +9 -9
- package/src/Tooltip/Tooltip.test.tsx +35 -35
- package/src/Tooltip/Tooltip.tsx +21 -21
- package/src/Typography/Typography.module.scss +1 -1
- package/src/Typography/Typography.test.tsx +49 -49
- package/src/Typography/Typography.tsx +42 -42
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.module.scss +1 -1
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.test.tsx +26 -26
- package/src/Wizard/BaseWizardSteps/BaseWizardSteps.tsx +24 -24
- package/src/Wizard/Wizard.test.tsx +56 -56
- package/src/Wizard/Wizard.tsx +6 -6
- package/src/Wizard/WizardActions/WizardActions.test.tsx +34 -34
- package/src/Wizard/WizardActions/WizardActions.tsx +14 -14
- package/src/Wizard/WizardStateProvider.tsx +3 -3
- package/src/Wizard/WizardSteps/WizardSteps.test.tsx +27 -27
- package/src/Wizard/WizardSteps/WizardSteps.tsx +7 -7
- package/src/Wizard/wizardStateReducer.ts +9 -9
- package/src/_BaseStyling_/BaseStyling.test.tsx +14 -14
- package/src/_BaseStyling_/BaseStyling.tsx +50 -50
- package/src/hooks/useAnimation.test.tsx +12 -12
- package/src/hooks/useAnimation.ts +4 -4
- package/src/hooks/useBodyClick.test.tsx +8 -8
- package/src/hooks/useBodyClick.ts +3 -3
- package/src/hooks/useFormSelector.test.ts +17 -17
- package/src/hooks/useFormSelector.ts +4 -4
- package/src/hooks/usePosition.test.tsx +215 -215
- package/src/hooks/usePosition.ts +68 -68
- package/src/hooks/useRepeater.test.tsx +26 -26
- package/src/hooks/useRepeater.ts +5 -5
- package/src/hooks/useScroll.test.tsx +5 -5
- package/src/hooks/useScroll.ts +3 -3
- package/src/hooks/useSpacing.test.ts +40 -40
- package/src/hooks/useSpacing.ts +3 -3
- package/src/hooks/useWrapper.test.ts +12 -12
- package/src/hooks/useWrapper.ts +10 -10
- package/src/index.ts +67 -67
- package/src/mixins.module.scss +76 -27
- package/src/types.d.ts +1 -1
- package/src/util/helper.test.tsx +25 -25
- package/src/util/helper.tsx +64 -64
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React, { useRef, useEffect } from
|
|
2
|
-
import { Toggle, Props } from
|
|
3
|
-
import { render } from
|
|
1
|
+
import React, { useRef, useEffect } from "react";
|
|
2
|
+
import { Toggle, Props } from "./Toggle";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
4
|
|
|
5
5
|
const defaultParams: Props = {
|
|
6
|
-
children:
|
|
7
|
-
name:
|
|
6
|
+
children: "label",
|
|
7
|
+
name: "example toggle"
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const createToggle = (params?: (defaultParams: Props) => Props) => {
|
|
@@ -17,34 +17,34 @@ const createToggle = (params?: (defaultParams: Props) => Props) => {
|
|
|
17
17
|
toggle content
|
|
18
18
|
</Toggle>
|
|
19
19
|
);
|
|
20
|
-
const toggle = queries.getByTestId(
|
|
20
|
+
const toggle = queries.getByTestId("toggle");
|
|
21
21
|
|
|
22
22
|
return {
|
|
23
23
|
...queries,
|
|
24
|
-
toggle
|
|
24
|
+
toggle
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
describe(
|
|
29
|
-
it(
|
|
28
|
+
describe("Toggle should render", () => {
|
|
29
|
+
it("renders without crashing", () => {
|
|
30
30
|
const { toggle } = createToggle();
|
|
31
31
|
|
|
32
32
|
expect(toggle).toBeDefined();
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
35
|
|
|
36
|
-
describe(
|
|
37
|
-
it(
|
|
38
|
-
const { toggle } = createToggle(
|
|
36
|
+
describe("Toggle attributes", () => {
|
|
37
|
+
it("should be checked", () => {
|
|
38
|
+
const { toggle } = createToggle(defaultParams => ({ ...defaultParams, checked: true }));
|
|
39
39
|
|
|
40
|
-
expect(toggle).toHaveAttribute(
|
|
40
|
+
expect(toggle).toHaveAttribute("aria-checked", "true");
|
|
41
41
|
});
|
|
42
42
|
});
|
|
43
43
|
|
|
44
|
-
describe(
|
|
45
|
-
it(
|
|
44
|
+
describe("ref should work", () => {
|
|
45
|
+
it("should give back the proper data prop, this also checks if the component propagates ...rest properly", () => {
|
|
46
46
|
const ExampleComponent = ({
|
|
47
|
-
propagateRef
|
|
47
|
+
propagateRef
|
|
48
48
|
}: {
|
|
49
49
|
propagateRef?: (ref: React.RefObject<HTMLElement>) => void;
|
|
50
50
|
}) => {
|
|
@@ -60,21 +60,21 @@ describe('ref should work', () => {
|
|
|
60
60
|
};
|
|
61
61
|
|
|
62
62
|
const refCheck = (ref: React.RefObject<HTMLElement>) => {
|
|
63
|
-
expect(ref.current).toHaveAttribute(
|
|
63
|
+
expect(ref.current).toHaveAttribute("data-ref", "testing");
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
render(<ExampleComponent propagateRef={refCheck} />);
|
|
67
67
|
});
|
|
68
68
|
});
|
|
69
69
|
|
|
70
|
-
describe(
|
|
71
|
-
it(
|
|
72
|
-
const { getByTestId } = createToggle(
|
|
70
|
+
describe("helperProps should be properly propagated down", () => {
|
|
71
|
+
it("renders an anchor tag as helper", () => {
|
|
72
|
+
const { getByTestId } = createToggle(defaultParams => ({
|
|
73
73
|
...defaultParams,
|
|
74
|
-
helperProps: { children: <a data-testid="helpertextanchor">test</a> }
|
|
74
|
+
helperProps: { children: <a data-testid="helpertextanchor">test</a> }
|
|
75
75
|
}));
|
|
76
76
|
|
|
77
|
-
const helperTextAnchor = getByTestId(
|
|
77
|
+
const helperTextAnchor = getByTestId("helpertextanchor");
|
|
78
78
|
|
|
79
79
|
expect(helperTextAnchor).toBeTruthy();
|
|
80
80
|
});
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import React, { ComponentPropsWithRef } from
|
|
2
|
-
import { Checkbox, Props as CheckboxProps } from
|
|
3
|
-
import classes from
|
|
1
|
+
import React, { ComponentPropsWithRef } from "react";
|
|
2
|
+
import { Checkbox, Props as CheckboxProps } from "../Checkbox/Checkbox";
|
|
3
|
+
import classes from "./Toggle.module.scss";
|
|
4
4
|
|
|
5
5
|
export interface Props
|
|
6
|
-
extends ComponentPropsWithRef<
|
|
7
|
-
Omit<CheckboxProps,
|
|
6
|
+
extends ComponentPropsWithRef<"input">,
|
|
7
|
+
Omit<CheckboxProps, "indeterminate" | "errorMessage" | "error" | "children" | "label"> {
|
|
8
8
|
children: string;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
export const Toggle = React.forwardRef<HTMLInputElement, Props>(
|
|
12
12
|
({ children, checked, disabled, helperProps, ...rest }: Props, ref) => (
|
|
13
|
-
<div className={classes[
|
|
13
|
+
<div className={classes["toggle-wrapper"]}>
|
|
14
14
|
<Checkbox
|
|
15
15
|
{...rest}
|
|
16
16
|
ref={ref}
|
|
17
17
|
checked={checked}
|
|
18
|
-
className={classes[
|
|
19
|
-
helperProps={{ className: classes[
|
|
18
|
+
className={classes["checkbox"]}
|
|
19
|
+
helperProps={{ className: classes["toggle-helper"], ...helperProps }}
|
|
20
20
|
disabled={disabled}
|
|
21
21
|
label={children}
|
|
22
22
|
>
|
|
23
23
|
<span
|
|
24
24
|
data-toggle
|
|
25
25
|
aria-hidden="true"
|
|
26
|
-
className={`${classes[
|
|
27
|
-
disabled ? classes[
|
|
26
|
+
className={`${classes["toggle"]} ${checked ? classes["checked"] : ""} ${
|
|
27
|
+
disabled ? classes["disabled"] : ""
|
|
28
28
|
} `}
|
|
29
29
|
></span>
|
|
30
30
|
</Checkbox>
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from
|
|
2
|
-
import { CheckboxWrapper, Props } from
|
|
3
|
-
import { Checkbox, Props as CheckboxProps } from
|
|
4
|
-
import { render } from
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import { CheckboxWrapper, Props } from "./CheckboxWrapper";
|
|
3
|
+
import { Checkbox, Props as CheckboxProps } from "../../Checkbox/Checkbox";
|
|
4
|
+
import { render } from "@testing-library/react";
|
|
5
5
|
|
|
6
6
|
const defaultParentParams: CheckboxProps = {
|
|
7
7
|
indeterminate: false,
|
|
8
|
-
name:
|
|
9
|
-
label:
|
|
8
|
+
name: "parentcheckbox",
|
|
9
|
+
label: "testlabel",
|
|
10
10
|
children: [
|
|
11
11
|
<Checkbox checked={true} name="checkbox2">
|
|
12
12
|
Checkbox 2
|
|
13
13
|
</Checkbox>,
|
|
14
|
-
<Checkbox name="checkbox3">Checkbox 3</Checkbox
|
|
15
|
-
]
|
|
14
|
+
<Checkbox name="checkbox3">Checkbox 3</Checkbox>
|
|
15
|
+
]
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
const defaultParams: Props = {
|
|
19
19
|
onChange: jest.fn(),
|
|
20
|
-
errorMessage:
|
|
20
|
+
errorMessage: "This is an error",
|
|
21
21
|
error: false,
|
|
22
|
-
helperText:
|
|
23
|
-
name:
|
|
24
|
-
fieldsetProps: { legend:
|
|
25
|
-
label:
|
|
26
|
-
children: []
|
|
22
|
+
helperText: "Helpertext",
|
|
23
|
+
name: "Checkboxwrapper",
|
|
24
|
+
fieldsetProps: { legend: "Example title" },
|
|
25
|
+
label: "Label",
|
|
26
|
+
children: []
|
|
27
27
|
};
|
|
28
28
|
|
|
29
29
|
const createCheckboxWrapper = (
|
|
@@ -46,27 +46,27 @@ const createCheckboxWrapper = (
|
|
|
46
46
|
<Checkbox data-testid="parentcheckbox" {...parentCheckboxParameters} />
|
|
47
47
|
</CheckboxWrapper>
|
|
48
48
|
);
|
|
49
|
-
const checkboxwrapper = queries.getByTestId(
|
|
50
|
-
const parentcheckbox = queries.getByTestId(
|
|
49
|
+
const checkboxwrapper = queries.getByTestId("checkboxwrapper");
|
|
50
|
+
const parentcheckbox = queries.getByTestId("parentcheckbox");
|
|
51
51
|
|
|
52
52
|
return {
|
|
53
53
|
...queries,
|
|
54
54
|
checkboxwrapper,
|
|
55
|
-
parentcheckbox
|
|
55
|
+
parentcheckbox
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
|
|
59
|
-
describe(
|
|
60
|
-
it(
|
|
59
|
+
describe("checkboxwrapper should render", () => {
|
|
60
|
+
it("renders without crashing", () => {
|
|
61
61
|
const { checkboxwrapper } = createCheckboxWrapper();
|
|
62
62
|
expect(checkboxwrapper).toBeTruthy();
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
65
|
|
|
66
|
-
describe(
|
|
67
|
-
it(
|
|
66
|
+
describe("ref should work", () => {
|
|
67
|
+
it("should give back the proper data prop, this also checks if the component propagates ...rest properly", () => {
|
|
68
68
|
const ExampleComponent = ({
|
|
69
|
-
propagateRef
|
|
69
|
+
propagateRef
|
|
70
70
|
}: {
|
|
71
71
|
propagateRef?: (ref: React.RefObject<HTMLElement>) => void;
|
|
72
72
|
}) => {
|
|
@@ -82,44 +82,44 @@ describe('ref should work', () => {
|
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
const refCheck = (ref: React.RefObject<HTMLElement>) => {
|
|
85
|
-
expect(ref.current).toHaveAttribute(
|
|
85
|
+
expect(ref.current).toHaveAttribute("data-ref", "testing");
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
render(<ExampleComponent propagateRef={refCheck} />);
|
|
89
89
|
});
|
|
90
90
|
});
|
|
91
91
|
|
|
92
|
-
describe(
|
|
93
|
-
it(
|
|
94
|
-
const { checkboxwrapper } = createCheckboxWrapper(
|
|
92
|
+
describe("CheckboxWrapper should have an error", () => {
|
|
93
|
+
it("should have an error and the children checkboxes should have aria-describedby of the error message of the group.", () => {
|
|
94
|
+
const { checkboxwrapper } = createCheckboxWrapper(defaultParams => ({
|
|
95
95
|
...defaultParams,
|
|
96
96
|
error: true,
|
|
97
|
-
errorMessage:
|
|
97
|
+
errorMessage: "This is an error"
|
|
98
98
|
}));
|
|
99
99
|
|
|
100
|
-
const checkboxes = checkboxwrapper?.querySelectorAll(
|
|
101
|
-
const errorMessage = checkboxwrapper?.querySelector(
|
|
100
|
+
const checkboxes = checkboxwrapper?.querySelectorAll(".checkbox-container input");
|
|
101
|
+
const errorMessage = checkboxwrapper?.querySelector(".default-helper .error-message .message");
|
|
102
102
|
|
|
103
103
|
/** All of the children checkboxes should be described by the error message in the parent checkbox group. */
|
|
104
|
-
checkboxes?.forEach(
|
|
105
|
-
expect(box.getAttribute(
|
|
104
|
+
checkboxes?.forEach(box => {
|
|
105
|
+
expect(box.getAttribute("aria-describedby")).toBe(errorMessage?.getAttribute("id"));
|
|
106
106
|
});
|
|
107
107
|
|
|
108
108
|
expect(checkboxes?.length).toBe(3);
|
|
109
|
-
expect(errorMessage).toHaveTextContent(
|
|
109
|
+
expect(errorMessage).toHaveTextContent("This is an error");
|
|
110
110
|
});
|
|
111
111
|
});
|
|
112
112
|
|
|
113
|
-
describe(
|
|
114
|
-
it(
|
|
115
|
-
const { parentcheckbox, container } = createCheckboxWrapper(undefined,
|
|
113
|
+
describe("Parent checkbox attributes", () => {
|
|
114
|
+
it("is indeterminate, label is set", () => {
|
|
115
|
+
const { parentcheckbox, container } = createCheckboxWrapper(undefined, defaultParams => ({
|
|
116
116
|
...defaultParams,
|
|
117
|
-
indeterminate: true
|
|
117
|
+
indeterminate: true
|
|
118
118
|
}));
|
|
119
119
|
|
|
120
|
-
expect(parentcheckbox.getAttribute(
|
|
120
|
+
expect(parentcheckbox.getAttribute("aria-checked")).toBe("mixed");
|
|
121
121
|
expect(
|
|
122
|
-
container.querySelector(`label[for="${parentcheckbox.getAttribute(
|
|
123
|
-
).toHaveTextContent(
|
|
122
|
+
container.querySelector(`label[for="${parentcheckbox.getAttribute("id")}"]`)
|
|
123
|
+
).toHaveTextContent("testlabel");
|
|
124
124
|
});
|
|
125
125
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { ComponentPropsWithRef, ReactElement, useEffect } from
|
|
2
|
-
import classes from
|
|
3
|
-
import { useWrapper } from
|
|
4
|
-
import { Wrapper, WrapperProps } from
|
|
5
|
-
import { Icons } from
|
|
6
|
-
import { Fieldset, Props as FieldsetProps } from
|
|
1
|
+
import React, { ComponentPropsWithRef, ReactElement, useEffect } from "react";
|
|
2
|
+
import classes from "./CheckboxWrapper.module.scss";
|
|
3
|
+
import { useWrapper } from "../../../hooks/useWrapper";
|
|
4
|
+
import { Wrapper, WrapperProps } from "../Wrapper/Wrapper";
|
|
5
|
+
import { Icons } from "../../../Icon/Icon";
|
|
6
|
+
import { Fieldset, Props as FieldsetProps } from "../../../Form/Fieldset/Fieldset";
|
|
7
7
|
|
|
8
|
-
export interface Props extends ComponentPropsWithRef<
|
|
8
|
+
export interface Props extends ComponentPropsWithRef<"div">, WrapperProps {
|
|
9
9
|
children: ReactElement[] | ReactElement;
|
|
10
10
|
fieldsetProps: FieldsetProps;
|
|
11
11
|
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
@@ -24,12 +24,12 @@ export const CheckboxWrapper = React.forwardRef<HTMLDivElement, Props>(
|
|
|
24
24
|
}, []);
|
|
25
25
|
|
|
26
26
|
const renderChildren = () =>
|
|
27
|
-
React.Children.map(children,
|
|
27
|
+
React.Children.map(children, child =>
|
|
28
28
|
React.cloneElement(child, {
|
|
29
29
|
parentErrorId: errorId,
|
|
30
30
|
error: error,
|
|
31
31
|
parentHelperId: helperText ? helperId : false,
|
|
32
|
-
disabled: rest.disabled
|
|
32
|
+
disabled: rest.disabled
|
|
33
33
|
})
|
|
34
34
|
);
|
|
35
35
|
|
|
@@ -43,9 +43,9 @@ export const CheckboxWrapper = React.forwardRef<HTMLDivElement, Props>(
|
|
|
43
43
|
helperText={helperText}
|
|
44
44
|
helperProps={{
|
|
45
45
|
...helperProps,
|
|
46
|
-
className: `${classes[
|
|
47
|
-
error ? classes[
|
|
48
|
-
} ${helperProps?.className ??
|
|
46
|
+
className: `${classes["checkbox-wrapper-helper"]} ${
|
|
47
|
+
error ? classes["checkbox-wrapper-error"] : ""
|
|
48
|
+
} ${helperProps?.className ?? ""}`
|
|
49
49
|
}}
|
|
50
50
|
error={error}
|
|
51
51
|
errorMessageIcon={Icons.Error}
|
|
@@ -1,12 +1,6 @@
|
|
|
1
|
-
.
|
|
2
|
-
left: calc(
|
|
3
|
-
1.25rem + 2px
|
|
4
|
-
); // 2px is for offset of the textarea border. It's relative to the parent div which doesn't have a border.
|
|
1
|
+
@import "../../../mixins.module.scss";
|
|
5
2
|
|
|
6
|
-
|
|
7
|
-
color: var(--color-primary);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
3
|
+
@include inputLabelPrimaryColorOnFocus("label.input-label");
|
|
10
4
|
|
|
11
5
|
input {
|
|
12
6
|
&.floating-label {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import React, { useEffect, useRef } from
|
|
2
|
-
import { InputWrapper, Props } from
|
|
3
|
-
import { render } from
|
|
4
|
-
import userEvent from
|
|
1
|
+
import React, { useEffect, useRef } from "react";
|
|
2
|
+
import { InputWrapper, Props } from "./InputWrapper";
|
|
3
|
+
import { render } from "@testing-library/react";
|
|
4
|
+
import userEvent from "@testing-library/user-event";
|
|
5
5
|
|
|
6
6
|
const defaultParams: Props = {
|
|
7
|
-
label:
|
|
8
|
-
type:
|
|
9
|
-
name:
|
|
10
|
-
helperText:
|
|
11
|
-
errorMessage:
|
|
7
|
+
label: "Example label",
|
|
8
|
+
type: "text",
|
|
9
|
+
name: "Example input",
|
|
10
|
+
helperText: "this is helpertext",
|
|
11
|
+
errorMessage: "This is an error",
|
|
12
12
|
error: false,
|
|
13
|
-
value:
|
|
14
|
-
onChange: jest.fn()
|
|
13
|
+
value: "value",
|
|
14
|
+
onChange: jest.fn()
|
|
15
15
|
};
|
|
16
16
|
|
|
17
17
|
const createInputWrapper = (params?: (defaultParams: Props) => Props) => {
|
|
@@ -20,50 +20,50 @@ const createInputWrapper = (params?: (defaultParams: Props) => Props) => {
|
|
|
20
20
|
parameters = params(defaultParams);
|
|
21
21
|
}
|
|
22
22
|
const queries = render(<InputWrapper {...parameters} data-testid="inputwrapper" />);
|
|
23
|
-
const inputwrapper = queries.getByTestId(
|
|
23
|
+
const inputwrapper = queries.getByTestId("inputwrapper");
|
|
24
24
|
|
|
25
25
|
return {
|
|
26
26
|
...queries,
|
|
27
|
-
inputwrapper
|
|
27
|
+
inputwrapper
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
describe(
|
|
32
|
-
it(
|
|
31
|
+
describe("InputWrapper should render", () => {
|
|
32
|
+
it("renders without crashing", () => {
|
|
33
33
|
const { inputwrapper } = createInputWrapper();
|
|
34
34
|
|
|
35
35
|
expect(inputwrapper).toBeTruthy();
|
|
36
36
|
});
|
|
37
37
|
|
|
38
|
-
it(
|
|
39
|
-
const { getByTestId } = createInputWrapper(
|
|
38
|
+
it("has helpertext", () => {
|
|
39
|
+
const { getByTestId } = createInputWrapper(defaultParams => ({
|
|
40
40
|
...defaultParams,
|
|
41
|
-
helperProps: {
|
|
41
|
+
helperProps: { "data-testid": "helper_text" }
|
|
42
42
|
}));
|
|
43
43
|
|
|
44
|
-
const helperText = getByTestId(
|
|
44
|
+
const helperText = getByTestId("helper_text");
|
|
45
45
|
|
|
46
46
|
expect(helperText).toBeTruthy();
|
|
47
47
|
});
|
|
48
48
|
|
|
49
|
-
it(
|
|
50
|
-
const { getByTestId } = createInputWrapper(
|
|
49
|
+
it("is described by the helpertext", () => {
|
|
50
|
+
const { getByTestId } = createInputWrapper(defaultParams => ({
|
|
51
51
|
...defaultParams,
|
|
52
|
-
inputProps: {
|
|
53
|
-
helperProps: {
|
|
52
|
+
inputProps: { "data-testid": "input" },
|
|
53
|
+
helperProps: { "data-testid": "helper_text" }
|
|
54
54
|
}));
|
|
55
55
|
|
|
56
|
-
const input = getByTestId(
|
|
57
|
-
const helperId = getByTestId(
|
|
56
|
+
const input = getByTestId("input");
|
|
57
|
+
const helperId = getByTestId("helper_text").getAttribute("id");
|
|
58
58
|
|
|
59
|
-
expect(input).toHaveAttribute(
|
|
59
|
+
expect(input).toHaveAttribute("aria-describedby", helperId);
|
|
60
60
|
});
|
|
61
61
|
});
|
|
62
62
|
|
|
63
|
-
describe(
|
|
64
|
-
it(
|
|
63
|
+
describe("ref should work", () => {
|
|
64
|
+
it("should give back the proper data prop, this also checks if the component propagates ...rest properly", () => {
|
|
65
65
|
const ExampleComponent = ({
|
|
66
|
-
propagateRef
|
|
66
|
+
propagateRef
|
|
67
67
|
}: {
|
|
68
68
|
propagateRef?: (
|
|
69
69
|
ref: React.RefObject<HTMLElement>,
|
|
@@ -82,7 +82,7 @@ describe('ref should work', () => {
|
|
|
82
82
|
return (
|
|
83
83
|
<InputWrapper
|
|
84
84
|
{...defaultParams}
|
|
85
|
-
inputProps={{ ref: innerRef,
|
|
85
|
+
inputProps={{ ref: innerRef, "data-ref": "inner-testing" }}
|
|
86
86
|
name="test"
|
|
87
87
|
data-ref="testing"
|
|
88
88
|
ref={ref}
|
|
@@ -94,35 +94,35 @@ describe('ref should work', () => {
|
|
|
94
94
|
ref: React.RefObject<HTMLElement>,
|
|
95
95
|
innerRef: React.RefObject<HTMLElement>
|
|
96
96
|
) => {
|
|
97
|
-
expect(ref.current).toHaveAttribute(
|
|
98
|
-
expect(innerRef.current).toHaveAttribute(
|
|
97
|
+
expect(ref.current).toHaveAttribute("data-ref", "testing");
|
|
98
|
+
expect(innerRef.current).toHaveAttribute("data-ref", "inner-testing");
|
|
99
99
|
};
|
|
100
100
|
|
|
101
101
|
render(<ExampleComponent propagateRef={refCheck} />);
|
|
102
102
|
});
|
|
103
103
|
});
|
|
104
104
|
|
|
105
|
-
describe(
|
|
106
|
-
it(
|
|
105
|
+
describe("InputWrapper should be interactive", () => {
|
|
106
|
+
it("executes the eventlisteners", () => {
|
|
107
107
|
const onFocusHandler = jest.fn();
|
|
108
108
|
const onChangeHandler = jest.fn();
|
|
109
109
|
const onBlurHandler = jest.fn();
|
|
110
110
|
|
|
111
|
-
const { getByTestId } = createInputWrapper(
|
|
111
|
+
const { getByTestId } = createInputWrapper(defaultParams => ({
|
|
112
112
|
...defaultParams,
|
|
113
113
|
inputProps: {
|
|
114
|
-
|
|
114
|
+
"data-testid": "input"
|
|
115
115
|
},
|
|
116
116
|
onChange: onChangeHandler,
|
|
117
117
|
onFocus: onFocusHandler,
|
|
118
118
|
onBlur: onBlurHandler,
|
|
119
|
-
value:
|
|
119
|
+
value: ""
|
|
120
120
|
}));
|
|
121
121
|
|
|
122
|
-
const input = getByTestId(
|
|
122
|
+
const input = getByTestId("input");
|
|
123
123
|
|
|
124
124
|
userEvent.tab();
|
|
125
|
-
userEvent.keyboard(
|
|
125
|
+
userEvent.keyboard("test");
|
|
126
126
|
|
|
127
127
|
expect(input).toHaveFocus();
|
|
128
128
|
expect(onChangeHandler).toHaveBeenCalled();
|
|
@@ -134,39 +134,39 @@ describe('InputWrapper should be interactive', () => {
|
|
|
134
134
|
});
|
|
135
135
|
});
|
|
136
136
|
|
|
137
|
-
describe(
|
|
138
|
-
const prefix =
|
|
139
|
-
const suffix =
|
|
137
|
+
describe("InputWrapper should support prefix and suffix", () => {
|
|
138
|
+
const prefix = "prefix";
|
|
139
|
+
const suffix = "suffix";
|
|
140
140
|
|
|
141
141
|
const hasPrefixAndSuffixDefined = (container: HTMLElement) => {
|
|
142
|
-
expect(container.querySelector(
|
|
143
|
-
expect(container.querySelector(
|
|
142
|
+
expect(container.querySelector("[data-prefix]")).toHaveTextContent(prefix);
|
|
143
|
+
expect(container.querySelector("[data-suffix]")).toHaveTextContent(suffix);
|
|
144
144
|
};
|
|
145
145
|
|
|
146
|
-
it(
|
|
147
|
-
const { container, getByTestId } = createInputWrapper(
|
|
146
|
+
it("renders prefix and sufix when input has focus", () => {
|
|
147
|
+
const { container, getByTestId } = createInputWrapper(defaultParams => ({
|
|
148
148
|
...defaultParams,
|
|
149
|
-
value:
|
|
150
|
-
inputProps: {
|
|
149
|
+
value: "",
|
|
150
|
+
inputProps: { "data-testid": "input", prefix, suffix }
|
|
151
151
|
}));
|
|
152
152
|
|
|
153
|
-
const input = getByTestId(
|
|
153
|
+
const input = getByTestId("input");
|
|
154
154
|
|
|
155
|
-
expect(container.querySelector(
|
|
156
|
-
expect(container.querySelector(
|
|
155
|
+
expect(container.querySelector("[data-prefix]")).toBeNull();
|
|
156
|
+
expect(container.querySelector("[data-suffix]")).toBeNull();
|
|
157
157
|
|
|
158
158
|
userEvent.tab();
|
|
159
159
|
expect(input).toHaveFocus();
|
|
160
160
|
hasPrefixAndSuffixDefined(container);
|
|
161
161
|
});
|
|
162
162
|
|
|
163
|
-
it(
|
|
164
|
-
const { container, getByTestId } = createInputWrapper(
|
|
163
|
+
it("renders prefix and sufix when input has value", () => {
|
|
164
|
+
const { container, getByTestId } = createInputWrapper(defaultParams => ({
|
|
165
165
|
...defaultParams,
|
|
166
|
-
inputProps: {
|
|
166
|
+
inputProps: { "data-testid": "input", prefix, suffix }
|
|
167
167
|
}));
|
|
168
168
|
|
|
169
|
-
const input = getByTestId(
|
|
169
|
+
const input = getByTestId("input");
|
|
170
170
|
|
|
171
171
|
hasPrefixAndSuffixDefined(container);
|
|
172
172
|
|