@dxc-technology/halstack-react 0.0.0-4dc6bb3 → 0.0.0-4e1277a
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/BackgroundColorContext.d.ts +1 -10
- package/BackgroundColorContext.js +5 -22
- package/HalstackContext.d.ts +1243 -6
- package/HalstackContext.js +126 -111
- package/README.md +47 -0
- package/accordion/Accordion.d.ts +1 -1
- package/accordion/Accordion.js +37 -100
- package/accordion/Accordion.stories.tsx +101 -124
- package/accordion/Accordion.test.js +19 -34
- package/accordion/types.d.ts +5 -17
- package/accordion-group/AccordionGroup.d.ts +2 -2
- package/accordion-group/AccordionGroup.js +29 -77
- package/accordion-group/AccordionGroup.stories.tsx +78 -77
- package/accordion-group/AccordionGroup.test.js +44 -72
- package/accordion-group/AccordionGroupAccordion.d.ts +4 -0
- package/accordion-group/AccordionGroupAccordion.js +31 -0
- package/accordion-group/AccordionGroupContext.d.ts +3 -0
- package/accordion-group/AccordionGroupContext.js +8 -0
- package/accordion-group/types.d.ts +6 -18
- package/action-icon/ActionIcon.d.ts +4 -0
- package/action-icon/ActionIcon.js +47 -0
- package/action-icon/ActionIcon.stories.tsx +41 -0
- package/action-icon/ActionIcon.test.js +64 -0
- package/action-icon/types.d.ts +26 -0
- package/alert/Alert.js +19 -58
- package/alert/Alert.stories.tsx +28 -0
- package/alert/Alert.test.js +29 -46
- package/alert/types.d.ts +5 -5
- package/badge/Badge.d.ts +1 -1
- package/badge/Badge.js +141 -43
- package/badge/Badge.stories.tsx +210 -0
- package/badge/Badge.test.js +30 -0
- package/badge/types.d.ts +52 -3
- package/bleed/Bleed.js +13 -21
- package/bleed/Bleed.stories.tsx +1 -0
- package/bleed/types.d.ts +2 -2
- package/box/Box.d.ts +1 -1
- package/box/Box.js +18 -59
- package/box/Box.stories.tsx +38 -51
- package/box/Box.test.js +2 -7
- package/box/types.d.ts +3 -15
- package/bulleted-list/BulletedList.js +19 -53
- package/bulleted-list/BulletedList.stories.tsx +8 -93
- package/bulleted-list/types.d.ts +32 -5
- package/button/Button.d.ts +1 -1
- package/button/Button.js +71 -106
- package/button/Button.stories.tsx +144 -101
- package/button/Button.test.js +20 -17
- package/button/types.d.ts +9 -5
- package/card/Card.d.ts +1 -1
- package/card/Card.js +48 -89
- package/card/Card.stories.tsx +12 -42
- package/card/Card.test.js +11 -22
- package/card/types.d.ts +6 -12
- package/checkbox/Checkbox.d.ts +2 -2
- package/checkbox/Checkbox.js +92 -126
- package/checkbox/Checkbox.stories.tsx +128 -94
- package/checkbox/Checkbox.test.js +108 -64
- package/checkbox/types.d.ts +11 -3
- package/chip/Chip.js +39 -79
- package/chip/Chip.stories.tsx +121 -26
- package/chip/Chip.test.js +16 -31
- package/chip/types.d.ts +4 -4
- package/common/coreTokens.d.ts +237 -0
- package/common/coreTokens.js +184 -0
- package/common/utils.d.ts +1 -0
- package/common/utils.js +6 -12
- package/common/variables.d.ts +1395 -0
- package/common/variables.js +921 -1162
- package/container/Container.d.ts +4 -0
- package/container/Container.js +194 -0
- package/container/Container.stories.tsx +214 -0
- package/container/types.d.ts +74 -0
- package/contextual-menu/ContextualMenu.d.ts +7 -0
- package/contextual-menu/ContextualMenu.js +71 -0
- package/contextual-menu/ContextualMenu.stories.tsx +182 -0
- package/contextual-menu/ContextualMenu.test.js +71 -0
- package/contextual-menu/MenuItemAction.d.ts +4 -0
- package/contextual-menu/MenuItemAction.js +46 -0
- package/contextual-menu/types.d.ts +22 -0
- package/date-input/Calendar.d.ts +4 -0
- package/date-input/Calendar.js +214 -0
- package/date-input/DateInput.js +150 -299
- package/date-input/DateInput.stories.tsx +203 -56
- package/date-input/DateInput.test.js +700 -371
- package/date-input/DatePicker.d.ts +4 -0
- package/date-input/DatePicker.js +115 -0
- package/date-input/Icons.d.ts +6 -0
- package/date-input/Icons.js +58 -0
- package/date-input/YearPicker.d.ts +4 -0
- package/date-input/YearPicker.js +100 -0
- package/date-input/types.d.ts +72 -15
- package/dialog/Dialog.d.ts +1 -1
- package/dialog/Dialog.js +61 -119
- package/dialog/Dialog.stories.tsx +310 -212
- package/dialog/Dialog.test.js +269 -32
- package/dialog/types.d.ts +18 -26
- package/divider/Divider.d.ts +4 -0
- package/divider/Divider.js +36 -0
- package/divider/Divider.stories.tsx +223 -0
- package/divider/Divider.test.js +38 -0
- package/divider/types.d.ts +21 -0
- package/divider/types.js +5 -0
- package/dropdown/Dropdown.js +75 -127
- package/dropdown/Dropdown.stories.tsx +210 -84
- package/dropdown/Dropdown.test.js +409 -400
- package/dropdown/DropdownMenu.js +20 -37
- package/dropdown/DropdownMenuItem.js +9 -34
- package/dropdown/types.d.ts +18 -20
- package/file-input/FileInput.d.ts +2 -2
- package/file-input/FileInput.js +241 -355
- package/file-input/FileInput.stories.tsx +123 -12
- package/file-input/FileInput.test.js +369 -367
- package/file-input/FileItem.d.ts +4 -14
- package/file-input/FileItem.js +45 -96
- package/file-input/types.d.ts +25 -8
- package/flex/Flex.d.ts +1 -1
- package/flex/Flex.js +40 -40
- package/flex/Flex.stories.tsx +35 -26
- package/flex/types.d.ts +84 -8
- package/footer/Footer.d.ts +1 -1
- package/footer/Footer.js +70 -117
- package/footer/Footer.stories.tsx +55 -21
- package/footer/Footer.test.js +33 -57
- package/footer/Icons.d.ts +3 -2
- package/footer/Icons.js +66 -7
- package/footer/types.d.ts +25 -27
- package/grid/Grid.d.ts +7 -0
- package/grid/Grid.js +76 -0
- package/grid/Grid.stories.tsx +219 -0
- package/grid/types.d.ts +115 -0
- package/grid/types.js +5 -0
- package/header/Header.d.ts +4 -3
- package/header/Header.js +48 -133
- package/header/Header.stories.tsx +115 -36
- package/header/Header.test.js +13 -26
- package/header/Icons.d.ts +2 -2
- package/header/Icons.js +2 -7
- package/header/types.d.ts +7 -22
- package/heading/Heading.js +10 -32
- package/heading/Heading.test.js +71 -88
- package/heading/types.d.ts +7 -7
- package/icon/Icon.d.ts +4 -0
- package/icon/Icon.js +33 -0
- package/icon/Icon.stories.tsx +26 -0
- package/icon/types.d.ts +4 -0
- package/icon/types.js +5 -0
- package/image/Image.d.ts +4 -0
- package/image/Image.js +70 -0
- package/image/Image.stories.tsx +129 -0
- package/image/types.d.ts +72 -0
- package/image/types.js +5 -0
- package/inset/Inset.js +13 -21
- package/inset/Inset.stories.tsx +2 -1
- package/inset/types.d.ts +2 -2
- package/layout/ApplicationLayout.d.ts +5 -5
- package/layout/ApplicationLayout.js +30 -67
- package/layout/ApplicationLayout.stories.tsx +1 -1
- package/layout/Icons.d.ts +8 -5
- package/layout/Icons.js +51 -59
- package/layout/types.d.ts +5 -6
- package/link/Link.js +25 -46
- package/link/Link.stories.tsx +60 -0
- package/link/Link.test.js +24 -44
- package/link/types.d.ts +14 -14
- package/main.d.ts +10 -5
- package/main.js +47 -59
- package/nav-tabs/NavTabs.d.ts +7 -0
- package/{tabs-nav → nav-tabs}/NavTabs.js +25 -57
- package/{tabs-nav → nav-tabs}/NavTabs.stories.tsx +115 -9
- package/{tabs-nav → nav-tabs}/NavTabs.test.js +39 -45
- package/nav-tabs/NavTabsContext.d.ts +3 -0
- package/nav-tabs/NavTabsContext.js +8 -0
- package/nav-tabs/Tab.js +118 -0
- package/{tabs-nav → nav-tabs}/types.d.ts +14 -15
- package/nav-tabs/types.js +5 -0
- package/number-input/NumberInput.js +46 -36
- package/number-input/NumberInput.stories.tsx +42 -26
- package/number-input/NumberInput.test.js +860 -377
- package/number-input/NumberInputContext.d.ts +3 -4
- package/number-input/NumberInputContext.js +3 -14
- package/number-input/types.d.ts +17 -5
- package/package.json +37 -40
- package/paginator/Icons.d.ts +5 -0
- package/paginator/Icons.js +21 -47
- package/paginator/Paginator.js +23 -59
- package/paginator/Paginator.stories.tsx +24 -0
- package/paginator/Paginator.test.js +253 -226
- package/paginator/types.d.ts +3 -3
- package/paragraph/Paragraph.d.ts +3 -4
- package/paragraph/Paragraph.js +6 -22
- package/paragraph/Paragraph.stories.tsx +0 -17
- package/password-input/Icons.d.ts +6 -0
- package/password-input/Icons.js +35 -0
- package/password-input/PasswordInput.js +57 -126
- package/password-input/PasswordInput.stories.tsx +1 -33
- package/password-input/PasswordInput.test.js +158 -141
- package/password-input/types.d.ts +8 -7
- package/progress-bar/ProgressBar.d.ts +2 -2
- package/progress-bar/ProgressBar.js +23 -55
- package/progress-bar/{ProgressBar.stories.jsx → ProgressBar.stories.tsx} +36 -3
- package/progress-bar/ProgressBar.test.js +36 -53
- package/progress-bar/types.d.ts +4 -3
- package/quick-nav/QuickNav.js +7 -28
- package/quick-nav/QuickNav.stories.tsx +82 -26
- package/quick-nav/types.d.ts +10 -10
- package/radio-group/Radio.d.ts +1 -1
- package/radio-group/Radio.js +31 -63
- package/radio-group/RadioGroup.js +51 -95
- package/radio-group/RadioGroup.stories.tsx +131 -18
- package/radio-group/RadioGroup.test.js +513 -422
- package/radio-group/types.d.ts +8 -8
- package/resultset-table/Icons.d.ts +7 -0
- package/resultset-table/Icons.js +47 -0
- package/resultset-table/ResultsetTable.d.ts +7 -0
- package/resultset-table/ResultsetTable.js +166 -0
- package/{resultsetTable → resultset-table}/ResultsetTable.stories.tsx +152 -30
- package/{resultsetTable → resultset-table}/ResultsetTable.test.js +167 -144
- package/{resultsetTable → resultset-table}/types.d.ts +13 -7
- package/resultset-table/types.js +5 -0
- package/select/Icons.d.ts +7 -7
- package/select/Icons.js +1 -5
- package/select/Listbox.d.ts +1 -1
- package/select/Listbox.js +17 -72
- package/select/Option.js +27 -50
- package/select/Select.js +121 -175
- package/select/Select.stories.tsx +497 -153
- package/select/Select.test.js +1970 -1775
- package/select/types.d.ts +16 -17
- package/sidenav/Icons.d.ts +7 -0
- package/sidenav/Icons.js +47 -0
- package/sidenav/Sidenav.d.ts +2 -2
- package/sidenav/Sidenav.js +83 -154
- package/sidenav/Sidenav.stories.tsx +165 -63
- package/sidenav/Sidenav.test.js +3 -10
- package/{layout → sidenav}/SidenavContext.d.ts +1 -1
- package/{layout → sidenav}/SidenavContext.js +3 -9
- package/sidenav/types.d.ts +31 -28
- package/slider/Slider.d.ts +2 -2
- package/slider/Slider.js +77 -134
- package/slider/Slider.test.js +108 -104
- package/slider/types.d.ts +7 -3
- package/spinner/Spinner.js +31 -75
- package/spinner/{Spinner.stories.jsx → Spinner.stories.tsx} +53 -27
- package/spinner/Spinner.test.js +26 -35
- package/spinner/types.d.ts +3 -3
- package/status-light/StatusLight.d.ts +4 -0
- package/status-light/StatusLight.js +51 -0
- package/status-light/StatusLight.stories.tsx +74 -0
- package/status-light/StatusLight.test.js +25 -0
- package/status-light/types.d.ts +17 -0
- package/status-light/types.js +5 -0
- package/switch/Switch.d.ts +3 -3
- package/switch/Switch.js +56 -103
- package/switch/Switch.stories.tsx +33 -34
- package/switch/Switch.test.js +52 -97
- package/switch/types.d.ts +8 -3
- package/table/DropdownTheme.js +62 -0
- package/table/Table.d.ts +6 -2
- package/table/Table.js +87 -35
- package/table/Table.stories.tsx +658 -0
- package/table/Table.test.js +95 -8
- package/table/types.d.ts +48 -6
- package/tabs/Tab.js +26 -45
- package/tabs/Tabs.js +62 -145
- package/tabs/Tabs.stories.tsx +46 -6
- package/tabs/Tabs.test.js +66 -123
- package/tabs/types.d.ts +19 -19
- package/tag/Tag.js +28 -60
- package/tag/Tag.stories.tsx +14 -1
- package/tag/Tag.test.js +20 -31
- package/tag/types.d.ts +7 -7
- package/text-input/Icons.d.ts +5 -5
- package/text-input/Icons.js +1 -5
- package/text-input/Suggestion.js +35 -25
- package/text-input/Suggestions.d.ts +1 -1
- package/text-input/Suggestions.js +15 -65
- package/text-input/TextInput.js +220 -328
- package/text-input/TextInput.stories.tsx +139 -155
- package/text-input/TextInput.test.js +1389 -1347
- package/text-input/types.d.ts +25 -17
- package/textarea/Textarea.js +70 -113
- package/textarea/Textarea.stories.tsx +174 -0
- package/textarea/Textarea.test.js +152 -183
- package/textarea/types.d.ts +9 -5
- package/toggle-group/ToggleGroup.d.ts +2 -2
- package/toggle-group/ToggleGroup.js +92 -106
- package/toggle-group/ToggleGroup.stories.tsx +49 -4
- package/toggle-group/ToggleGroup.test.js +69 -88
- package/toggle-group/types.d.ts +26 -17
- package/typography/Typography.d.ts +2 -2
- package/typography/Typography.js +15 -123
- package/typography/Typography.stories.tsx +1 -1
- package/typography/types.d.ts +1 -1
- package/useTheme.d.ts +1147 -1
- package/useTheme.js +2 -9
- package/useTranslatedLabels.d.ts +84 -1
- package/useTranslatedLabels.js +1 -7
- package/utils/BaseTypography.d.ts +21 -0
- package/utils/BaseTypography.js +94 -0
- package/utils/FocusLock.d.ts +13 -0
- package/utils/FocusLock.js +124 -0
- package/wizard/Wizard.js +16 -51
- package/wizard/Wizard.stories.tsx +20 -0
- package/wizard/Wizard.test.js +54 -81
- package/wizard/types.d.ts +9 -10
- package/card/ice-cream.jpg +0 -0
- package/common/OpenSans.css +0 -81
- package/common/RequiredComponent.js +0 -32
- package/common/fonts/OpenSans-Bold.ttf +0 -0
- package/common/fonts/OpenSans-BoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBold.ttf +0 -0
- package/common/fonts/OpenSans-ExtraBoldItalic.ttf +0 -0
- package/common/fonts/OpenSans-Italic.ttf +0 -0
- package/common/fonts/OpenSans-Light.ttf +0 -0
- package/common/fonts/OpenSans-LightItalic.ttf +0 -0
- package/common/fonts/OpenSans-Regular.ttf +0 -0
- package/common/fonts/OpenSans-SemiBold.ttf +0 -0
- package/common/fonts/OpenSans-SemiBoldItalic.ttf +0 -0
- package/number-input/numberInputContextTypes.d.ts +0 -19
- package/resultsetTable/ResultsetTable.d.ts +0 -4
- package/resultsetTable/ResultsetTable.js +0 -254
- package/slider/Slider.stories.tsx +0 -183
- package/table/Table.stories.jsx +0 -277
- package/tabs-nav/NavTabs.d.ts +0 -8
- package/tabs-nav/Tab.js +0 -130
- package/textarea/Textarea.stories.jsx +0 -157
- /package/{resultsetTable → action-icon}/types.js +0 -0
- /package/{tabs-nav → container}/types.js +0 -0
- /package/{number-input/numberInputContextTypes.js → contextual-menu/types.js} +0 -0
- /package/{tabs-nav → nav-tabs}/Tab.d.ts +0 -0
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
4
|
+
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
|
5
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
5
6
|
var _react = _interopRequireDefault(require("react"));
|
|
6
|
-
|
|
7
7
|
var _react2 = require("@testing-library/react");
|
|
8
|
-
|
|
9
8
|
var _userEvent = _interopRequireDefault(require("@testing-library/user-event"));
|
|
10
|
-
|
|
11
9
|
var _RadioGroup = _interopRequireDefault(require("./RadioGroup.tsx"));
|
|
12
|
-
|
|
13
10
|
var options = [{
|
|
14
11
|
label: "Option 01",
|
|
15
12
|
value: "1"
|
|
@@ -52,15 +49,14 @@ var singleDisabledOptions = [{
|
|
|
52
49
|
describe("Radio Group component tests", function () {
|
|
53
50
|
test("Initial render has correct aria attributes and tabIndex", function () {
|
|
54
51
|
var _render = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
52
|
+
label: "test-radioGroup-label",
|
|
53
|
+
options: options,
|
|
54
|
+
error: ""
|
|
55
|
+
})),
|
|
56
|
+
getByRole = _render.getByRole,
|
|
57
|
+
getAllByRole = _render.getAllByRole,
|
|
58
|
+
getByText = _render.getByText,
|
|
59
|
+
container = _render.container;
|
|
64
60
|
var radioGroup = getByRole("radiogroup");
|
|
65
61
|
var radios = getAllByRole("radio");
|
|
66
62
|
var errorId = "error-".concat(getByText("test-radioGroup-label").id.replace("label-", ""));
|
|
@@ -73,7 +69,7 @@ describe("Radio Group component tests", function () {
|
|
|
73
69
|
expect(error.getAttribute("aria-live")).toBe("off");
|
|
74
70
|
radios.forEach(function (radio, index) {
|
|
75
71
|
// if no option was previously selected, first option is the focusable one
|
|
76
|
-
index === 0
|
|
72
|
+
if (index === 0) expect(radio.tabIndex).toBe(0);else expect(radio.tabIndex).toBe(-1);
|
|
77
73
|
expect(radio.getAttribute("aria-checked")).toBe("false");
|
|
78
74
|
expect(radio.getAttribute("aria-disabled")).toBe("false");
|
|
79
75
|
expect(radio.getAttribute("aria-labelledby")).toBe(getByText("Option 0".concat(index + 1)).id);
|
|
@@ -81,353 +77,429 @@ describe("Radio Group component tests", function () {
|
|
|
81
77
|
});
|
|
82
78
|
test("aria-orientation attribute changes depending on stacking prop value", function () {
|
|
83
79
|
var _render2 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
80
|
+
label: "test-radioGroup-label",
|
|
81
|
+
options: options,
|
|
82
|
+
stacking: "row"
|
|
83
|
+
})),
|
|
84
|
+
getByRole = _render2.getByRole;
|
|
90
85
|
var radioGroup = getByRole("radiogroup");
|
|
91
86
|
expect(radioGroup.getAttribute("aria-orientation")).toBe("horizontal");
|
|
92
87
|
});
|
|
88
|
+
test("Sends its value when submitted", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee() {
|
|
89
|
+
var handlerOnSubmit, _render3, getByText, getByRole, getAllByRole, radioGroup, submit;
|
|
90
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
|
91
|
+
while (1) switch (_context.prev = _context.next) {
|
|
92
|
+
case 0:
|
|
93
|
+
handlerOnSubmit = jest.fn(function (e) {
|
|
94
|
+
e.preventDefault();
|
|
95
|
+
var formData = new FormData(e.target);
|
|
96
|
+
var formProps = Object.fromEntries(formData);
|
|
97
|
+
expect(formProps).toStrictEqual({
|
|
98
|
+
radiogroup: "5"
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
_render3 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement("form", {
|
|
102
|
+
onSubmit: handlerOnSubmit
|
|
103
|
+
}, /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
104
|
+
name: "radiogroup",
|
|
105
|
+
label: "test-radio-group-label",
|
|
106
|
+
options: options
|
|
107
|
+
}), /*#__PURE__*/_react["default"].createElement("button", {
|
|
108
|
+
type: "submit"
|
|
109
|
+
}, "Submit"))), getByText = _render3.getByText, getByRole = _render3.getByRole, getAllByRole = _render3.getAllByRole;
|
|
110
|
+
radioGroup = getByRole("radiogroup");
|
|
111
|
+
submit = getByText("Submit");
|
|
112
|
+
_context.next = 6;
|
|
113
|
+
return _userEvent["default"].click(radioGroup);
|
|
114
|
+
case 6:
|
|
115
|
+
_context.next = 8;
|
|
116
|
+
return _userEvent["default"].click(getAllByRole("radio")[4]);
|
|
117
|
+
case 8:
|
|
118
|
+
_context.next = 10;
|
|
119
|
+
return _userEvent["default"].click(submit);
|
|
120
|
+
case 10:
|
|
121
|
+
case "end":
|
|
122
|
+
return _context.stop();
|
|
123
|
+
}
|
|
124
|
+
}, _callee);
|
|
125
|
+
})));
|
|
93
126
|
test("Disabled state renders with correct aria attribute, correct tabIndex values and it is not focusable by keyboard", function () {
|
|
94
|
-
var
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
127
|
+
var _render4 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
128
|
+
label: "test-radioGroup-label",
|
|
129
|
+
options: options,
|
|
130
|
+
disabled: true
|
|
131
|
+
})),
|
|
132
|
+
getByRole = _render4.getByRole,
|
|
133
|
+
getAllByRole = _render4.getAllByRole;
|
|
102
134
|
var radioGroup = getByRole("radiogroup");
|
|
103
135
|
var radios = getAllByRole("radio");
|
|
104
136
|
expect(radioGroup.getAttribute("aria-disabled")).toBe("true");
|
|
105
137
|
radios.forEach(function (radio) {
|
|
106
138
|
expect(radio.tabIndex).toBe(-1);
|
|
107
139
|
});
|
|
108
|
-
|
|
109
140
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
110
141
|
key: " ",
|
|
111
142
|
code: "Space",
|
|
112
143
|
keyCode: 13,
|
|
113
144
|
charCode: 13
|
|
114
145
|
});
|
|
115
|
-
|
|
116
146
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
117
147
|
key: "ArrowLeft",
|
|
118
148
|
code: "ArrowLeft",
|
|
119
149
|
keyCode: 37,
|
|
120
150
|
charCode: 37
|
|
121
151
|
});
|
|
122
|
-
|
|
123
152
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
124
153
|
key: "ArrowDown",
|
|
125
154
|
code: "ArrowDown",
|
|
126
155
|
keyCode: 40,
|
|
127
156
|
charCode: 40
|
|
128
157
|
});
|
|
129
|
-
|
|
130
158
|
radios.forEach(function (radio) {
|
|
131
159
|
expect(radio.tabIndex).toBe(-1);
|
|
132
160
|
});
|
|
133
161
|
});
|
|
134
162
|
test("Disabled option renders with correct aria attribute, correct tabIndex value and it is not focusable by keyboard (focus 'jumps' the disabled option)", function () {
|
|
135
|
-
var
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
163
|
+
var _render5 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
164
|
+
name: "test",
|
|
165
|
+
label: "test-radioGroup-label",
|
|
166
|
+
options: singleDisabledOptions
|
|
167
|
+
})),
|
|
168
|
+
getByRole = _render5.getByRole,
|
|
169
|
+
getAllByRole = _render5.getAllByRole;
|
|
143
170
|
var radioGroup = getByRole("radiogroup");
|
|
144
171
|
var radios = getAllByRole("radio");
|
|
145
172
|
expect(radios[2].getAttribute("aria-disabled")).toBe("true");
|
|
146
173
|
expect(radios[0].tabIndex).toBe(0);
|
|
147
174
|
expect(radios[1].tabIndex).toBe(-1);
|
|
148
175
|
expect(radios[2].tabIndex).toBe(-1);
|
|
149
|
-
|
|
150
176
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
151
177
|
key: "ArrowDown",
|
|
152
178
|
code: "ArrowDown",
|
|
153
179
|
keyCode: 40,
|
|
154
180
|
charCode: 40
|
|
155
181
|
});
|
|
156
|
-
|
|
157
182
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
158
183
|
key: "ArrowDown",
|
|
159
184
|
code: "ArrowDown",
|
|
160
185
|
keyCode: 40,
|
|
161
186
|
charCode: 40
|
|
162
187
|
});
|
|
163
|
-
|
|
164
188
|
expect(radios[0].tabIndex).toBe(0);
|
|
165
189
|
expect(radios[1].tabIndex).toBe(-1);
|
|
166
190
|
expect(radios[2].tabIndex).toBe(-1);
|
|
167
191
|
});
|
|
192
|
+
test("Disabled radio group doesn't send its value when submitted", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee2() {
|
|
193
|
+
var handlerOnSubmit, _render6, getByText, submit;
|
|
194
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
|
195
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
196
|
+
case 0:
|
|
197
|
+
handlerOnSubmit = jest.fn(function (e) {
|
|
198
|
+
e.preventDefault();
|
|
199
|
+
var formData = new FormData(e.target);
|
|
200
|
+
var formProps = Object.fromEntries(formData);
|
|
201
|
+
expect(formProps).toStrictEqual({});
|
|
202
|
+
});
|
|
203
|
+
_render6 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement("form", {
|
|
204
|
+
onSubmit: handlerOnSubmit
|
|
205
|
+
}, /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
206
|
+
name: "radiogroup",
|
|
207
|
+
defaultValue: "1",
|
|
208
|
+
disabled: true,
|
|
209
|
+
label: "test-radio-group-label",
|
|
210
|
+
options: options
|
|
211
|
+
}), /*#__PURE__*/_react["default"].createElement("button", {
|
|
212
|
+
type: "submit"
|
|
213
|
+
}, "Submit"))), getByText = _render6.getByText;
|
|
214
|
+
submit = getByText("Submit");
|
|
215
|
+
_context2.next = 5;
|
|
216
|
+
return _userEvent["default"].click(submit);
|
|
217
|
+
case 5:
|
|
218
|
+
case "end":
|
|
219
|
+
return _context2.stop();
|
|
220
|
+
}
|
|
221
|
+
}, _callee2);
|
|
222
|
+
})));
|
|
168
223
|
test("Error state renders with correct aria attributes", function () {
|
|
169
|
-
var
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
224
|
+
var _render7 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
225
|
+
label: "test-radioGroup-label",
|
|
226
|
+
options: options,
|
|
227
|
+
error: "Error message"
|
|
228
|
+
})),
|
|
229
|
+
getByRole = _render7.getByRole,
|
|
230
|
+
getByText = _render7.getByText;
|
|
177
231
|
var radioGroup = getByRole("radiogroup");
|
|
178
232
|
var errorMessage = getByText("Error message");
|
|
179
233
|
expect(radioGroup.getAttribute("aria-errormessage")).toBe(errorMessage.id);
|
|
180
234
|
expect(radioGroup.getAttribute("aria-invalid")).toBe("true");
|
|
181
235
|
expect(errorMessage.getAttribute("aria-live")).toBe("assertive");
|
|
182
236
|
});
|
|
183
|
-
test("Radio group with required constraint and 'undefined' as value, sends an error", function () {
|
|
184
|
-
var onChange
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
237
|
+
test("Radio group with required constraint and 'undefined' as value, sends an error", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee3() {
|
|
238
|
+
var onChange, onBlur, _render8, getByRole, getAllByRole, radioGroup;
|
|
239
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
|
240
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
241
|
+
case 0:
|
|
242
|
+
onChange = jest.fn();
|
|
243
|
+
onBlur = jest.fn();
|
|
244
|
+
_render8 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
245
|
+
label: "test-radioGroup-label",
|
|
246
|
+
options: options,
|
|
247
|
+
onChange: onChange,
|
|
248
|
+
onBlur: onBlur
|
|
249
|
+
})), getByRole = _render8.getByRole, getAllByRole = _render8.getAllByRole;
|
|
250
|
+
radioGroup = getByRole("radiogroup");
|
|
251
|
+
expect(radioGroup.getAttribute("aria-required")).toBe("true");
|
|
252
|
+
_react2.fireEvent.blur(radioGroup);
|
|
253
|
+
expect(onBlur).toHaveBeenCalledWith({
|
|
254
|
+
error: "This field is required. Please, choose an option."
|
|
255
|
+
});
|
|
256
|
+
_context3.next = 9;
|
|
257
|
+
return _userEvent["default"].click(radioGroup);
|
|
258
|
+
case 9:
|
|
259
|
+
_context3.next = 11;
|
|
260
|
+
return _userEvent["default"].click(getAllByRole("radio")[0]);
|
|
261
|
+
case 11:
|
|
262
|
+
expect(onChange).toHaveBeenCalledWith("1");
|
|
263
|
+
_react2.fireEvent.blur(radioGroup);
|
|
264
|
+
expect(onBlur).toHaveBeenCalledWith({
|
|
265
|
+
value: "1"
|
|
266
|
+
});
|
|
267
|
+
case 14:
|
|
268
|
+
case "end":
|
|
269
|
+
return _context3.stop();
|
|
270
|
+
}
|
|
271
|
+
}, _callee3);
|
|
272
|
+
})));
|
|
273
|
+
test("Radio group with required constraint and empty string as value, sends an error", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee4() {
|
|
274
|
+
var onChange, onBlur, _render9, getByRole, getAllByRole, radioGroup;
|
|
275
|
+
return _regenerator["default"].wrap(function _callee4$(_context4) {
|
|
276
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
277
|
+
case 0:
|
|
278
|
+
onChange = jest.fn();
|
|
279
|
+
onBlur = jest.fn();
|
|
280
|
+
_render9 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
281
|
+
label: "test-radioGroup-label",
|
|
282
|
+
value: "",
|
|
283
|
+
options: options,
|
|
284
|
+
onChange: onChange,
|
|
285
|
+
onBlur: onBlur
|
|
286
|
+
})), getByRole = _render9.getByRole, getAllByRole = _render9.getAllByRole;
|
|
287
|
+
radioGroup = getByRole("radiogroup");
|
|
288
|
+
expect(radioGroup.getAttribute("aria-required")).toBe("true");
|
|
289
|
+
_react2.fireEvent.blur(radioGroup);
|
|
290
|
+
expect(onBlur).toHaveBeenCalledWith({
|
|
291
|
+
value: "",
|
|
292
|
+
error: "This field is required. Please, choose an option."
|
|
293
|
+
});
|
|
294
|
+
_context4.next = 9;
|
|
295
|
+
return _userEvent["default"].click(getAllByRole("radio")[0]);
|
|
296
|
+
case 9:
|
|
297
|
+
expect(onChange).toHaveBeenCalledWith("1");
|
|
298
|
+
case 10:
|
|
299
|
+
case "end":
|
|
300
|
+
return _context4.stop();
|
|
301
|
+
}
|
|
302
|
+
}, _callee4);
|
|
303
|
+
})));
|
|
245
304
|
test("The 'defaultValue' gives the radio group an initial value when it is uncontrolled", function () {
|
|
246
305
|
var onChange = jest.fn();
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
container = _render8.container;
|
|
258
|
-
|
|
306
|
+
var _render10 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
307
|
+
defaultValue: "2",
|
|
308
|
+
name: "test",
|
|
309
|
+
label: "test-radio-group-label",
|
|
310
|
+
helperText: "test-radio-group-helper-text",
|
|
311
|
+
options: options,
|
|
312
|
+
onChange: onChange
|
|
313
|
+
})),
|
|
314
|
+
getAllByRole = _render10.getAllByRole,
|
|
315
|
+
container = _render10.container;
|
|
259
316
|
var radio = getAllByRole("radio")[1];
|
|
260
317
|
var submitInput = container.querySelector("input[name=\"test\"]");
|
|
261
318
|
expect(radio.tabIndex).toBe(0);
|
|
262
319
|
expect(radio.getAttribute("aria-checked")).toBe("true");
|
|
263
320
|
expect(submitInput.value).toBe("2");
|
|
264
321
|
});
|
|
265
|
-
test("Optional radio group conditions: onBlur event doesn't send an error when no radio was checked, has correct aria attributes, custom label and its value is the empty string", function () {
|
|
266
|
-
var onChange
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
322
|
+
test("Optional radio group conditions: onBlur event doesn't send an error when no radio was checked, has correct aria attributes, custom label and its value is the empty string", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee5() {
|
|
323
|
+
var onChange, onBlur, _render11, getByRole, getByText, container, radioGroup, optionalLabel, submitInput;
|
|
324
|
+
return _regenerator["default"].wrap(function _callee5$(_context5) {
|
|
325
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
326
|
+
case 0:
|
|
327
|
+
onChange = jest.fn();
|
|
328
|
+
onBlur = jest.fn();
|
|
329
|
+
_render11 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
330
|
+
name: "test",
|
|
331
|
+
label: "test-radio-group-label",
|
|
332
|
+
helperText: "test-radio-group-helper-text",
|
|
333
|
+
options: options,
|
|
334
|
+
onChange: onChange,
|
|
335
|
+
onBlur: onBlur,
|
|
336
|
+
optional: true,
|
|
337
|
+
optionalItemLabel: "No selection"
|
|
338
|
+
})), getByRole = _render11.getByRole, getByText = _render11.getByText, container = _render11.container;
|
|
339
|
+
radioGroup = getByRole("radiogroup");
|
|
340
|
+
expect(radioGroup.getAttribute("aria-required")).toBe("false");
|
|
341
|
+
_react2.fireEvent.blur(radioGroup);
|
|
342
|
+
expect(onBlur).toHaveBeenCalledWith({});
|
|
343
|
+
expect(radioGroup.getAttribute("aria-invalid")).toBe("false");
|
|
344
|
+
optionalLabel = getByText("No selection");
|
|
345
|
+
submitInput = container.querySelector("input[name=\"test\"]");
|
|
346
|
+
_context5.next = 12;
|
|
347
|
+
return _userEvent["default"].click(optionalLabel);
|
|
348
|
+
case 12:
|
|
349
|
+
expect(onChange).toHaveBeenCalledWith("");
|
|
350
|
+
expect(submitInput.value).toBe("");
|
|
351
|
+
case 14:
|
|
352
|
+
case "end":
|
|
353
|
+
return _context5.stop();
|
|
354
|
+
}
|
|
355
|
+
}, _callee5);
|
|
356
|
+
})));
|
|
357
|
+
test("Controlled radio group", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee6() {
|
|
358
|
+
var onChange, onBlur, _render12, getByRole, getAllByRole, container, radioGroup, radios, submitInput;
|
|
359
|
+
return _regenerator["default"].wrap(function _callee6$(_context6) {
|
|
360
|
+
while (1) switch (_context6.prev = _context6.next) {
|
|
361
|
+
case 0:
|
|
362
|
+
onChange = jest.fn();
|
|
363
|
+
onBlur = jest.fn();
|
|
364
|
+
_render12 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
365
|
+
name: "test",
|
|
366
|
+
value: "2",
|
|
367
|
+
label: "test-radio-group-label",
|
|
368
|
+
helperText: "test-radio-group-helper-text",
|
|
369
|
+
options: options,
|
|
370
|
+
onChange: onChange,
|
|
371
|
+
onBlur: onBlur
|
|
372
|
+
})), getByRole = _render12.getByRole, getAllByRole = _render12.getAllByRole, container = _render12.container;
|
|
373
|
+
radioGroup = getByRole("radiogroup");
|
|
374
|
+
radios = getAllByRole("radio");
|
|
375
|
+
submitInput = container.querySelector("input[name=\"test\"]");
|
|
376
|
+
expect(submitInput.value).toBe("2");
|
|
377
|
+
expect(radios[1].tabIndex).toBe(0);
|
|
378
|
+
expect(radios[1].getAttribute("aria-checked")).toBe("true");
|
|
379
|
+
_context6.next = 11;
|
|
380
|
+
return _userEvent["default"].click(radios[6]);
|
|
381
|
+
case 11:
|
|
382
|
+
expect(onChange).toHaveBeenCalledWith("7");
|
|
383
|
+
_react2.fireEvent.blur(radioGroup);
|
|
384
|
+
expect(onBlur).toHaveBeenCalledWith({
|
|
385
|
+
value: "2"
|
|
386
|
+
});
|
|
387
|
+
case 14:
|
|
388
|
+
case "end":
|
|
389
|
+
return _context6.stop();
|
|
390
|
+
}
|
|
391
|
+
}, _callee6);
|
|
392
|
+
})));
|
|
393
|
+
test("Select an option by clicking on its label", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee7() {
|
|
394
|
+
var onChange, _render13, getByText, getAllByRole, container, radioLabel, checkedRadio, submitInput;
|
|
395
|
+
return _regenerator["default"].wrap(function _callee7$(_context7) {
|
|
396
|
+
while (1) switch (_context7.prev = _context7.next) {
|
|
397
|
+
case 0:
|
|
398
|
+
onChange = jest.fn();
|
|
399
|
+
_render13 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
400
|
+
name: "test",
|
|
401
|
+
label: "test-radio-group-label",
|
|
402
|
+
helperText: "test-radio-group-helper-text",
|
|
403
|
+
options: options,
|
|
404
|
+
onChange: onChange
|
|
405
|
+
})), getByText = _render13.getByText, getAllByRole = _render13.getAllByRole, container = _render13.container;
|
|
406
|
+
radioLabel = getByText("Option 09");
|
|
407
|
+
checkedRadio = getAllByRole("radio")[8];
|
|
408
|
+
submitInput = container.querySelector("input[name=\"test\"]");
|
|
409
|
+
expect(checkedRadio.tabIndex).toBe(-1);
|
|
410
|
+
_context7.next = 8;
|
|
411
|
+
return _userEvent["default"].click(radioLabel);
|
|
412
|
+
case 8:
|
|
413
|
+
expect(onChange).toHaveBeenCalledWith("9");
|
|
414
|
+
expect(checkedRadio.getAttribute("aria-checked")).toBe("true");
|
|
415
|
+
expect(checkedRadio.tabIndex).toBe(0);
|
|
416
|
+
expect(document.activeElement).toEqual(checkedRadio);
|
|
417
|
+
expect(submitInput.value).toBe("9");
|
|
418
|
+
case 13:
|
|
419
|
+
case "end":
|
|
420
|
+
return _context7.stop();
|
|
421
|
+
}
|
|
422
|
+
}, _callee7);
|
|
423
|
+
})));
|
|
424
|
+
test("Select an option by clicking on its radio input", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee8() {
|
|
425
|
+
var onChange, _render14, getAllByRole, container, checkedRadio, submitInput;
|
|
426
|
+
return _regenerator["default"].wrap(function _callee8$(_context8) {
|
|
427
|
+
while (1) switch (_context8.prev = _context8.next) {
|
|
428
|
+
case 0:
|
|
429
|
+
onChange = jest.fn();
|
|
430
|
+
_render14 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
431
|
+
name: "test",
|
|
432
|
+
label: "test-radio-group-label",
|
|
433
|
+
helperText: "test-radio-group-helper-text",
|
|
434
|
+
options: options,
|
|
435
|
+
onChange: onChange
|
|
436
|
+
})), getAllByRole = _render14.getAllByRole, container = _render14.container;
|
|
437
|
+
checkedRadio = getAllByRole("radio")[6];
|
|
438
|
+
submitInput = container.querySelector("input[name=\"test\"]");
|
|
439
|
+
expect(checkedRadio.tabIndex).toBe(-1);
|
|
440
|
+
_context8.next = 7;
|
|
441
|
+
return _userEvent["default"].click(checkedRadio);
|
|
442
|
+
case 7:
|
|
443
|
+
expect(onChange).toHaveBeenCalledWith("7");
|
|
444
|
+
expect(checkedRadio.getAttribute("aria-checked")).toBe("true");
|
|
445
|
+
expect(checkedRadio.tabIndex).toBe(0);
|
|
446
|
+
expect(document.activeElement).toEqual(checkedRadio);
|
|
447
|
+
expect(submitInput.value).toBe("7");
|
|
448
|
+
case 12:
|
|
449
|
+
case "end":
|
|
450
|
+
return _context8.stop();
|
|
451
|
+
}
|
|
452
|
+
}, _callee8);
|
|
453
|
+
})));
|
|
454
|
+
test("Select an option that is already checked does not call onChange event but gives the focus", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee9() {
|
|
455
|
+
var onChange, _render15, getAllByRole, checkedRadio;
|
|
456
|
+
return _regenerator["default"].wrap(function _callee9$(_context9) {
|
|
457
|
+
while (1) switch (_context9.prev = _context9.next) {
|
|
458
|
+
case 0:
|
|
459
|
+
onChange = jest.fn();
|
|
460
|
+
_render15 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
461
|
+
defaultValue: "2",
|
|
462
|
+
name: "test",
|
|
463
|
+
label: "test-radio-group-label",
|
|
464
|
+
helperText: "test-radio-group-helper-text",
|
|
465
|
+
options: options,
|
|
466
|
+
onChange: onChange
|
|
467
|
+
})), getAllByRole = _render15.getAllByRole;
|
|
468
|
+
checkedRadio = getAllByRole("radio")[1];
|
|
469
|
+
expect(checkedRadio.tabIndex).toBe(0);
|
|
470
|
+
expect(checkedRadio.getAttribute("aria-checked")).toBe("true");
|
|
471
|
+
_context9.next = 7;
|
|
472
|
+
return _userEvent["default"].click(checkedRadio);
|
|
473
|
+
case 7:
|
|
474
|
+
expect(onChange).not.toHaveBeenCalled();
|
|
475
|
+
expect(document.activeElement).toEqual(checkedRadio);
|
|
476
|
+
case 9:
|
|
477
|
+
case "end":
|
|
478
|
+
return _context9.stop();
|
|
479
|
+
}
|
|
480
|
+
}, _callee9);
|
|
481
|
+
})));
|
|
406
482
|
test("The 'space' key checks the current focused option if anyone is checked", function () {
|
|
407
483
|
var onChange = jest.fn();
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
container = _render14.container;
|
|
419
|
-
|
|
484
|
+
var _render16 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
485
|
+
name: "test",
|
|
486
|
+
label: "test-radio-group-label",
|
|
487
|
+
helperText: "test-radio-group-helper-text",
|
|
488
|
+
options: options,
|
|
489
|
+
onChange: onChange
|
|
490
|
+
})),
|
|
491
|
+
getByRole = _render16.getByRole,
|
|
492
|
+
getAllByRole = _render16.getAllByRole,
|
|
493
|
+
container = _render16.container;
|
|
420
494
|
var radioGroup = getByRole("radiogroup");
|
|
421
495
|
var checkedRadio = getAllByRole("radio")[0];
|
|
422
496
|
var submitInput = container.querySelector("input[name=\"test\"]");
|
|
423
|
-
|
|
424
497
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
425
498
|
key: " ",
|
|
426
499
|
code: "Space",
|
|
427
500
|
keyCode: 32,
|
|
428
501
|
charCode: 32
|
|
429
502
|
});
|
|
430
|
-
|
|
431
503
|
expect(onChange).toHaveBeenCalledWith("1");
|
|
432
504
|
expect(checkedRadio.getAttribute("aria-checked")).toBe("true");
|
|
433
505
|
expect(checkedRadio.tabIndex).toBe(0);
|
|
@@ -436,39 +508,33 @@ describe("Radio Group component tests", function () {
|
|
|
436
508
|
test("When the radio group gains the focus by keyboard ('tab' key), it goes to the first option (if no one was previously selected), without selecting it", function () {
|
|
437
509
|
var onChange = jest.fn();
|
|
438
510
|
var onBlur = jest.fn();
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
container = _render15.container;
|
|
451
|
-
|
|
511
|
+
var _render17 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
512
|
+
name: "test",
|
|
513
|
+
label: "test-radio-group-label",
|
|
514
|
+
helperText: "test-radio-group-helper-text",
|
|
515
|
+
options: options,
|
|
516
|
+
onChange: onChange,
|
|
517
|
+
onBlur: onBlur
|
|
518
|
+
})),
|
|
519
|
+
getByRole = _render17.getByRole,
|
|
520
|
+
getAllByRole = _render17.getAllByRole,
|
|
521
|
+
container = _render17.container;
|
|
452
522
|
var radioGroup = getByRole("radiogroup");
|
|
453
523
|
var radios = getAllByRole("radio");
|
|
454
524
|
var submitInput = container.querySelector("input[name=\"test\"]");
|
|
455
525
|
var checkedRadio = getAllByRole("radio")[0];
|
|
456
|
-
|
|
457
526
|
_userEvent["default"].tab();
|
|
458
|
-
|
|
459
527
|
expect(onChange).not.toHaveBeenCalled();
|
|
460
528
|
expect(submitInput.value).toBe("");
|
|
461
529
|
expect(checkedRadio.tabIndex).toBe(0);
|
|
462
530
|
expect(checkedRadio.getAttribute("aria-checked")).toBe("false");
|
|
463
531
|
expect(document.activeElement).toEqual(checkedRadio);
|
|
464
|
-
|
|
465
532
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
466
533
|
key: "ArrowRight",
|
|
467
534
|
code: "ArrowRight",
|
|
468
535
|
keyCode: 39,
|
|
469
536
|
charCode: 39
|
|
470
537
|
});
|
|
471
|
-
|
|
472
538
|
expect(onBlur).not.toHaveBeenCalled();
|
|
473
539
|
expect(onChange).toHaveBeenCalledTimes(1);
|
|
474
540
|
expect(radios[1].getAttribute("aria-checked")).toBe("true");
|
|
@@ -479,45 +545,39 @@ describe("Radio Group component tests", function () {
|
|
|
479
545
|
test("The 'arrowDown' and 'arrowRight' keys move the selection to the next radio. When the last radio is reached, moves the selection to the first one", function () {
|
|
480
546
|
var onChange = jest.fn();
|
|
481
547
|
var onBlur = jest.fn();
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
container = _render16.container;
|
|
495
|
-
|
|
548
|
+
var _render18 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
549
|
+
defaultValue: "8",
|
|
550
|
+
name: "test",
|
|
551
|
+
label: "test-radio-group-label",
|
|
552
|
+
helperText: "test-radio-group-helper-text",
|
|
553
|
+
options: options,
|
|
554
|
+
onChange: onChange,
|
|
555
|
+
onBlur: onBlur
|
|
556
|
+
})),
|
|
557
|
+
getByRole = _render18.getByRole,
|
|
558
|
+
getAllByRole = _render18.getAllByRole,
|
|
559
|
+
container = _render18.container;
|
|
496
560
|
var radioGroup = getByRole("radiogroup");
|
|
497
561
|
var radios = getAllByRole("radio");
|
|
498
562
|
var submitInput = container.querySelector("input[name=\"test\"]");
|
|
499
|
-
|
|
500
563
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
501
564
|
key: "ArrowDown",
|
|
502
565
|
code: "ArrowDown",
|
|
503
566
|
keyCode: 40,
|
|
504
567
|
charCode: 40
|
|
505
568
|
});
|
|
506
|
-
|
|
507
569
|
expect(onBlur).not.toHaveBeenCalled();
|
|
508
570
|
expect(onChange).toHaveBeenCalledTimes(1);
|
|
509
571
|
expect(radios[8].getAttribute("aria-checked")).toBe("true");
|
|
510
572
|
expect(document.activeElement).toEqual(radios[8]);
|
|
511
573
|
expect(radios[8].tabIndex).toBe(0);
|
|
512
574
|
expect(submitInput.value).toBe("9");
|
|
513
|
-
|
|
514
575
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
515
576
|
key: "ArrowRight",
|
|
516
577
|
code: "ArrowRight",
|
|
517
578
|
keyCode: 39,
|
|
518
579
|
charCode: 39
|
|
519
580
|
});
|
|
520
|
-
|
|
521
581
|
expect(onBlur).not.toHaveBeenCalled();
|
|
522
582
|
expect(onChange).toHaveBeenCalledTimes(2);
|
|
523
583
|
expect(radios[0].getAttribute("aria-checked")).toBe("true");
|
|
@@ -528,45 +588,39 @@ describe("Radio Group component tests", function () {
|
|
|
528
588
|
test("The 'arrowUp' and 'arrowLeft' keys move the selection to the previous radio. When the first radio is reached, moves the selection to the last one", function () {
|
|
529
589
|
var onChange = jest.fn();
|
|
530
590
|
var onBlur = jest.fn();
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
container = _render17.container;
|
|
544
|
-
|
|
591
|
+
var _render19 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
592
|
+
defaultValue: "2",
|
|
593
|
+
name: "test",
|
|
594
|
+
label: "test-radio-group-label",
|
|
595
|
+
helperText: "test-radio-group-helper-text",
|
|
596
|
+
options: options,
|
|
597
|
+
onChange: onChange,
|
|
598
|
+
onBlur: onBlur
|
|
599
|
+
})),
|
|
600
|
+
getByRole = _render19.getByRole,
|
|
601
|
+
getAllByRole = _render19.getAllByRole,
|
|
602
|
+
container = _render19.container;
|
|
545
603
|
var radioGroup = getByRole("radiogroup");
|
|
546
604
|
var radios = getAllByRole("radio");
|
|
547
605
|
var submitInput = container.querySelector("input[name=\"test\"]");
|
|
548
|
-
|
|
549
606
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
550
607
|
key: "ArrowUp",
|
|
551
608
|
code: "ArrowUp",
|
|
552
609
|
keyCode: 38,
|
|
553
610
|
charCode: 38
|
|
554
611
|
});
|
|
555
|
-
|
|
556
612
|
expect(onBlur).not.toHaveBeenCalled();
|
|
557
613
|
expect(onChange).toHaveBeenCalledTimes(1);
|
|
558
614
|
expect(radios[0].getAttribute("aria-checked")).toBe("true");
|
|
559
615
|
expect(document.activeElement).toEqual(radios[0]);
|
|
560
616
|
expect(radios[0].tabIndex).toBe(0);
|
|
561
617
|
expect(submitInput.value).toBe("1");
|
|
562
|
-
|
|
563
618
|
_react2.fireEvent.keyDown(radioGroup, {
|
|
564
619
|
key: "ArrowLeft",
|
|
565
620
|
code: "ArrowLeft",
|
|
566
621
|
keyCode: 37,
|
|
567
622
|
charCode: 37
|
|
568
623
|
});
|
|
569
|
-
|
|
570
624
|
expect(onBlur).not.toHaveBeenCalled();
|
|
571
625
|
expect(onChange).toHaveBeenCalledTimes(2);
|
|
572
626
|
expect(radios[8].getAttribute("aria-checked")).toBe("true");
|
|
@@ -574,92 +628,129 @@ describe("Radio Group component tests", function () {
|
|
|
574
628
|
expect(radios[8].tabIndex).toBe(0);
|
|
575
629
|
expect(submitInput.value).toBe("9");
|
|
576
630
|
});
|
|
577
|
-
test("Keyboard focus movement continues from the last radio input clicked", function () {
|
|
578
|
-
var onChange
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
var
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
631
|
+
test("Keyboard focus movement continues from the last radio input clicked", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10() {
|
|
632
|
+
var onChange, _render20, getByRole, getAllByRole, container, radioGroup, radios, submitInput;
|
|
633
|
+
return _regenerator["default"].wrap(function _callee10$(_context10) {
|
|
634
|
+
while (1) switch (_context10.prev = _context10.next) {
|
|
635
|
+
case 0:
|
|
636
|
+
onChange = jest.fn();
|
|
637
|
+
_render20 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
638
|
+
name: "test",
|
|
639
|
+
label: "test-radio-group-label",
|
|
640
|
+
helperText: "test-radio-group-helper-text",
|
|
641
|
+
options: options,
|
|
642
|
+
onChange: onChange
|
|
643
|
+
})), getByRole = _render20.getByRole, getAllByRole = _render20.getAllByRole, container = _render20.container;
|
|
644
|
+
radioGroup = getByRole("radiogroup");
|
|
645
|
+
radios = getAllByRole("radio");
|
|
646
|
+
submitInput = container.querySelector("input[name=\"test\"]");
|
|
647
|
+
_context10.next = 7;
|
|
648
|
+
return _userEvent["default"].click(radios[3]);
|
|
649
|
+
case 7:
|
|
650
|
+
_react2.fireEvent.keyDown(radioGroup, {
|
|
651
|
+
key: "ArrowDown",
|
|
652
|
+
code: "ArrowDown",
|
|
653
|
+
keyCode: 40,
|
|
654
|
+
charCode: 40
|
|
655
|
+
});
|
|
656
|
+
expect(onChange).toHaveBeenCalledWith("5");
|
|
657
|
+
expect(radios[4].getAttribute("aria-checked")).toBe("true");
|
|
658
|
+
expect(document.activeElement).toEqual(radios[4]);
|
|
659
|
+
expect(radios[4].tabIndex).toBe(0);
|
|
660
|
+
expect(submitInput.value).toBe("5");
|
|
661
|
+
_context10.next = 15;
|
|
662
|
+
return _userEvent["default"].click(radios[8]);
|
|
663
|
+
case 15:
|
|
664
|
+
_react2.fireEvent.keyDown(radioGroup, {
|
|
665
|
+
key: "ArrowLeft",
|
|
666
|
+
code: "ArrowLeft",
|
|
667
|
+
keyCode: 37,
|
|
668
|
+
charCode: 37
|
|
669
|
+
});
|
|
670
|
+
expect(onChange).toHaveBeenCalledWith("8");
|
|
671
|
+
expect(radios[7].getAttribute("aria-checked")).toBe("true");
|
|
672
|
+
expect(document.activeElement).toEqual(radios[7]);
|
|
673
|
+
expect(radios[7].tabIndex).toBe(0);
|
|
674
|
+
expect(submitInput.value).toBe("8");
|
|
675
|
+
case 21:
|
|
676
|
+
case "end":
|
|
677
|
+
return _context10.stop();
|
|
678
|
+
}
|
|
679
|
+
}, _callee10);
|
|
680
|
+
})));
|
|
681
|
+
test("Read-only radio group lets the user move the focus, but neither click nor keyboard press changes the value", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee11() {
|
|
682
|
+
var onChange, _render21, getByRole, getAllByRole, container, radioGroup, radios, submitInput;
|
|
683
|
+
return _regenerator["default"].wrap(function _callee11$(_context11) {
|
|
684
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
685
|
+
case 0:
|
|
686
|
+
onChange = jest.fn();
|
|
687
|
+
_render21 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
688
|
+
name: "test",
|
|
689
|
+
label: "test-radio-group-label",
|
|
690
|
+
helperText: "test-radio-group-helper-text",
|
|
691
|
+
options: options,
|
|
692
|
+
onChange: onChange,
|
|
693
|
+
readOnly: true
|
|
694
|
+
})), getByRole = _render21.getByRole, getAllByRole = _render21.getAllByRole, container = _render21.container;
|
|
695
|
+
radioGroup = getByRole("radiogroup");
|
|
696
|
+
radios = getAllByRole("radio");
|
|
697
|
+
submitInput = container.querySelector("input[name=\"test\"]");
|
|
698
|
+
_context11.next = 7;
|
|
699
|
+
return _userEvent["default"].click(radios[5]);
|
|
700
|
+
case 7:
|
|
701
|
+
expect(onChange).not.toHaveBeenCalled();
|
|
702
|
+
expect(radios[5].getAttribute("aria-checked")).toBe("false");
|
|
703
|
+
expect(document.activeElement).toEqual(radios[5]);
|
|
704
|
+
expect(radios[5].tabIndex).toBe(0);
|
|
705
|
+
expect(submitInput.value).toBe("");
|
|
706
|
+
_react2.fireEvent.keyDown(radioGroup, {
|
|
707
|
+
key: "ArrowUp",
|
|
708
|
+
code: "ArrowUp",
|
|
709
|
+
keyCode: 38,
|
|
710
|
+
charCode: 38
|
|
711
|
+
});
|
|
712
|
+
expect(onChange).not.toHaveBeenCalled();
|
|
713
|
+
expect(radios[4].getAttribute("aria-checked")).toBe("false");
|
|
714
|
+
expect(document.activeElement).toEqual(radios[4]);
|
|
715
|
+
expect(radios[4].tabIndex).toBe(0);
|
|
716
|
+
expect(submitInput.value).toBe("");
|
|
717
|
+
case 18:
|
|
718
|
+
case "end":
|
|
719
|
+
return _context11.stop();
|
|
720
|
+
}
|
|
721
|
+
}, _callee11);
|
|
722
|
+
})));
|
|
723
|
+
test("Read-only radio group sends its value on submit", /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee12() {
|
|
724
|
+
var handlerOnSubmit, _render22, getByText, submit;
|
|
725
|
+
return _regenerator["default"].wrap(function _callee12$(_context12) {
|
|
726
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
727
|
+
case 0:
|
|
728
|
+
handlerOnSubmit = jest.fn(function (e) {
|
|
729
|
+
e.preventDefault();
|
|
730
|
+
var formData = new FormData(e.target);
|
|
731
|
+
var formProps = Object.fromEntries(formData);
|
|
732
|
+
expect(formProps).toStrictEqual({
|
|
733
|
+
radiogroup: "data"
|
|
734
|
+
});
|
|
735
|
+
});
|
|
736
|
+
_render22 = (0, _react2.render)( /*#__PURE__*/_react["default"].createElement("form", {
|
|
737
|
+
onSubmit: handlerOnSubmit
|
|
738
|
+
}, /*#__PURE__*/_react["default"].createElement(_RadioGroup["default"], {
|
|
739
|
+
name: "radiogroup",
|
|
740
|
+
label: "test-radio-group-label",
|
|
741
|
+
value: "data",
|
|
742
|
+
options: options,
|
|
743
|
+
readOnly: true
|
|
744
|
+
}), /*#__PURE__*/_react["default"].createElement("button", {
|
|
745
|
+
type: "submit"
|
|
746
|
+
}, "Submit"))), getByText = _render22.getByText;
|
|
747
|
+
submit = getByText("Submit");
|
|
748
|
+
_context12.next = 5;
|
|
749
|
+
return _userEvent["default"].click(submit);
|
|
750
|
+
case 5:
|
|
751
|
+
case "end":
|
|
752
|
+
return _context12.stop();
|
|
753
|
+
}
|
|
754
|
+
}, _callee12);
|
|
755
|
+
})));
|
|
665
756
|
});
|