@kineticdata/react 5.1.2 → 6.0.0
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/assets/task/icons/drag-handle.svg +3 -0
- package/assets/task/icons/plus_small.svg +2 -4
- package/lib/apis/agent/adapters.js +16 -12
- package/lib/apis/agent/bridges.js +54 -41
- package/lib/apis/agent/handlers.js +51 -38
- package/lib/apis/core/activity.js +19 -11
- package/lib/apis/core/attributeDefinitions.js +54 -46
- package/lib/apis/core/attributeDefinitions.test.js +47 -55
- package/lib/apis/core/authentication.js +58 -63
- package/lib/apis/core/backgroundJobs.js +38 -30
- package/lib/apis/core/bridgeModelAttributeMappings.js +42 -34
- package/lib/apis/core/bridgeModelAttributes.js +47 -37
- package/lib/apis/core/bridgeModelMappings.js +42 -34
- package/lib/apis/core/bridgeModelQualificationMappings.js +42 -34
- package/lib/apis/core/bridgeModelQualifications.js +42 -34
- package/lib/apis/core/bridgeModels.js +56 -46
- package/lib/apis/core/bridgeModels.test.js +64 -80
- package/lib/apis/core/bridgedresources.js +64 -72
- package/lib/apis/core/bridgedresources.test.js +33 -30
- package/lib/apis/core/categories.js +59 -52
- package/lib/apis/core/categories.test.js +36 -33
- package/lib/apis/core/fileResources.js +41 -33
- package/lib/apis/core/filestores.js +42 -34
- package/lib/apis/core/formTypes.js +50 -44
- package/lib/apis/core/forms.js +53 -49
- package/lib/apis/core/forms.test.js +60 -74
- package/lib/apis/core/kapps.js +45 -39
- package/lib/apis/core/kapps.test.js +45 -52
- package/lib/apis/core/logs.js +20 -16
- package/lib/apis/core/memberships.js +23 -20
- package/lib/apis/core/meta.js +31 -19
- package/lib/apis/core/notices.js +17 -9
- package/lib/apis/core/oauthClients.js +49 -45
- package/lib/apis/core/platformComponents.js +73 -57
- package/lib/apis/core/platformItems.js +22 -13
- package/lib/apis/core/profile.js +28 -21
- package/lib/apis/core/profile.test.js +20 -17
- package/lib/apis/core/securityPolicyDefinitions.js +48 -41
- package/lib/apis/core/securityPolicyDefinitions.test.js +50 -60
- package/lib/apis/core/space.js +23 -16
- package/lib/apis/core/space.test.js +31 -38
- package/lib/apis/core/submissions.js +213 -186
- package/lib/apis/core/submissions.test.js +39 -36
- package/lib/apis/core/teams.js +51 -44
- package/lib/apis/core/teams.test.js +42 -39
- package/lib/apis/core/translations.js +123 -130
- package/lib/apis/core/translations.test.js +278 -368
- package/lib/apis/core/users.js +56 -49
- package/lib/apis/core/users.test.js +42 -39
- package/lib/apis/core/version.js +20 -11
- package/lib/apis/core/webApis.js +42 -34
- package/lib/apis/core/webhooks.js +48 -41
- package/lib/apis/core/webhooks.test.js +50 -60
- package/lib/apis/core/webhooksJobs.js +30 -26
- package/lib/apis/core/workflows.js +52 -44
- package/lib/apis/http.js +89 -80
- package/lib/apis/http.test.js +37 -38
- package/lib/apis/index.js +506 -50
- package/lib/apis/system/index.js +228 -211
- package/lib/apis/task/index.js +280 -227
- package/lib/components/agent/bridge/BridgeForm.js +50 -50
- package/lib/components/agent/bridge/BridgeTable.js +12 -8
- package/lib/components/agent/filestore/FilestoreForm.js +49 -48
- package/lib/components/agent/filestore/FilestoreTable.js +12 -8
- package/lib/components/agent/handler/AgentHandlerForm.js +24 -27
- package/lib/components/agent/handler/AgentHandlerTable.js +12 -8
- package/lib/components/common/AttributeSelect.js +15 -9
- package/lib/components/common/BridgeSelect.js +48 -43
- package/lib/components/common/ComponentConfigContext.js +9 -2
- package/lib/components/common/ContentEditable.js +36 -60
- package/lib/components/common/FormSelect.js +70 -58
- package/lib/components/common/NodeSelect.js +23 -19
- package/lib/components/common/Scroller.js +24 -23
- package/lib/components/common/StaticSelect.js +57 -50
- package/lib/components/common/TableInput.js +54 -57
- package/lib/components/common/TeamSelect.js +42 -39
- package/lib/components/common/Typeahead.js +121 -138
- package/lib/components/common/UserSelect.js +42 -41
- package/lib/components/common/authentication/AuthInterceptor.js +15 -19
- package/lib/components/common/authentication/AuthInterceptor.test.js +46 -64
- package/lib/components/common/authentication/AuthenticationContainer.js +350 -454
- package/lib/components/common/authentication/RequestInterceptor.js +16 -19
- package/lib/components/common/code_input/CodeInput.js +92 -122
- package/lib/components/common/code_input/draftHelpers.js +96 -90
- package/lib/components/common/code_input/languageHelpers.js +49 -47
- package/lib/components/common/code_input/languageHelpers.test.js +21 -16
- package/lib/components/core/CoreFormModal.js +26 -24
- package/lib/components/core/CoreModal.js +37 -31
- package/lib/components/core/attribute_definition/AttributeDefinitionForm.js +24 -23
- package/lib/components/core/attribute_definition/AttributeDefinitionTable.js +18 -15
- package/lib/components/core/bridge_model/BridgeModelForm.js +27 -37
- package/lib/components/core/bridge_model/BridgeModelTable.js +12 -8
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeForm.js +17 -16
- package/lib/components/core/bridge_model_attribute/BridgeModelAttributeTable.js +25 -21
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationForm.js +20 -20
- package/lib/components/core/bridge_model_qualification/BridgeModelQualificationTable.js +27 -22
- package/lib/components/core/category/CategoryForm.js +22 -22
- package/lib/components/core/category/CategoryTable.js +15 -10
- package/lib/components/core/core_form/CoreForm.js +209 -285
- package/lib/components/core/core_form/CoreForm.test.js +12 -10
- package/lib/components/core/core_form/defaults/index.js +52 -44
- package/lib/components/core/core_form/globals.js +14 -5
- package/lib/components/core/field_definition/FieldDefinitionForm.js +23 -21
- package/lib/components/core/field_definition/FieldDefinitionTable.js +15 -10
- package/lib/components/core/file_resource/FileResourceForm.js +38 -37
- package/lib/components/core/file_resource/FileResourceTable.js +16 -12
- package/lib/components/core/form/FormForm.js +56 -61
- package/lib/components/core/form/FormTable.js +25 -22
- package/lib/components/core/form_type/FormTypeForm.js +14 -13
- package/lib/components/core/form_type/FormTypeTable.js +12 -8
- package/lib/components/core/i18n/I18n.js +54 -61
- package/lib/components/core/i18n/I18nContext.js +9 -2
- package/lib/components/core/i18n/I18nProvider.js +40 -43
- package/lib/components/core/i18n/Moment.js +40 -50
- package/lib/components/core/index_definition/IndexDefinitionForm.js +23 -24
- package/lib/components/core/index_definition/IndexDefinitionTable.js +19 -11
- package/lib/components/core/index_job/IndexJobTable.js +20 -15
- package/lib/components/core/kapp/KappForm.js +57 -58
- package/lib/components/core/kapp/KappTable.js +17 -12
- package/lib/components/core/log/LogTable.js +35 -33
- package/lib/components/core/oauth_client/OAuthClientForm.js +17 -17
- package/lib/components/core/oauth_client/OAuthClientTable.js +12 -8
- package/lib/components/core/platform_component/AgentComponentForm.js +15 -15
- package/lib/components/core/platform_component/AgentComponentTable.js +10 -5
- package/lib/components/core/platform_component/TaskComponentForm.js +14 -14
- package/lib/components/core/profile/ProfileForm.js +40 -39
- package/lib/components/core/security_definition/SecurityDefinitionForm.js +28 -25
- package/lib/components/core/security_definition/SecurityDefinitionTable.js +18 -13
- package/lib/components/core/space/SpaceForm.js +79 -90
- package/lib/components/core/submission/DatastoreSubmissionFilters.js +39 -40
- package/lib/components/core/submission/DatastoreSubmissionTable.js +37 -34
- package/lib/components/core/submission/FormSubmissionFilters.js +79 -75
- package/lib/components/core/submission/FormSubmissionTable.js +27 -20
- package/lib/components/core/submission/KappSubmissionTable.js +30 -29
- package/lib/components/core/submission/SubmissionForm.js +126 -55
- package/lib/components/core/submission/SubmissionTable.js +24 -20
- package/lib/components/core/submission/helpers.js +37 -33
- package/lib/components/core/submission/helpers.test.js +69 -20
- package/lib/components/core/team/TeamForm.js +24 -21
- package/lib/components/core/team/TeamTable.js +16 -11
- package/lib/components/core/translation/ContextForm.js +13 -10
- package/lib/components/core/translation/ContextTable.js +13 -10
- package/lib/components/core/translation/EntryForm.js +27 -24
- package/lib/components/core/translation/EntryTable.js +19 -16
- package/lib/components/core/translation/LocaleForm.js +16 -13
- package/lib/components/core/translation/LocaleTable.js +12 -8
- package/lib/components/core/user/UserForm.js +38 -37
- package/lib/components/core/user/UserTable.js +19 -15
- package/lib/components/core/webapi/WebApiForm.js +49 -61
- package/lib/components/core/webapi/WebApiTable.js +14 -10
- package/lib/components/core/webhook/WebhookForm.js +33 -32
- package/lib/components/core/webhook/WebhookTable.js +22 -20
- package/lib/components/core/webhook_job/WebhookJobTable.js +19 -16
- package/lib/components/form/Form.helpers.js +102 -90
- package/lib/components/form/Form.js +467 -524
- package/lib/components/form/Form.models.js +38 -24
- package/lib/components/form/FormState.js +8 -5
- package/lib/components/form/KitchenSinkForm.js +135 -4
- package/lib/components/form/defaults/AttributesField.js +48 -59
- package/lib/components/form/defaults/CheckboxField.js +14 -6
- package/lib/components/form/defaults/CodeField.js +15 -7
- package/lib/components/form/defaults/FormButtons.js +12 -4
- package/lib/components/form/defaults/FormError.js +12 -4
- package/lib/components/form/defaults/FormField.js +15 -7
- package/lib/components/form/defaults/FormLayout.js +12 -4
- package/lib/components/form/defaults/FormMultiField.js +15 -7
- package/lib/components/form/defaults/PasswordField.js +14 -6
- package/lib/components/form/defaults/RadioField.js +15 -7
- package/lib/components/form/defaults/SampleTeamsRolesFIeld.js +17 -9
- package/lib/components/form/defaults/SelectField.js +16 -8
- package/lib/components/form/defaults/SelectMultiField.js +15 -7
- package/lib/components/form/defaults/TableField.js +14 -6
- package/lib/components/form/defaults/TeamField.js +15 -7
- package/lib/components/form/defaults/TeamMultiField.js +15 -7
- package/lib/components/form/defaults/TextField.js +14 -6
- package/lib/components/form/defaults/TextMultiField.js +26 -28
- package/lib/components/form/defaults/UserField.js +15 -7
- package/lib/components/form/defaults/UserMultiField.js +15 -7
- package/lib/components/form/defaults/index.js +48 -41
- package/lib/components/form/tests/Form.test.js +568 -864
- package/lib/components/form/tests/components.js +15 -25
- package/lib/components/form/tests/helpers.test.js +35 -33
- package/lib/components/index.js +981 -135
- package/lib/components/system/SystemBackgroundTasksTable.js +14 -10
- package/lib/components/system/SystemFilestoreForm.js +28 -25
- package/lib/components/system/SystemForm.js +19 -16
- package/lib/components/system/SystemIngressForm.js +10 -9
- package/lib/components/system/SystemSecurityForm.js +17 -14
- package/lib/components/system/SystemSmtpForm.js +13 -13
- package/lib/components/system/SystemTaskAdapterForm.js +21 -17
- package/lib/components/system/SystemUserForm.js +15 -14
- package/lib/components/system/helpers.js +62 -60
- package/lib/components/system/helpers.test.js +16 -12
- package/lib/components/system/spaces/SystemSpaceForm.js +25 -24
- package/lib/components/system/spaces/SystemTenantForm.js +43 -40
- package/lib/components/system/spaces/SystemTenantTable.js +12 -8
- package/lib/components/table/Table.js +211 -224
- package/lib/components/table/Table.redux.js +292 -329
- package/lib/components/table/Table.redux.test.js +49 -47
- package/lib/components/table/Table.test.js +107 -132
- package/lib/components/table/defaults/BodyCell.js +12 -6
- package/lib/components/table/defaults/BodyRow.js +10 -4
- package/lib/components/table/defaults/BooleanFilter.js +17 -11
- package/lib/components/table/defaults/EmptyBodyRow.js +12 -6
- package/lib/components/table/defaults/FilterLayout.js +17 -11
- package/lib/components/table/defaults/Footer.js +11 -5
- package/lib/components/table/defaults/FooterCell.js +10 -4
- package/lib/components/table/defaults/FooterRow.js +10 -4
- package/lib/components/table/defaults/Header.js +10 -4
- package/lib/components/table/defaults/HeaderCell.js +16 -10
- package/lib/components/table/defaults/HeaderRow.js +10 -4
- package/lib/components/table/defaults/PaginationControl.js +18 -9
- package/lib/components/table/defaults/TableBody.js +10 -4
- package/lib/components/table/defaults/TableLayout.js +12 -6
- package/lib/components/table/defaults/TextFilter.js +16 -10
- package/lib/components/table/defaults/index.js +41 -33
- package/lib/components/task/builder/Connector.js +100 -111
- package/lib/components/task/builder/ConnectorForm.js +17 -11
- package/lib/components/task/builder/Node.js +101 -83
- package/lib/components/task/builder/NodeForm.js +30 -27
- package/lib/components/task/builder/NodeParametersForm.js +27 -24
- package/lib/components/task/builder/SvgCanvas.js +67 -96
- package/lib/components/task/builder/SvgText.js +19 -134
- package/lib/components/task/builder/TaskDefinitionConfigForm.js +27 -22
- package/lib/components/task/builder/TreeBuilder.js +140 -115
- package/lib/components/task/builder/builder.redux.js +311 -326
- package/lib/components/task/builder/constants.js +94 -45
- package/lib/components/task/builder/helpers.js +184 -173
- package/lib/components/task/builder/helpers.test.js +20 -18
- package/lib/components/task/builder/models.js +121 -98
- package/lib/components/task/category/TaskCategoryForm.js +31 -29
- package/lib/components/task/category/TaskCategoryTable.js +12 -8
- package/lib/components/task/common/UsageTable.js +16 -12
- package/lib/components/task/engine/EngineSettingsForm.js +13 -11
- package/lib/components/task/errors/RunErrorTable.js +17 -13
- package/lib/components/task/errors/SystemErrorsTable.js +13 -9
- package/lib/components/task/handlers/HandlerForm.js +55 -55
- package/lib/components/task/handlers/HandlerTable.js +12 -8
- package/lib/components/task/handlers/MissingHandlerTable.js +12 -8
- package/lib/components/task/policy_rule/PolicyRuleForm.js +33 -32
- package/lib/components/task/policy_rule/PolicyRuleTable.js +12 -8
- package/lib/components/task/runs/CreateManualTriggerForm.js +17 -15
- package/lib/components/task/runs/RunTable.js +23 -20
- package/lib/components/task/runs/RunTaskTable.js +10 -6
- package/lib/components/task/sources/SourceForm.js +47 -47
- package/lib/components/task/sources/SourceTable.js +14 -11
- package/lib/components/task/triggers/TriggerTable.js +21 -18
- package/lib/components/task/workflows/LinkedWorkflowForm.js +48 -54
- package/lib/components/task/workflows/LinkedWorkflowTable.js +14 -10
- package/lib/components/task/workflows/MissingRoutineTable.js +12 -8
- package/lib/components/task/workflows/WorkflowForm.js +49 -44
- package/lib/components/task/workflows/WorkflowTable.js +17 -14
- package/lib/helpers/SearchBuilder.js +73 -127
- package/lib/helpers/SearchBuilder.test.js +184 -175
- package/lib/helpers/index.js +116 -74
- package/lib/index.js +86 -38
- package/lib/reducer.js +11 -3
- package/lib/saga.js +42 -38
- package/lib/store.js +59 -35
- package/package.json +3 -28
- package/proxyhelper.js +105 -46
- package/assets/discussions/images/avi_128.png +0 -0
- package/assets/discussions/images/excel_128.png +0 -0
- package/assets/discussions/images/html_128.png +0 -0
- package/assets/discussions/images/illustrator_128.png +0 -0
- package/assets/discussions/images/indesign_128.png +0 -0
- package/assets/discussions/images/movie_128.png +0 -0
- package/assets/discussions/images/mpeg_128.png +0 -0
- package/assets/discussions/images/pdf_128.png +0 -0
- package/assets/discussions/images/photoshop_128.png +0 -0
- package/assets/discussions/images/powerpoint_128.png +0 -0
- package/assets/discussions/images/txt_128.png +0 -0
- package/assets/discussions/images/unknown_128.png +0 -0
- package/assets/discussions/images/word_128.png +0 -0
- package/assets/discussions/styles/_discussion.scss +0 -506
- package/lib/apis/discussions/index.js +0 -395
- package/lib/apis/socket/index.js +0 -77
- package/lib/apis/socket/socket.js +0 -350
- package/lib/apis/socket/socket.test.js +0 -90
- package/lib/apis/socket/timer.js +0 -45
- package/lib/apis/socket/timer.test.js +0 -51
- package/lib/apis/socket/topic.js +0 -185
- package/lib/apis/topics/index.js +0 -19
- package/lib/components/discussions/ChatInputForm.js +0 -424
- package/lib/components/discussions/DateBanner.js +0 -10
- package/lib/components/discussions/Discussion.js +0 -202
- package/lib/components/discussions/DiscussionForm.js +0 -227
- package/lib/components/discussions/InvitationForm.js +0 -107
- package/lib/components/discussions/MessageHistory.js +0 -110
- package/lib/components/discussions/MessagesByDate.js +0 -40
- package/lib/components/discussions/MessagesList.js +0 -30
- package/lib/components/discussions/MoreMessagesBanner.js +0 -26
- package/lib/components/discussions/ScrollHelper.js +0 -84
- package/lib/components/discussions/SystemMessage.js +0 -88
- package/lib/components/discussions/SystemMessageGroup.js +0 -15
- package/lib/components/discussions/UserMessage.js +0 -163
- package/lib/components/discussions/UserMessageGroup.js +0 -34
- package/lib/components/discussions/redux.js +0 -178
- package/lib/components/discussions/sagas.js +0 -500
- package/lib/helpers/discussions/canManage.js +0 -30
- package/lib/helpers/discussions/canManage.test.js +0 -69
- package/lib/helpers/discussions/generateSystemMessageContent.js +0 -131
- package/lib/helpers/discussions/generateSystemMessageContent.test.js +0 -450
- package/lib/models/discussions.js +0 -76
- package/lib/models/index.js +0 -1
|
@@ -1,76 +1,75 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
|
|
4
|
+
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/regeneratorRuntime"));
|
|
5
|
+
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/asyncToGenerator"));
|
|
6
|
+
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _immutable = require("immutable");
|
|
9
|
+
var _enzyme = require("enzyme");
|
|
10
|
+
var _index = require("../../../index");
|
|
11
|
+
var _store = require("../../../store");
|
|
12
|
+
var _Form = require("../Form");
|
|
13
|
+
var _Form2 = require("../Form.models");
|
|
14
|
+
var _components = require("./components");
|
|
15
|
+
var _excluded = ["dataSources", "fields", "handleSubmit", "formOptions"];
|
|
12
16
|
var FORM_KEY = 'test';
|
|
13
|
-
|
|
14
17
|
var mountForm = function mountForm(_ref) {
|
|
15
18
|
var _ref$dataSources = _ref.dataSources,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
19
|
+
dataSources = _ref$dataSources === void 0 ? function () {
|
|
20
|
+
return {};
|
|
21
|
+
} : _ref$dataSources,
|
|
22
|
+
_ref$fields = _ref.fields,
|
|
23
|
+
fields = _ref$fields === void 0 ? function () {
|
|
24
|
+
return function () {
|
|
25
|
+
return [];
|
|
26
|
+
};
|
|
27
|
+
} : _ref$fields,
|
|
28
|
+
_ref$handleSubmit = _ref.handleSubmit,
|
|
29
|
+
handleSubmit = _ref$handleSubmit === void 0 ? function () {} : _ref$handleSubmit,
|
|
30
|
+
_ref$formOptions = _ref.formOptions,
|
|
31
|
+
formOptions = _ref$formOptions === void 0 ? {} : _ref$formOptions,
|
|
32
|
+
formProps = (0, _objectWithoutProperties2["default"])(_ref, _excluded);
|
|
31
33
|
// Generate a Form using the options defined by the particular test case.
|
|
32
|
-
var Form = generateForm({
|
|
34
|
+
var Form = (0, _Form.generateForm)({
|
|
33
35
|
dataSources: dataSources,
|
|
34
36
|
fields: fields,
|
|
35
37
|
formOptions: Object.keys(formOptions),
|
|
36
38
|
handleSubmit: handleSubmit
|
|
37
|
-
});
|
|
39
|
+
});
|
|
40
|
+
// Wrap the enyzme mount call with a promise that will be resolved when the
|
|
38
41
|
// form is initialized (most of the test cases need to wait for this).
|
|
39
|
-
|
|
40
42
|
return new Promise(function (resolve) {
|
|
41
|
-
var result = mount( /*#__PURE__*/
|
|
43
|
+
var result = (0, _enzyme.mount)( /*#__PURE__*/_react["default"].createElement(_index.KineticLib, {
|
|
42
44
|
components: {
|
|
43
|
-
fields: mockFieldConfig
|
|
45
|
+
fields: _components.mockFieldConfig
|
|
44
46
|
}
|
|
45
|
-
}, /*#__PURE__*/
|
|
47
|
+
}, /*#__PURE__*/_react["default"].createElement(Form, Object.assign({
|
|
46
48
|
formKey: FORM_KEY,
|
|
47
49
|
uncontrolled: true
|
|
48
50
|
}, formProps, formOptions))));
|
|
49
|
-
|
|
50
51
|
var ready = function ready() {
|
|
51
|
-
return !!store.getState().getIn(['forms', FORM_KEY, 'fields']);
|
|
52
|
+
return !!_store.store.getState().getIn(['forms', FORM_KEY, 'fields']);
|
|
52
53
|
};
|
|
53
|
-
|
|
54
54
|
if (ready()) {
|
|
55
55
|
result.update();
|
|
56
56
|
resolve(result);
|
|
57
57
|
} else {
|
|
58
|
-
var unsub = store.subscribe(function () {
|
|
58
|
+
var unsub = _store.store.subscribe(function () {
|
|
59
59
|
if (ready()) {
|
|
60
60
|
result.update();
|
|
61
|
-
resolve(result);
|
|
62
|
-
|
|
61
|
+
resolve(result);
|
|
62
|
+
// Remove the store listener since we're done.
|
|
63
63
|
unsub();
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
-
|
|
70
69
|
describe('dataSources', function () {
|
|
71
|
-
test('simple', /*#__PURE__*/
|
|
70
|
+
test('simple', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee() {
|
|
72
71
|
var dependencyFn, messageFn, messageParams, result;
|
|
73
|
-
return
|
|
72
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee$(_context) {
|
|
74
73
|
while (1) {
|
|
75
74
|
switch (_context.prev = _context.next) {
|
|
76
75
|
case 0:
|
|
@@ -109,33 +108,32 @@ describe('dataSources', function () {
|
|
|
109
108
|
};
|
|
110
109
|
}
|
|
111
110
|
});
|
|
112
|
-
|
|
113
111
|
case 5:
|
|
114
112
|
result = _context.sent;
|
|
115
|
-
expect(result.find('FormLayout')).toMatchSnapshot();
|
|
116
|
-
|
|
117
|
-
expect(dependencyFn.mock.calls).toMatchSnapshot();
|
|
118
|
-
|
|
119
|
-
expect(messageFn.mock.calls).toMatchSnapshot();
|
|
120
|
-
|
|
113
|
+
expect(result.find('FormLayout')).toMatchSnapshot();
|
|
114
|
+
// should be called once
|
|
115
|
+
expect(dependencyFn.mock.calls).toMatchSnapshot();
|
|
116
|
+
// should be called once with the result dependencyFn
|
|
117
|
+
expect(messageFn.mock.calls).toMatchSnapshot();
|
|
118
|
+
// should be called several times as bindings change
|
|
121
119
|
expect(messageParams.mock.calls).toMatchSnapshot();
|
|
122
120
|
result.unmount();
|
|
123
|
-
|
|
124
121
|
case 11:
|
|
125
122
|
case "end":
|
|
126
123
|
return _context.stop();
|
|
127
124
|
}
|
|
128
125
|
}
|
|
129
126
|
}, _callee);
|
|
130
|
-
})));
|
|
127
|
+
})));
|
|
128
|
+
|
|
129
|
+
// This tests a specific bug where calling setValue multiple times was
|
|
131
130
|
// resulting in issues where the state was updated multiple times before the
|
|
132
131
|
// saga could check for the change in the datasource params.
|
|
133
132
|
// Additionally, I could only reproduce this issue by making the `setValue`
|
|
134
133
|
// calls inside the change event of a field.
|
|
135
|
-
|
|
136
|
-
test('handles multiple change events', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
134
|
+
test('handles multiple change events', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee2() {
|
|
137
135
|
var dataFn, result;
|
|
138
|
-
return
|
|
136
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee2$(_context2) {
|
|
139
137
|
while (1) {
|
|
140
138
|
switch (_context2.prev = _context2.next) {
|
|
141
139
|
case 0:
|
|
@@ -179,19 +177,17 @@ describe('dataSources', function () {
|
|
|
179
177
|
};
|
|
180
178
|
}
|
|
181
179
|
});
|
|
182
|
-
|
|
183
180
|
case 3:
|
|
184
181
|
result = _context2.sent;
|
|
185
182
|
// dataFn should be called once with the initial value of paramField
|
|
186
183
|
expect(dataFn.mock.calls.length).toBe(1);
|
|
187
|
-
expect(dataFn.mock.calls[0][0]).toBe('One');
|
|
188
|
-
|
|
189
|
-
setValue(FORM_KEY, 'mainField', 'n/a');
|
|
190
|
-
|
|
184
|
+
expect(dataFn.mock.calls[0][0]).toBe('One');
|
|
185
|
+
// trigger change event that changes the paramField
|
|
186
|
+
(0, _Form.setValue)(FORM_KEY, 'mainField', 'n/a');
|
|
187
|
+
// dataFn should be called again with the updated value of paramField
|
|
191
188
|
expect(dataFn.mock.calls.length).toBe(2);
|
|
192
189
|
expect(dataFn.mock.calls[1][0]).toBe('Two');
|
|
193
190
|
result.unmount();
|
|
194
|
-
|
|
195
191
|
case 10:
|
|
196
192
|
case "end":
|
|
197
193
|
return _context2.stop();
|
|
@@ -199,9 +195,9 @@ describe('dataSources', function () {
|
|
|
199
195
|
}
|
|
200
196
|
}, _callee2);
|
|
201
197
|
})));
|
|
202
|
-
test('resets to null when params evaluates to falsey', /*#__PURE__*/
|
|
198
|
+
test('resets to null when params evaluates to falsey', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee3() {
|
|
203
199
|
var dataFn, paramFn, result;
|
|
204
|
-
return
|
|
200
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee3$(_context3) {
|
|
205
201
|
while (1) {
|
|
206
202
|
switch (_context3.prev = _context3.next) {
|
|
207
203
|
case 0:
|
|
@@ -234,26 +230,24 @@ describe('dataSources', function () {
|
|
|
234
230
|
};
|
|
235
231
|
}
|
|
236
232
|
});
|
|
237
|
-
|
|
238
233
|
case 4:
|
|
239
234
|
result = _context3.sent;
|
|
240
235
|
// Update the component because we want to test the bindings prop passed to
|
|
241
236
|
// FormLayout.
|
|
242
237
|
result.update();
|
|
243
238
|
expect(dataFn.mock.calls.length).toBe(1);
|
|
244
|
-
expect(result.find('FormLayout').prop('bindings').data).toEqual(Map({
|
|
239
|
+
expect(result.find('FormLayout').prop('bindings').data).toEqual((0, _immutable.Map)({
|
|
245
240
|
arg: 'Test'
|
|
246
|
-
}));
|
|
241
|
+
}));
|
|
242
|
+
// Uncheck enabled which should cause paramFn to return false, which should
|
|
247
243
|
// result in clearing the datasource.
|
|
248
|
-
|
|
249
|
-
|
|
244
|
+
(0, _Form.setValue)(FORM_KEY, 'enabled', false);
|
|
245
|
+
// Update the component because we want to test the bindings prop passed to
|
|
250
246
|
// FormLayout.
|
|
251
|
-
|
|
252
247
|
result.update();
|
|
253
248
|
expect(dataFn.mock.calls.length).toBe(1);
|
|
254
249
|
expect(result.find('FormLayout').prop('bindings').data).toBe(null);
|
|
255
250
|
result.unmount();
|
|
256
|
-
|
|
257
251
|
case 13:
|
|
258
252
|
case "end":
|
|
259
253
|
return _context3.stop();
|
|
@@ -264,9 +258,9 @@ describe('dataSources', function () {
|
|
|
264
258
|
});
|
|
265
259
|
describe('fields', function () {
|
|
266
260
|
describe('constraint', function () {
|
|
267
|
-
test('given false', /*#__PURE__*/
|
|
261
|
+
test('given false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee4() {
|
|
268
262
|
var result;
|
|
269
|
-
return
|
|
263
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee4$(_context4) {
|
|
270
264
|
while (1) {
|
|
271
265
|
switch (_context4.prev = _context4.next) {
|
|
272
266
|
case 0:
|
|
@@ -282,12 +276,10 @@ describe('fields', function () {
|
|
|
282
276
|
};
|
|
283
277
|
}
|
|
284
278
|
});
|
|
285
|
-
|
|
286
279
|
case 2:
|
|
287
280
|
result = _context4.sent;
|
|
288
281
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
289
282
|
result.unmount();
|
|
290
|
-
|
|
291
283
|
case 5:
|
|
292
284
|
case "end":
|
|
293
285
|
return _context4.stop();
|
|
@@ -295,9 +287,9 @@ describe('fields', function () {
|
|
|
295
287
|
}
|
|
296
288
|
}, _callee4);
|
|
297
289
|
})));
|
|
298
|
-
test('given null', /*#__PURE__*/
|
|
290
|
+
test('given null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee5() {
|
|
299
291
|
var result;
|
|
300
|
-
return
|
|
292
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee5$(_context5) {
|
|
301
293
|
while (1) {
|
|
302
294
|
switch (_context5.prev = _context5.next) {
|
|
303
295
|
case 0:
|
|
@@ -313,12 +305,10 @@ describe('fields', function () {
|
|
|
313
305
|
};
|
|
314
306
|
}
|
|
315
307
|
});
|
|
316
|
-
|
|
317
308
|
case 2:
|
|
318
309
|
result = _context5.sent;
|
|
319
310
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
320
311
|
result.unmount();
|
|
321
|
-
|
|
322
312
|
case 5:
|
|
323
313
|
case "end":
|
|
324
314
|
return _context5.stop();
|
|
@@ -326,9 +316,9 @@ describe('fields', function () {
|
|
|
326
316
|
}
|
|
327
317
|
}, _callee5);
|
|
328
318
|
})));
|
|
329
|
-
test('given function that returns true', /*#__PURE__*/
|
|
319
|
+
test('given function that returns true', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee6() {
|
|
330
320
|
var constraintFn, result;
|
|
331
|
-
return
|
|
321
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee6$(_context6) {
|
|
332
322
|
while (1) {
|
|
333
323
|
switch (_context6.prev = _context6.next) {
|
|
334
324
|
case 0:
|
|
@@ -347,13 +337,11 @@ describe('fields', function () {
|
|
|
347
337
|
};
|
|
348
338
|
}
|
|
349
339
|
});
|
|
350
|
-
|
|
351
340
|
case 3:
|
|
352
341
|
result = _context6.sent;
|
|
353
342
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
354
343
|
expect(constraintFn.mock.calls).toMatchSnapshot();
|
|
355
344
|
result.unmount();
|
|
356
|
-
|
|
357
345
|
case 7:
|
|
358
346
|
case "end":
|
|
359
347
|
return _context6.stop();
|
|
@@ -361,9 +349,9 @@ describe('fields', function () {
|
|
|
361
349
|
}
|
|
362
350
|
}, _callee6);
|
|
363
351
|
})));
|
|
364
|
-
test('given function that returns false', /*#__PURE__*/
|
|
352
|
+
test('given function that returns false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee7() {
|
|
365
353
|
var result;
|
|
366
|
-
return
|
|
354
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee7$(_context7) {
|
|
367
355
|
while (1) {
|
|
368
356
|
switch (_context7.prev = _context7.next) {
|
|
369
357
|
case 0:
|
|
@@ -381,12 +369,10 @@ describe('fields', function () {
|
|
|
381
369
|
};
|
|
382
370
|
}
|
|
383
371
|
});
|
|
384
|
-
|
|
385
372
|
case 2:
|
|
386
373
|
result = _context7.sent;
|
|
387
374
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
388
375
|
result.unmount();
|
|
389
|
-
|
|
390
376
|
case 5:
|
|
391
377
|
case "end":
|
|
392
378
|
return _context7.stop();
|
|
@@ -394,9 +380,9 @@ describe('fields', function () {
|
|
|
394
380
|
}
|
|
395
381
|
}, _callee7);
|
|
396
382
|
})));
|
|
397
|
-
test('given function that returns null', /*#__PURE__*/
|
|
383
|
+
test('given function that returns null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee8() {
|
|
398
384
|
var result;
|
|
399
|
-
return
|
|
385
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee8$(_context8) {
|
|
400
386
|
while (1) {
|
|
401
387
|
switch (_context8.prev = _context8.next) {
|
|
402
388
|
case 0:
|
|
@@ -414,12 +400,10 @@ describe('fields', function () {
|
|
|
414
400
|
};
|
|
415
401
|
}
|
|
416
402
|
});
|
|
417
|
-
|
|
418
403
|
case 2:
|
|
419
404
|
result = _context8.sent;
|
|
420
405
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
421
406
|
result.unmount();
|
|
422
|
-
|
|
423
407
|
case 5:
|
|
424
408
|
case "end":
|
|
425
409
|
return _context8.stop();
|
|
@@ -427,9 +411,9 @@ describe('fields', function () {
|
|
|
427
411
|
}
|
|
428
412
|
}, _callee8);
|
|
429
413
|
})));
|
|
430
|
-
test('given function that returns a string', /*#__PURE__*/
|
|
414
|
+
test('given function that returns a string', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee9() {
|
|
431
415
|
var result;
|
|
432
|
-
return
|
|
416
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee9$(_context9) {
|
|
433
417
|
while (1) {
|
|
434
418
|
switch (_context9.prev = _context9.next) {
|
|
435
419
|
case 0:
|
|
@@ -447,12 +431,10 @@ describe('fields', function () {
|
|
|
447
431
|
};
|
|
448
432
|
}
|
|
449
433
|
});
|
|
450
|
-
|
|
451
434
|
case 2:
|
|
452
435
|
result = _context9.sent;
|
|
453
436
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
454
437
|
result.unmount();
|
|
455
|
-
|
|
456
438
|
case 5:
|
|
457
439
|
case "end":
|
|
458
440
|
return _context9.stop();
|
|
@@ -462,9 +444,9 @@ describe('fields', function () {
|
|
|
462
444
|
})));
|
|
463
445
|
});
|
|
464
446
|
describe('constraintMessage', function () {
|
|
465
|
-
test('given constraint true and constraintMessage string', /*#__PURE__*/
|
|
447
|
+
test('given constraint true and constraintMessage string', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee10() {
|
|
466
448
|
var result;
|
|
467
|
-
return
|
|
449
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee10$(_context10) {
|
|
468
450
|
while (1) {
|
|
469
451
|
switch (_context10.prev = _context10.next) {
|
|
470
452
|
case 0:
|
|
@@ -483,12 +465,10 @@ describe('fields', function () {
|
|
|
483
465
|
};
|
|
484
466
|
}
|
|
485
467
|
});
|
|
486
|
-
|
|
487
468
|
case 2:
|
|
488
469
|
result = _context10.sent;
|
|
489
470
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
490
471
|
result.unmount();
|
|
491
|
-
|
|
492
472
|
case 5:
|
|
493
473
|
case "end":
|
|
494
474
|
return _context10.stop();
|
|
@@ -496,9 +476,9 @@ describe('fields', function () {
|
|
|
496
476
|
}
|
|
497
477
|
}, _callee10);
|
|
498
478
|
})));
|
|
499
|
-
test('given constraint false and constraintMessage string', /*#__PURE__*/
|
|
479
|
+
test('given constraint false and constraintMessage string', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee11() {
|
|
500
480
|
var result;
|
|
501
|
-
return
|
|
481
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee11$(_context11) {
|
|
502
482
|
while (1) {
|
|
503
483
|
switch (_context11.prev = _context11.next) {
|
|
504
484
|
case 0:
|
|
@@ -517,12 +497,10 @@ describe('fields', function () {
|
|
|
517
497
|
};
|
|
518
498
|
}
|
|
519
499
|
});
|
|
520
|
-
|
|
521
500
|
case 2:
|
|
522
501
|
result = _context11.sent;
|
|
523
502
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
524
503
|
result.unmount();
|
|
525
|
-
|
|
526
504
|
case 5:
|
|
527
505
|
case "end":
|
|
528
506
|
return _context11.stop();
|
|
@@ -530,9 +508,9 @@ describe('fields', function () {
|
|
|
530
508
|
}
|
|
531
509
|
}, _callee11);
|
|
532
510
|
})));
|
|
533
|
-
test('given constraint with string and constraintMessage string', /*#__PURE__*/
|
|
511
|
+
test('given constraint with string and constraintMessage string', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee12() {
|
|
534
512
|
var result;
|
|
535
|
-
return
|
|
513
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee12$(_context12) {
|
|
536
514
|
while (1) {
|
|
537
515
|
switch (_context12.prev = _context12.next) {
|
|
538
516
|
case 0:
|
|
@@ -551,12 +529,10 @@ describe('fields', function () {
|
|
|
551
529
|
};
|
|
552
530
|
}
|
|
553
531
|
});
|
|
554
|
-
|
|
555
532
|
case 2:
|
|
556
533
|
result = _context12.sent;
|
|
557
534
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
558
535
|
result.unmount();
|
|
559
|
-
|
|
560
536
|
case 5:
|
|
561
537
|
case "end":
|
|
562
538
|
return _context12.stop();
|
|
@@ -564,9 +540,9 @@ describe('fields', function () {
|
|
|
564
540
|
}
|
|
565
541
|
}, _callee12);
|
|
566
542
|
})));
|
|
567
|
-
test('given constraint true and constraintMessage null', /*#__PURE__*/
|
|
543
|
+
test('given constraint true and constraintMessage null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee13() {
|
|
568
544
|
var result;
|
|
569
|
-
return
|
|
545
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee13$(_context13) {
|
|
570
546
|
while (1) {
|
|
571
547
|
switch (_context13.prev = _context13.next) {
|
|
572
548
|
case 0:
|
|
@@ -585,12 +561,10 @@ describe('fields', function () {
|
|
|
585
561
|
};
|
|
586
562
|
}
|
|
587
563
|
});
|
|
588
|
-
|
|
589
564
|
case 2:
|
|
590
565
|
result = _context13.sent;
|
|
591
566
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
592
567
|
result.unmount();
|
|
593
|
-
|
|
594
568
|
case 5:
|
|
595
569
|
case "end":
|
|
596
570
|
return _context13.stop();
|
|
@@ -598,9 +572,9 @@ describe('fields', function () {
|
|
|
598
572
|
}
|
|
599
573
|
}, _callee13);
|
|
600
574
|
})));
|
|
601
|
-
test('given constraint true and constraintMessage function that returns string', /*#__PURE__*/
|
|
575
|
+
test('given constraint true and constraintMessage function that returns string', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee14() {
|
|
602
576
|
var result;
|
|
603
|
-
return
|
|
577
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee14$(_context14) {
|
|
604
578
|
while (1) {
|
|
605
579
|
switch (_context14.prev = _context14.next) {
|
|
606
580
|
case 0:
|
|
@@ -621,12 +595,10 @@ describe('fields', function () {
|
|
|
621
595
|
};
|
|
622
596
|
}
|
|
623
597
|
});
|
|
624
|
-
|
|
625
598
|
case 2:
|
|
626
599
|
result = _context14.sent;
|
|
627
600
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
628
601
|
result.unmount();
|
|
629
|
-
|
|
630
602
|
case 5:
|
|
631
603
|
case "end":
|
|
632
604
|
return _context14.stop();
|
|
@@ -634,9 +606,9 @@ describe('fields', function () {
|
|
|
634
606
|
}
|
|
635
607
|
}, _callee14);
|
|
636
608
|
})));
|
|
637
|
-
test('given constraint true and constraintMessage function that returns null', /*#__PURE__*/
|
|
609
|
+
test('given constraint true and constraintMessage function that returns null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee15() {
|
|
638
610
|
var result;
|
|
639
|
-
return
|
|
611
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee15$(_context15) {
|
|
640
612
|
while (1) {
|
|
641
613
|
switch (_context15.prev = _context15.next) {
|
|
642
614
|
case 0:
|
|
@@ -657,12 +629,10 @@ describe('fields', function () {
|
|
|
657
629
|
};
|
|
658
630
|
}
|
|
659
631
|
});
|
|
660
|
-
|
|
661
632
|
case 2:
|
|
662
633
|
result = _context15.sent;
|
|
663
634
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
664
635
|
result.unmount();
|
|
665
|
-
|
|
666
636
|
case 5:
|
|
667
637
|
case "end":
|
|
668
638
|
return _context15.stop();
|
|
@@ -672,9 +642,9 @@ describe('fields', function () {
|
|
|
672
642
|
})));
|
|
673
643
|
});
|
|
674
644
|
describe('enabled', function () {
|
|
675
|
-
test('given true', /*#__PURE__*/
|
|
645
|
+
test('given true', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee16() {
|
|
676
646
|
var result;
|
|
677
|
-
return
|
|
647
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee16$(_context16) {
|
|
678
648
|
while (1) {
|
|
679
649
|
switch (_context16.prev = _context16.next) {
|
|
680
650
|
case 0:
|
|
@@ -690,12 +660,10 @@ describe('fields', function () {
|
|
|
690
660
|
};
|
|
691
661
|
}
|
|
692
662
|
});
|
|
693
|
-
|
|
694
663
|
case 2:
|
|
695
664
|
result = _context16.sent;
|
|
696
665
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
697
666
|
result.unmount();
|
|
698
|
-
|
|
699
667
|
case 5:
|
|
700
668
|
case "end":
|
|
701
669
|
return _context16.stop();
|
|
@@ -703,9 +671,9 @@ describe('fields', function () {
|
|
|
703
671
|
}
|
|
704
672
|
}, _callee16);
|
|
705
673
|
})));
|
|
706
|
-
test('given false', /*#__PURE__*/
|
|
674
|
+
test('given false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee17() {
|
|
707
675
|
var result;
|
|
708
|
-
return
|
|
676
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee17$(_context17) {
|
|
709
677
|
while (1) {
|
|
710
678
|
switch (_context17.prev = _context17.next) {
|
|
711
679
|
case 0:
|
|
@@ -721,12 +689,10 @@ describe('fields', function () {
|
|
|
721
689
|
};
|
|
722
690
|
}
|
|
723
691
|
});
|
|
724
|
-
|
|
725
692
|
case 2:
|
|
726
693
|
result = _context17.sent;
|
|
727
694
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
728
695
|
result.unmount();
|
|
729
|
-
|
|
730
696
|
case 5:
|
|
731
697
|
case "end":
|
|
732
698
|
return _context17.stop();
|
|
@@ -734,9 +700,9 @@ describe('fields', function () {
|
|
|
734
700
|
}
|
|
735
701
|
}, _callee17);
|
|
736
702
|
})));
|
|
737
|
-
test('given a string value', /*#__PURE__*/
|
|
703
|
+
test('given a string value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee18() {
|
|
738
704
|
var result;
|
|
739
|
-
return
|
|
705
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee18$(_context18) {
|
|
740
706
|
while (1) {
|
|
741
707
|
switch (_context18.prev = _context18.next) {
|
|
742
708
|
case 0:
|
|
@@ -752,12 +718,10 @@ describe('fields', function () {
|
|
|
752
718
|
};
|
|
753
719
|
}
|
|
754
720
|
});
|
|
755
|
-
|
|
756
721
|
case 2:
|
|
757
722
|
result = _context18.sent;
|
|
758
723
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
759
724
|
result.unmount();
|
|
760
|
-
|
|
761
725
|
case 5:
|
|
762
726
|
case "end":
|
|
763
727
|
return _context18.stop();
|
|
@@ -765,9 +729,9 @@ describe('fields', function () {
|
|
|
765
729
|
}
|
|
766
730
|
}, _callee18);
|
|
767
731
|
})));
|
|
768
|
-
test('given a null value', /*#__PURE__*/
|
|
732
|
+
test('given a null value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee19() {
|
|
769
733
|
var result;
|
|
770
|
-
return
|
|
734
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee19$(_context19) {
|
|
771
735
|
while (1) {
|
|
772
736
|
switch (_context19.prev = _context19.next) {
|
|
773
737
|
case 0:
|
|
@@ -783,12 +747,10 @@ describe('fields', function () {
|
|
|
783
747
|
};
|
|
784
748
|
}
|
|
785
749
|
});
|
|
786
|
-
|
|
787
750
|
case 2:
|
|
788
751
|
result = _context19.sent;
|
|
789
752
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
790
753
|
result.unmount();
|
|
791
|
-
|
|
792
754
|
case 5:
|
|
793
755
|
case "end":
|
|
794
756
|
return _context19.stop();
|
|
@@ -796,9 +758,9 @@ describe('fields', function () {
|
|
|
796
758
|
}
|
|
797
759
|
}, _callee19);
|
|
798
760
|
})));
|
|
799
|
-
test('given a function that returns a boolean', /*#__PURE__*/
|
|
761
|
+
test('given a function that returns a boolean', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee20() {
|
|
800
762
|
var enabledFn, result;
|
|
801
|
-
return
|
|
763
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee20$(_context20) {
|
|
802
764
|
while (1) {
|
|
803
765
|
switch (_context20.prev = _context20.next) {
|
|
804
766
|
case 0:
|
|
@@ -817,13 +779,11 @@ describe('fields', function () {
|
|
|
817
779
|
};
|
|
818
780
|
}
|
|
819
781
|
});
|
|
820
|
-
|
|
821
782
|
case 3:
|
|
822
783
|
result = _context20.sent;
|
|
823
784
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
824
785
|
expect(enabledFn.mock.calls).toMatchSnapshot();
|
|
825
786
|
result.unmount();
|
|
826
|
-
|
|
827
787
|
case 7:
|
|
828
788
|
case "end":
|
|
829
789
|
return _context20.stop();
|
|
@@ -833,8 +793,8 @@ describe('fields', function () {
|
|
|
833
793
|
})));
|
|
834
794
|
});
|
|
835
795
|
describe('helpText', function () {
|
|
836
|
-
test('=<<TODO>>=', /*#__PURE__*/
|
|
837
|
-
return
|
|
796
|
+
test('=<<TODO>>=', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee21() {
|
|
797
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee21$(_context21) {
|
|
838
798
|
while (1) {
|
|
839
799
|
switch (_context21.prev = _context21.next) {
|
|
840
800
|
case 0:
|
|
@@ -847,9 +807,9 @@ describe('fields', function () {
|
|
|
847
807
|
});
|
|
848
808
|
describe('initialValue', function () {
|
|
849
809
|
describe('initialValue properly converted to immutable', function () {
|
|
850
|
-
test('attributes', /*#__PURE__*/
|
|
810
|
+
test('attributes', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee22() {
|
|
851
811
|
var initial, result;
|
|
852
|
-
return
|
|
812
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee22$(_context22) {
|
|
853
813
|
while (1) {
|
|
854
814
|
switch (_context22.prev = _context22.next) {
|
|
855
815
|
case 0:
|
|
@@ -868,13 +828,11 @@ describe('fields', function () {
|
|
|
868
828
|
};
|
|
869
829
|
}
|
|
870
830
|
});
|
|
871
|
-
|
|
872
831
|
case 3:
|
|
873
832
|
result = _context22.sent;
|
|
874
|
-
expect(result.find('AttributesFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
833
|
+
expect(result.find('AttributesFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
875
834
|
expect(result.find('AttributesFieldMock')).toMatchSnapshot();
|
|
876
835
|
result.unmount();
|
|
877
|
-
|
|
878
836
|
case 7:
|
|
879
837
|
case "end":
|
|
880
838
|
return _context22.stop();
|
|
@@ -882,9 +840,9 @@ describe('fields', function () {
|
|
|
882
840
|
}
|
|
883
841
|
}, _callee22);
|
|
884
842
|
})));
|
|
885
|
-
test('checkbox', /*#__PURE__*/
|
|
843
|
+
test('checkbox', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee23() {
|
|
886
844
|
var initial, result;
|
|
887
|
-
return
|
|
845
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee23$(_context23) {
|
|
888
846
|
while (1) {
|
|
889
847
|
switch (_context23.prev = _context23.next) {
|
|
890
848
|
case 0:
|
|
@@ -901,13 +859,11 @@ describe('fields', function () {
|
|
|
901
859
|
};
|
|
902
860
|
}
|
|
903
861
|
});
|
|
904
|
-
|
|
905
862
|
case 3:
|
|
906
863
|
result = _context23.sent;
|
|
907
|
-
expect(result.find('CheckboxFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
864
|
+
expect(result.find('CheckboxFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
908
865
|
expect(result.find('CheckboxFieldMock')).toMatchSnapshot();
|
|
909
866
|
result.unmount();
|
|
910
|
-
|
|
911
867
|
case 7:
|
|
912
868
|
case "end":
|
|
913
869
|
return _context23.stop();
|
|
@@ -915,9 +871,9 @@ describe('fields', function () {
|
|
|
915
871
|
}
|
|
916
872
|
}, _callee23);
|
|
917
873
|
})));
|
|
918
|
-
test('code', /*#__PURE__*/
|
|
874
|
+
test('code', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee24() {
|
|
919
875
|
var initial, result;
|
|
920
|
-
return
|
|
876
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee24$(_context24) {
|
|
921
877
|
while (1) {
|
|
922
878
|
switch (_context24.prev = _context24.next) {
|
|
923
879
|
case 0:
|
|
@@ -934,13 +890,11 @@ describe('fields', function () {
|
|
|
934
890
|
};
|
|
935
891
|
}
|
|
936
892
|
});
|
|
937
|
-
|
|
938
893
|
case 3:
|
|
939
894
|
result = _context24.sent;
|
|
940
|
-
expect(result.find('CodeFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
895
|
+
expect(result.find('CodeFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
941
896
|
expect(result.find('CodeFieldMock')).toMatchSnapshot();
|
|
942
897
|
result.unmount();
|
|
943
|
-
|
|
944
898
|
case 7:
|
|
945
899
|
case "end":
|
|
946
900
|
return _context24.stop();
|
|
@@ -948,9 +902,9 @@ describe('fields', function () {
|
|
|
948
902
|
}
|
|
949
903
|
}, _callee24);
|
|
950
904
|
})));
|
|
951
|
-
test('form', /*#__PURE__*/
|
|
905
|
+
test('form', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee25() {
|
|
952
906
|
var initial, result;
|
|
953
|
-
return
|
|
907
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee25$(_context25) {
|
|
954
908
|
while (1) {
|
|
955
909
|
switch (_context25.prev = _context25.next) {
|
|
956
910
|
case 0:
|
|
@@ -970,13 +924,11 @@ describe('fields', function () {
|
|
|
970
924
|
};
|
|
971
925
|
}
|
|
972
926
|
});
|
|
973
|
-
|
|
974
927
|
case 3:
|
|
975
928
|
result = _context25.sent;
|
|
976
|
-
expect(result.find('FormFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
929
|
+
expect(result.find('FormFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
977
930
|
expect(result.find('FormFieldMock')).toMatchSnapshot();
|
|
978
931
|
result.unmount();
|
|
979
|
-
|
|
980
932
|
case 7:
|
|
981
933
|
case "end":
|
|
982
934
|
return _context25.stop();
|
|
@@ -984,9 +936,9 @@ describe('fields', function () {
|
|
|
984
936
|
}
|
|
985
937
|
}, _callee25);
|
|
986
938
|
})));
|
|
987
|
-
test('form-multi', /*#__PURE__*/
|
|
939
|
+
test('form-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee26() {
|
|
988
940
|
var initial, result;
|
|
989
|
-
return
|
|
941
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee26$(_context26) {
|
|
990
942
|
while (1) {
|
|
991
943
|
switch (_context26.prev = _context26.next) {
|
|
992
944
|
case 0:
|
|
@@ -1009,13 +961,11 @@ describe('fields', function () {
|
|
|
1009
961
|
};
|
|
1010
962
|
}
|
|
1011
963
|
});
|
|
1012
|
-
|
|
1013
964
|
case 3:
|
|
1014
965
|
result = _context26.sent;
|
|
1015
|
-
expect(result.find('FormMultiFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
966
|
+
expect(result.find('FormMultiFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1016
967
|
expect(result.find('FormMultiFieldMock')).toMatchSnapshot();
|
|
1017
968
|
result.unmount();
|
|
1018
|
-
|
|
1019
969
|
case 7:
|
|
1020
970
|
case "end":
|
|
1021
971
|
return _context26.stop();
|
|
@@ -1023,9 +973,9 @@ describe('fields', function () {
|
|
|
1023
973
|
}
|
|
1024
974
|
}, _callee26);
|
|
1025
975
|
})));
|
|
1026
|
-
test('password', /*#__PURE__*/
|
|
976
|
+
test('password', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee27() {
|
|
1027
977
|
var initial, result;
|
|
1028
|
-
return
|
|
978
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee27$(_context27) {
|
|
1029
979
|
while (1) {
|
|
1030
980
|
switch (_context27.prev = _context27.next) {
|
|
1031
981
|
case 0:
|
|
@@ -1042,13 +992,11 @@ describe('fields', function () {
|
|
|
1042
992
|
};
|
|
1043
993
|
}
|
|
1044
994
|
});
|
|
1045
|
-
|
|
1046
995
|
case 3:
|
|
1047
996
|
result = _context27.sent;
|
|
1048
|
-
expect(result.find('PasswordFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
997
|
+
expect(result.find('PasswordFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1049
998
|
expect(result.find('PasswordFieldMock')).toMatchSnapshot();
|
|
1050
999
|
result.unmount();
|
|
1051
|
-
|
|
1052
1000
|
case 7:
|
|
1053
1001
|
case "end":
|
|
1054
1002
|
return _context27.stop();
|
|
@@ -1056,9 +1004,9 @@ describe('fields', function () {
|
|
|
1056
1004
|
}
|
|
1057
1005
|
}, _callee27);
|
|
1058
1006
|
})));
|
|
1059
|
-
test('radio', /*#__PURE__*/
|
|
1007
|
+
test('radio', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee28() {
|
|
1060
1008
|
var initial, result;
|
|
1061
|
-
return
|
|
1009
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee28$(_context28) {
|
|
1062
1010
|
while (1) {
|
|
1063
1011
|
switch (_context28.prev = _context28.next) {
|
|
1064
1012
|
case 0:
|
|
@@ -1078,13 +1026,11 @@ describe('fields', function () {
|
|
|
1078
1026
|
};
|
|
1079
1027
|
}
|
|
1080
1028
|
});
|
|
1081
|
-
|
|
1082
1029
|
case 3:
|
|
1083
1030
|
result = _context28.sent;
|
|
1084
|
-
expect(result.find('RadioFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
1031
|
+
expect(result.find('RadioFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1085
1032
|
expect(result.find('RadioFieldMock')).toMatchSnapshot();
|
|
1086
1033
|
result.unmount();
|
|
1087
|
-
|
|
1088
1034
|
case 7:
|
|
1089
1035
|
case "end":
|
|
1090
1036
|
return _context28.stop();
|
|
@@ -1092,9 +1038,9 @@ describe('fields', function () {
|
|
|
1092
1038
|
}
|
|
1093
1039
|
}, _callee28);
|
|
1094
1040
|
})));
|
|
1095
|
-
test('select', /*#__PURE__*/
|
|
1041
|
+
test('select', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee29() {
|
|
1096
1042
|
var initial, result;
|
|
1097
|
-
return
|
|
1043
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee29$(_context29) {
|
|
1098
1044
|
while (1) {
|
|
1099
1045
|
switch (_context29.prev = _context29.next) {
|
|
1100
1046
|
case 0:
|
|
@@ -1114,13 +1060,11 @@ describe('fields', function () {
|
|
|
1114
1060
|
};
|
|
1115
1061
|
}
|
|
1116
1062
|
});
|
|
1117
|
-
|
|
1118
1063
|
case 3:
|
|
1119
1064
|
result = _context29.sent;
|
|
1120
|
-
expect(result.find('SelectFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
1065
|
+
expect(result.find('SelectFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1121
1066
|
expect(result.find('SelectFieldMock')).toMatchSnapshot();
|
|
1122
1067
|
result.unmount();
|
|
1123
|
-
|
|
1124
1068
|
case 7:
|
|
1125
1069
|
case "end":
|
|
1126
1070
|
return _context29.stop();
|
|
@@ -1128,9 +1072,9 @@ describe('fields', function () {
|
|
|
1128
1072
|
}
|
|
1129
1073
|
}, _callee29);
|
|
1130
1074
|
})));
|
|
1131
|
-
test('select-multi', /*#__PURE__*/
|
|
1075
|
+
test('select-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee30() {
|
|
1132
1076
|
var initial, result;
|
|
1133
|
-
return
|
|
1077
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee30$(_context30) {
|
|
1134
1078
|
while (1) {
|
|
1135
1079
|
switch (_context30.prev = _context30.next) {
|
|
1136
1080
|
case 0:
|
|
@@ -1153,13 +1097,11 @@ describe('fields', function () {
|
|
|
1153
1097
|
};
|
|
1154
1098
|
}
|
|
1155
1099
|
});
|
|
1156
|
-
|
|
1157
1100
|
case 3:
|
|
1158
1101
|
result = _context30.sent;
|
|
1159
|
-
expect(result.find('SelectMultiFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
1102
|
+
expect(result.find('SelectMultiFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1160
1103
|
expect(result.find('SelectMultiFieldMock')).toMatchSnapshot();
|
|
1161
1104
|
result.unmount();
|
|
1162
|
-
|
|
1163
1105
|
case 7:
|
|
1164
1106
|
case "end":
|
|
1165
1107
|
return _context30.stop();
|
|
@@ -1167,9 +1109,9 @@ describe('fields', function () {
|
|
|
1167
1109
|
}
|
|
1168
1110
|
}, _callee30);
|
|
1169
1111
|
})));
|
|
1170
|
-
test('team', /*#__PURE__*/
|
|
1112
|
+
test('team', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee31() {
|
|
1171
1113
|
var initial, result;
|
|
1172
|
-
return
|
|
1114
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee31$(_context31) {
|
|
1173
1115
|
while (1) {
|
|
1174
1116
|
switch (_context31.prev = _context31.next) {
|
|
1175
1117
|
case 0:
|
|
@@ -1189,14 +1131,12 @@ describe('fields', function () {
|
|
|
1189
1131
|
};
|
|
1190
1132
|
}
|
|
1191
1133
|
});
|
|
1192
|
-
|
|
1193
1134
|
case 3:
|
|
1194
1135
|
result = _context31.sent;
|
|
1195
1136
|
// value should be immutable version of initialValue passed in
|
|
1196
|
-
expect(result.find('TeamFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
1137
|
+
expect(result.find('TeamFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1197
1138
|
expect(result.find('TeamFieldMock')).toMatchSnapshot();
|
|
1198
1139
|
result.unmount();
|
|
1199
|
-
|
|
1200
1140
|
case 7:
|
|
1201
1141
|
case "end":
|
|
1202
1142
|
return _context31.stop();
|
|
@@ -1204,9 +1144,9 @@ describe('fields', function () {
|
|
|
1204
1144
|
}
|
|
1205
1145
|
}, _callee31);
|
|
1206
1146
|
})));
|
|
1207
|
-
test('team-multi', /*#__PURE__*/
|
|
1147
|
+
test('team-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee32() {
|
|
1208
1148
|
var initial, result;
|
|
1209
|
-
return
|
|
1149
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee32$(_context32) {
|
|
1210
1150
|
while (1) {
|
|
1211
1151
|
switch (_context32.prev = _context32.next) {
|
|
1212
1152
|
case 0:
|
|
@@ -1229,14 +1169,12 @@ describe('fields', function () {
|
|
|
1229
1169
|
};
|
|
1230
1170
|
}
|
|
1231
1171
|
});
|
|
1232
|
-
|
|
1233
1172
|
case 3:
|
|
1234
1173
|
result = _context32.sent;
|
|
1235
1174
|
// value should be immutable version of initialValue passed in
|
|
1236
|
-
expect(result.find('TeamMultiFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
1175
|
+
expect(result.find('TeamMultiFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1237
1176
|
expect(result.find('TeamMultiFieldMock')).toMatchSnapshot();
|
|
1238
1177
|
result.unmount();
|
|
1239
|
-
|
|
1240
1178
|
case 7:
|
|
1241
1179
|
case "end":
|
|
1242
1180
|
return _context32.stop();
|
|
@@ -1244,9 +1182,9 @@ describe('fields', function () {
|
|
|
1244
1182
|
}
|
|
1245
1183
|
}, _callee32);
|
|
1246
1184
|
})));
|
|
1247
|
-
test('text', /*#__PURE__*/
|
|
1185
|
+
test('text', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee33() {
|
|
1248
1186
|
var initial, result;
|
|
1249
|
-
return
|
|
1187
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee33$(_context33) {
|
|
1250
1188
|
while (1) {
|
|
1251
1189
|
switch (_context33.prev = _context33.next) {
|
|
1252
1190
|
case 0:
|
|
@@ -1263,13 +1201,11 @@ describe('fields', function () {
|
|
|
1263
1201
|
};
|
|
1264
1202
|
}
|
|
1265
1203
|
});
|
|
1266
|
-
|
|
1267
1204
|
case 3:
|
|
1268
1205
|
result = _context33.sent;
|
|
1269
|
-
expect(result.find('TextFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
1206
|
+
expect(result.find('TextFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1270
1207
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1271
1208
|
result.unmount();
|
|
1272
|
-
|
|
1273
1209
|
case 7:
|
|
1274
1210
|
case "end":
|
|
1275
1211
|
return _context33.stop();
|
|
@@ -1277,9 +1213,9 @@ describe('fields', function () {
|
|
|
1277
1213
|
}
|
|
1278
1214
|
}, _callee33);
|
|
1279
1215
|
})));
|
|
1280
|
-
test('text-multi', /*#__PURE__*/
|
|
1216
|
+
test('text-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee34() {
|
|
1281
1217
|
var initial, result;
|
|
1282
|
-
return
|
|
1218
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee34$(_context34) {
|
|
1283
1219
|
while (1) {
|
|
1284
1220
|
switch (_context34.prev = _context34.next) {
|
|
1285
1221
|
case 0:
|
|
@@ -1296,13 +1232,11 @@ describe('fields', function () {
|
|
|
1296
1232
|
};
|
|
1297
1233
|
}
|
|
1298
1234
|
});
|
|
1299
|
-
|
|
1300
1235
|
case 3:
|
|
1301
1236
|
result = _context34.sent;
|
|
1302
|
-
expect(result.find('TextMultiFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
1237
|
+
expect(result.find('TextMultiFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1303
1238
|
expect(result.find('TextMultiFieldMock')).toMatchSnapshot();
|
|
1304
1239
|
result.unmount();
|
|
1305
|
-
|
|
1306
1240
|
case 7:
|
|
1307
1241
|
case "end":
|
|
1308
1242
|
return _context34.stop();
|
|
@@ -1310,9 +1244,9 @@ describe('fields', function () {
|
|
|
1310
1244
|
}
|
|
1311
1245
|
}, _callee34);
|
|
1312
1246
|
})));
|
|
1313
|
-
test('user', /*#__PURE__*/
|
|
1247
|
+
test('user', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee35() {
|
|
1314
1248
|
var initial, result;
|
|
1315
|
-
return
|
|
1249
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee35$(_context35) {
|
|
1316
1250
|
while (1) {
|
|
1317
1251
|
switch (_context35.prev = _context35.next) {
|
|
1318
1252
|
case 0:
|
|
@@ -1331,13 +1265,11 @@ describe('fields', function () {
|
|
|
1331
1265
|
};
|
|
1332
1266
|
}
|
|
1333
1267
|
});
|
|
1334
|
-
|
|
1335
1268
|
case 3:
|
|
1336
1269
|
result = _context35.sent;
|
|
1337
|
-
expect(result.find('UserFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
1270
|
+
expect(result.find('UserFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1338
1271
|
expect(result.find('UserFieldMock')).toMatchSnapshot();
|
|
1339
1272
|
result.unmount();
|
|
1340
|
-
|
|
1341
1273
|
case 7:
|
|
1342
1274
|
case "end":
|
|
1343
1275
|
return _context35.stop();
|
|
@@ -1345,9 +1277,9 @@ describe('fields', function () {
|
|
|
1345
1277
|
}
|
|
1346
1278
|
}, _callee35);
|
|
1347
1279
|
})));
|
|
1348
|
-
test('user-multi', /*#__PURE__*/
|
|
1280
|
+
test('user-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee36() {
|
|
1349
1281
|
var initial, result;
|
|
1350
|
-
return
|
|
1282
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee36$(_context36) {
|
|
1351
1283
|
while (1) {
|
|
1352
1284
|
switch (_context36.prev = _context36.next) {
|
|
1353
1285
|
case 0:
|
|
@@ -1368,13 +1300,11 @@ describe('fields', function () {
|
|
|
1368
1300
|
};
|
|
1369
1301
|
}
|
|
1370
1302
|
});
|
|
1371
|
-
|
|
1372
1303
|
case 3:
|
|
1373
1304
|
result = _context36.sent;
|
|
1374
|
-
expect(result.find('UserMultiFieldMock').prop('value')).toEqual(fromJS(initial));
|
|
1305
|
+
expect(result.find('UserMultiFieldMock').prop('value')).toEqual((0, _immutable.fromJS)(initial));
|
|
1375
1306
|
expect(result.find('UserMultiFieldMock')).toMatchSnapshot();
|
|
1376
1307
|
result.unmount();
|
|
1377
|
-
|
|
1378
1308
|
case 7:
|
|
1379
1309
|
case "end":
|
|
1380
1310
|
return _context36.stop();
|
|
@@ -1385,9 +1315,9 @@ describe('fields', function () {
|
|
|
1385
1315
|
});
|
|
1386
1316
|
});
|
|
1387
1317
|
describe('label', function () {
|
|
1388
|
-
test('given a string value', /*#__PURE__*/
|
|
1318
|
+
test('given a string value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee37() {
|
|
1389
1319
|
var result;
|
|
1390
|
-
return
|
|
1320
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee37$(_context37) {
|
|
1391
1321
|
while (1) {
|
|
1392
1322
|
switch (_context37.prev = _context37.next) {
|
|
1393
1323
|
case 0:
|
|
@@ -1403,12 +1333,10 @@ describe('fields', function () {
|
|
|
1403
1333
|
};
|
|
1404
1334
|
}
|
|
1405
1335
|
});
|
|
1406
|
-
|
|
1407
1336
|
case 2:
|
|
1408
1337
|
result = _context37.sent;
|
|
1409
1338
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1410
1339
|
result.unmount();
|
|
1411
|
-
|
|
1412
1340
|
case 5:
|
|
1413
1341
|
case "end":
|
|
1414
1342
|
return _context37.stop();
|
|
@@ -1416,9 +1344,9 @@ describe('fields', function () {
|
|
|
1416
1344
|
}
|
|
1417
1345
|
}, _callee37);
|
|
1418
1346
|
})));
|
|
1419
|
-
test('given a null value', /*#__PURE__*/
|
|
1347
|
+
test('given a null value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee38() {
|
|
1420
1348
|
var result;
|
|
1421
|
-
return
|
|
1349
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee38$(_context38) {
|
|
1422
1350
|
while (1) {
|
|
1423
1351
|
switch (_context38.prev = _context38.next) {
|
|
1424
1352
|
case 0:
|
|
@@ -1434,12 +1362,10 @@ describe('fields', function () {
|
|
|
1434
1362
|
};
|
|
1435
1363
|
}
|
|
1436
1364
|
});
|
|
1437
|
-
|
|
1438
1365
|
case 2:
|
|
1439
1366
|
result = _context38.sent;
|
|
1440
1367
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1441
1368
|
result.unmount();
|
|
1442
|
-
|
|
1443
1369
|
case 5:
|
|
1444
1370
|
case "end":
|
|
1445
1371
|
return _context38.stop();
|
|
@@ -1447,9 +1373,9 @@ describe('fields', function () {
|
|
|
1447
1373
|
}
|
|
1448
1374
|
}, _callee38);
|
|
1449
1375
|
})));
|
|
1450
|
-
test('given a function value', /*#__PURE__*/
|
|
1376
|
+
test('given a function value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee39() {
|
|
1451
1377
|
var labelFn, result;
|
|
1452
|
-
return
|
|
1378
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee39$(_context39) {
|
|
1453
1379
|
while (1) {
|
|
1454
1380
|
switch (_context39.prev = _context39.next) {
|
|
1455
1381
|
case 0:
|
|
@@ -1469,13 +1395,11 @@ describe('fields', function () {
|
|
|
1469
1395
|
};
|
|
1470
1396
|
}
|
|
1471
1397
|
});
|
|
1472
|
-
|
|
1473
1398
|
case 3:
|
|
1474
1399
|
result = _context39.sent;
|
|
1475
1400
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1476
1401
|
expect(labelFn.mock.calls).toMatchSnapshot();
|
|
1477
1402
|
result.unmount();
|
|
1478
|
-
|
|
1479
1403
|
case 7:
|
|
1480
1404
|
case "end":
|
|
1481
1405
|
return _context39.stop();
|
|
@@ -1485,8 +1409,8 @@ describe('fields', function () {
|
|
|
1485
1409
|
})));
|
|
1486
1410
|
});
|
|
1487
1411
|
describe('language', function () {
|
|
1488
|
-
test('=<<TODO>>=', /*#__PURE__*/
|
|
1489
|
-
return
|
|
1412
|
+
test('=<<TODO>>=', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee40() {
|
|
1413
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee40$(_context40) {
|
|
1490
1414
|
while (1) {
|
|
1491
1415
|
switch (_context40.prev = _context40.next) {
|
|
1492
1416
|
case 0:
|
|
@@ -1498,8 +1422,8 @@ describe('fields', function () {
|
|
|
1498
1422
|
})));
|
|
1499
1423
|
});
|
|
1500
1424
|
describe('name', function () {
|
|
1501
|
-
test('=<<TODO>>=', /*#__PURE__*/
|
|
1502
|
-
return
|
|
1425
|
+
test('=<<TODO>>=', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee41() {
|
|
1426
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee41$(_context41) {
|
|
1503
1427
|
while (1) {
|
|
1504
1428
|
switch (_context41.prev = _context41.next) {
|
|
1505
1429
|
case 0:
|
|
@@ -1511,8 +1435,8 @@ describe('fields', function () {
|
|
|
1511
1435
|
})));
|
|
1512
1436
|
});
|
|
1513
1437
|
describe('onChange', function () {
|
|
1514
|
-
test('=<<TODO>>=', /*#__PURE__*/
|
|
1515
|
-
return
|
|
1438
|
+
test('=<<TODO>>=', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee42() {
|
|
1439
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee42$(_context42) {
|
|
1516
1440
|
while (1) {
|
|
1517
1441
|
switch (_context42.prev = _context42.next) {
|
|
1518
1442
|
case 0:
|
|
@@ -1524,8 +1448,8 @@ describe('fields', function () {
|
|
|
1524
1448
|
})));
|
|
1525
1449
|
});
|
|
1526
1450
|
describe('options', function () {
|
|
1527
|
-
test('=<<TODO>>=', /*#__PURE__*/
|
|
1528
|
-
return
|
|
1451
|
+
test('=<<TODO>>=', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee43() {
|
|
1452
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee43$(_context43) {
|
|
1529
1453
|
while (1) {
|
|
1530
1454
|
switch (_context43.prev = _context43.next) {
|
|
1531
1455
|
case 0:
|
|
@@ -1537,9 +1461,9 @@ describe('fields', function () {
|
|
|
1537
1461
|
})));
|
|
1538
1462
|
});
|
|
1539
1463
|
describe('pattern', function () {
|
|
1540
|
-
test('given regex and matching initialValue', /*#__PURE__*/
|
|
1464
|
+
test('given regex and matching initialValue', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee44() {
|
|
1541
1465
|
var result;
|
|
1542
|
-
return
|
|
1466
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee44$(_context44) {
|
|
1543
1467
|
while (1) {
|
|
1544
1468
|
switch (_context44.prev = _context44.next) {
|
|
1545
1469
|
case 0:
|
|
@@ -1556,19 +1480,18 @@ describe('fields', function () {
|
|
|
1556
1480
|
};
|
|
1557
1481
|
}
|
|
1558
1482
|
});
|
|
1559
|
-
|
|
1560
1483
|
case 2:
|
|
1561
1484
|
result = _context44.sent;
|
|
1562
1485
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1563
1486
|
result.unmount();
|
|
1564
|
-
|
|
1565
1487
|
case 5:
|
|
1566
1488
|
case "end":
|
|
1567
1489
|
return _context44.stop();
|
|
1568
1490
|
}
|
|
1569
1491
|
}
|
|
1570
1492
|
}, _callee44);
|
|
1571
|
-
})));
|
|
1493
|
+
})));
|
|
1494
|
+
// test('given null', async () => {
|
|
1572
1495
|
// const result = await mountForm({
|
|
1573
1496
|
// fields: () => () => [
|
|
1574
1497
|
// {
|
|
@@ -1582,10 +1505,9 @@ describe('fields', function () {
|
|
|
1582
1505
|
// expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1583
1506
|
// result.unmount();
|
|
1584
1507
|
// });
|
|
1585
|
-
|
|
1586
|
-
test('given function that returns regex and matching initialValue', /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45() {
|
|
1508
|
+
test('given function that returns regex and matching initialValue', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee45() {
|
|
1587
1509
|
var patternFn, result;
|
|
1588
|
-
return
|
|
1510
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee45$(_context45) {
|
|
1589
1511
|
while (1) {
|
|
1590
1512
|
switch (_context45.prev = _context45.next) {
|
|
1591
1513
|
case 0:
|
|
@@ -1605,13 +1527,11 @@ describe('fields', function () {
|
|
|
1605
1527
|
};
|
|
1606
1528
|
}
|
|
1607
1529
|
});
|
|
1608
|
-
|
|
1609
1530
|
case 3:
|
|
1610
1531
|
result = _context45.sent;
|
|
1611
1532
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1612
1533
|
expect(patternFn.mock.calls).toMatchSnapshot();
|
|
1613
1534
|
result.unmount();
|
|
1614
|
-
|
|
1615
1535
|
case 7:
|
|
1616
1536
|
case "end":
|
|
1617
1537
|
return _context45.stop();
|
|
@@ -1619,9 +1539,9 @@ describe('fields', function () {
|
|
|
1619
1539
|
}
|
|
1620
1540
|
}, _callee45);
|
|
1621
1541
|
})));
|
|
1622
|
-
test('given function that returns null', /*#__PURE__*/
|
|
1542
|
+
test('given function that returns null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee46() {
|
|
1623
1543
|
var result;
|
|
1624
|
-
return
|
|
1544
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee46$(_context46) {
|
|
1625
1545
|
while (1) {
|
|
1626
1546
|
switch (_context46.prev = _context46.next) {
|
|
1627
1547
|
case 0:
|
|
@@ -1640,12 +1560,10 @@ describe('fields', function () {
|
|
|
1640
1560
|
};
|
|
1641
1561
|
}
|
|
1642
1562
|
});
|
|
1643
|
-
|
|
1644
1563
|
case 2:
|
|
1645
1564
|
result = _context46.sent;
|
|
1646
1565
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1647
1566
|
result.unmount();
|
|
1648
|
-
|
|
1649
1567
|
case 5:
|
|
1650
1568
|
case "end":
|
|
1651
1569
|
return _context46.stop();
|
|
@@ -1655,9 +1573,9 @@ describe('fields', function () {
|
|
|
1655
1573
|
})));
|
|
1656
1574
|
});
|
|
1657
1575
|
describe('patternMessage', function () {
|
|
1658
|
-
test('given trigger and string message', /*#__PURE__*/
|
|
1576
|
+
test('given trigger and string message', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee47() {
|
|
1659
1577
|
var result;
|
|
1660
|
-
return
|
|
1578
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee47$(_context47) {
|
|
1661
1579
|
while (1) {
|
|
1662
1580
|
switch (_context47.prev = _context47.next) {
|
|
1663
1581
|
case 0:
|
|
@@ -1675,12 +1593,10 @@ describe('fields', function () {
|
|
|
1675
1593
|
};
|
|
1676
1594
|
}
|
|
1677
1595
|
});
|
|
1678
|
-
|
|
1679
1596
|
case 2:
|
|
1680
1597
|
result = _context47.sent;
|
|
1681
1598
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1682
1599
|
result.unmount();
|
|
1683
|
-
|
|
1684
1600
|
case 5:
|
|
1685
1601
|
case "end":
|
|
1686
1602
|
return _context47.stop();
|
|
@@ -1688,9 +1604,9 @@ describe('fields', function () {
|
|
|
1688
1604
|
}
|
|
1689
1605
|
}, _callee47);
|
|
1690
1606
|
})));
|
|
1691
|
-
test('given trigger and null message', /*#__PURE__*/
|
|
1607
|
+
test('given trigger and null message', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee48() {
|
|
1692
1608
|
var result;
|
|
1693
|
-
return
|
|
1609
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee48$(_context48) {
|
|
1694
1610
|
while (1) {
|
|
1695
1611
|
switch (_context48.prev = _context48.next) {
|
|
1696
1612
|
case 0:
|
|
@@ -1708,12 +1624,10 @@ describe('fields', function () {
|
|
|
1708
1624
|
};
|
|
1709
1625
|
}
|
|
1710
1626
|
});
|
|
1711
|
-
|
|
1712
1627
|
case 2:
|
|
1713
1628
|
result = _context48.sent;
|
|
1714
1629
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1715
1630
|
result.unmount();
|
|
1716
|
-
|
|
1717
1631
|
case 5:
|
|
1718
1632
|
case "end":
|
|
1719
1633
|
return _context48.stop();
|
|
@@ -1721,9 +1635,9 @@ describe('fields', function () {
|
|
|
1721
1635
|
}
|
|
1722
1636
|
}, _callee48);
|
|
1723
1637
|
})));
|
|
1724
|
-
test('given trigger and message function that returns string', /*#__PURE__*/
|
|
1638
|
+
test('given trigger and message function that returns string', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee49() {
|
|
1725
1639
|
var result;
|
|
1726
|
-
return
|
|
1640
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee49$(_context49) {
|
|
1727
1641
|
while (1) {
|
|
1728
1642
|
switch (_context49.prev = _context49.next) {
|
|
1729
1643
|
case 0:
|
|
@@ -1743,12 +1657,10 @@ describe('fields', function () {
|
|
|
1743
1657
|
};
|
|
1744
1658
|
}
|
|
1745
1659
|
});
|
|
1746
|
-
|
|
1747
1660
|
case 2:
|
|
1748
1661
|
result = _context49.sent;
|
|
1749
1662
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1750
1663
|
result.unmount();
|
|
1751
|
-
|
|
1752
1664
|
case 5:
|
|
1753
1665
|
case "end":
|
|
1754
1666
|
return _context49.stop();
|
|
@@ -1756,9 +1668,9 @@ describe('fields', function () {
|
|
|
1756
1668
|
}
|
|
1757
1669
|
}, _callee49);
|
|
1758
1670
|
})));
|
|
1759
|
-
test('given trigger and message function that returns null', /*#__PURE__*/
|
|
1671
|
+
test('given trigger and message function that returns null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee50() {
|
|
1760
1672
|
var result;
|
|
1761
|
-
return
|
|
1673
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee50$(_context50) {
|
|
1762
1674
|
while (1) {
|
|
1763
1675
|
switch (_context50.prev = _context50.next) {
|
|
1764
1676
|
case 0:
|
|
@@ -1778,12 +1690,10 @@ describe('fields', function () {
|
|
|
1778
1690
|
};
|
|
1779
1691
|
}
|
|
1780
1692
|
});
|
|
1781
|
-
|
|
1782
1693
|
case 2:
|
|
1783
1694
|
result = _context50.sent;
|
|
1784
1695
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1785
1696
|
result.unmount();
|
|
1786
|
-
|
|
1787
1697
|
case 5:
|
|
1788
1698
|
case "end":
|
|
1789
1699
|
return _context50.stop();
|
|
@@ -1791,9 +1701,9 @@ describe('fields', function () {
|
|
|
1791
1701
|
}
|
|
1792
1702
|
}, _callee50);
|
|
1793
1703
|
})));
|
|
1794
|
-
test('given no trigger', /*#__PURE__*/
|
|
1704
|
+
test('given no trigger', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee51() {
|
|
1795
1705
|
var result;
|
|
1796
|
-
return
|
|
1706
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee51$(_context51) {
|
|
1797
1707
|
while (1) {
|
|
1798
1708
|
switch (_context51.prev = _context51.next) {
|
|
1799
1709
|
case 0:
|
|
@@ -1811,12 +1721,10 @@ describe('fields', function () {
|
|
|
1811
1721
|
};
|
|
1812
1722
|
}
|
|
1813
1723
|
});
|
|
1814
|
-
|
|
1815
1724
|
case 2:
|
|
1816
1725
|
result = _context51.sent;
|
|
1817
1726
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1818
1727
|
result.unmount();
|
|
1819
|
-
|
|
1820
1728
|
case 5:
|
|
1821
1729
|
case "end":
|
|
1822
1730
|
return _context51.stop();
|
|
@@ -1826,9 +1734,9 @@ describe('fields', function () {
|
|
|
1826
1734
|
})));
|
|
1827
1735
|
});
|
|
1828
1736
|
describe('placeholder', function () {
|
|
1829
|
-
test('given a string value', /*#__PURE__*/
|
|
1737
|
+
test('given a string value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee52() {
|
|
1830
1738
|
var result;
|
|
1831
|
-
return
|
|
1739
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee52$(_context52) {
|
|
1832
1740
|
while (1) {
|
|
1833
1741
|
switch (_context52.prev = _context52.next) {
|
|
1834
1742
|
case 0:
|
|
@@ -1844,12 +1752,10 @@ describe('fields', function () {
|
|
|
1844
1752
|
};
|
|
1845
1753
|
}
|
|
1846
1754
|
});
|
|
1847
|
-
|
|
1848
1755
|
case 2:
|
|
1849
1756
|
result = _context52.sent;
|
|
1850
1757
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1851
1758
|
result.unmount();
|
|
1852
|
-
|
|
1853
1759
|
case 5:
|
|
1854
1760
|
case "end":
|
|
1855
1761
|
return _context52.stop();
|
|
@@ -1857,9 +1763,9 @@ describe('fields', function () {
|
|
|
1857
1763
|
}
|
|
1858
1764
|
}, _callee52);
|
|
1859
1765
|
})));
|
|
1860
|
-
test('given a null value', /*#__PURE__*/
|
|
1766
|
+
test('given a null value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee53() {
|
|
1861
1767
|
var result;
|
|
1862
|
-
return
|
|
1768
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee53$(_context53) {
|
|
1863
1769
|
while (1) {
|
|
1864
1770
|
switch (_context53.prev = _context53.next) {
|
|
1865
1771
|
case 0:
|
|
@@ -1875,12 +1781,10 @@ describe('fields', function () {
|
|
|
1875
1781
|
};
|
|
1876
1782
|
}
|
|
1877
1783
|
});
|
|
1878
|
-
|
|
1879
1784
|
case 2:
|
|
1880
1785
|
result = _context53.sent;
|
|
1881
1786
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1882
1787
|
result.unmount();
|
|
1883
|
-
|
|
1884
1788
|
case 5:
|
|
1885
1789
|
case "end":
|
|
1886
1790
|
return _context53.stop();
|
|
@@ -1888,9 +1792,9 @@ describe('fields', function () {
|
|
|
1888
1792
|
}
|
|
1889
1793
|
}, _callee53);
|
|
1890
1794
|
})));
|
|
1891
|
-
test('given a function that returns a string value', /*#__PURE__*/
|
|
1795
|
+
test('given a function that returns a string value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee54() {
|
|
1892
1796
|
var placeholderFn, result;
|
|
1893
|
-
return
|
|
1797
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee54$(_context54) {
|
|
1894
1798
|
while (1) {
|
|
1895
1799
|
switch (_context54.prev = _context54.next) {
|
|
1896
1800
|
case 0:
|
|
@@ -1909,13 +1813,11 @@ describe('fields', function () {
|
|
|
1909
1813
|
};
|
|
1910
1814
|
}
|
|
1911
1815
|
});
|
|
1912
|
-
|
|
1913
1816
|
case 3:
|
|
1914
1817
|
result = _context54.sent;
|
|
1915
1818
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1916
1819
|
expect(placeholderFn.mock.calls).toMatchSnapshot();
|
|
1917
1820
|
result.unmount();
|
|
1918
|
-
|
|
1919
1821
|
case 7:
|
|
1920
1822
|
case "end":
|
|
1921
1823
|
return _context54.stop();
|
|
@@ -1923,9 +1825,9 @@ describe('fields', function () {
|
|
|
1923
1825
|
}
|
|
1924
1826
|
}, _callee54);
|
|
1925
1827
|
})));
|
|
1926
|
-
test('given a function that returns a null value', /*#__PURE__*/
|
|
1828
|
+
test('given a function that returns a null value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee55() {
|
|
1927
1829
|
var result;
|
|
1928
|
-
return
|
|
1830
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee55$(_context55) {
|
|
1929
1831
|
while (1) {
|
|
1930
1832
|
switch (_context55.prev = _context55.next) {
|
|
1931
1833
|
case 0:
|
|
@@ -1943,12 +1845,10 @@ describe('fields', function () {
|
|
|
1943
1845
|
};
|
|
1944
1846
|
}
|
|
1945
1847
|
});
|
|
1946
|
-
|
|
1947
1848
|
case 2:
|
|
1948
1849
|
result = _context55.sent;
|
|
1949
1850
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1950
1851
|
result.unmount();
|
|
1951
|
-
|
|
1952
1852
|
case 5:
|
|
1953
1853
|
case "end":
|
|
1954
1854
|
return _context55.stop();
|
|
@@ -1958,8 +1858,8 @@ describe('fields', function () {
|
|
|
1958
1858
|
})));
|
|
1959
1859
|
});
|
|
1960
1860
|
describe('renderAttributes', function () {
|
|
1961
|
-
test('=<<TODO>>=', /*#__PURE__*/
|
|
1962
|
-
return
|
|
1861
|
+
test('=<<TODO>>=', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee56() {
|
|
1862
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee56$(_context56) {
|
|
1963
1863
|
while (1) {
|
|
1964
1864
|
switch (_context56.prev = _context56.next) {
|
|
1965
1865
|
case 0:
|
|
@@ -1971,9 +1871,9 @@ describe('fields', function () {
|
|
|
1971
1871
|
})));
|
|
1972
1872
|
});
|
|
1973
1873
|
describe('required', function () {
|
|
1974
|
-
test('given true', /*#__PURE__*/
|
|
1874
|
+
test('given true', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee57() {
|
|
1975
1875
|
var result;
|
|
1976
|
-
return
|
|
1876
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee57$(_context57) {
|
|
1977
1877
|
while (1) {
|
|
1978
1878
|
switch (_context57.prev = _context57.next) {
|
|
1979
1879
|
case 0:
|
|
@@ -1989,12 +1889,10 @@ describe('fields', function () {
|
|
|
1989
1889
|
};
|
|
1990
1890
|
}
|
|
1991
1891
|
});
|
|
1992
|
-
|
|
1993
1892
|
case 2:
|
|
1994
1893
|
result = _context57.sent;
|
|
1995
1894
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
1996
1895
|
result.unmount();
|
|
1997
|
-
|
|
1998
1896
|
case 5:
|
|
1999
1897
|
case "end":
|
|
2000
1898
|
return _context57.stop();
|
|
@@ -2002,9 +1900,9 @@ describe('fields', function () {
|
|
|
2002
1900
|
}
|
|
2003
1901
|
}, _callee57);
|
|
2004
1902
|
})));
|
|
2005
|
-
test('given false', /*#__PURE__*/
|
|
1903
|
+
test('given false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee58() {
|
|
2006
1904
|
var result;
|
|
2007
|
-
return
|
|
1905
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee58$(_context58) {
|
|
2008
1906
|
while (1) {
|
|
2009
1907
|
switch (_context58.prev = _context58.next) {
|
|
2010
1908
|
case 0:
|
|
@@ -2020,12 +1918,10 @@ describe('fields', function () {
|
|
|
2020
1918
|
};
|
|
2021
1919
|
}
|
|
2022
1920
|
});
|
|
2023
|
-
|
|
2024
1921
|
case 2:
|
|
2025
1922
|
result = _context58.sent;
|
|
2026
1923
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2027
1924
|
result.unmount();
|
|
2028
|
-
|
|
2029
1925
|
case 5:
|
|
2030
1926
|
case "end":
|
|
2031
1927
|
return _context58.stop();
|
|
@@ -2033,9 +1929,9 @@ describe('fields', function () {
|
|
|
2033
1929
|
}
|
|
2034
1930
|
}, _callee58);
|
|
2035
1931
|
})));
|
|
2036
|
-
test('has value', /*#__PURE__*/
|
|
1932
|
+
test('has value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee59() {
|
|
2037
1933
|
var result;
|
|
2038
|
-
return
|
|
1934
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee59$(_context59) {
|
|
2039
1935
|
while (1) {
|
|
2040
1936
|
switch (_context59.prev = _context59.next) {
|
|
2041
1937
|
case 0:
|
|
@@ -2052,12 +1948,10 @@ describe('fields', function () {
|
|
|
2052
1948
|
};
|
|
2053
1949
|
}
|
|
2054
1950
|
});
|
|
2055
|
-
|
|
2056
1951
|
case 2:
|
|
2057
1952
|
result = _context59.sent;
|
|
2058
1953
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2059
1954
|
result.unmount();
|
|
2060
|
-
|
|
2061
1955
|
case 5:
|
|
2062
1956
|
case "end":
|
|
2063
1957
|
return _context59.stop();
|
|
@@ -2065,9 +1959,9 @@ describe('fields', function () {
|
|
|
2065
1959
|
}
|
|
2066
1960
|
}, _callee59);
|
|
2067
1961
|
})));
|
|
2068
|
-
test('given function that returns true', /*#__PURE__*/
|
|
1962
|
+
test('given function that returns true', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee60() {
|
|
2069
1963
|
var requiredFn, result;
|
|
2070
|
-
return
|
|
1964
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee60$(_context60) {
|
|
2071
1965
|
while (1) {
|
|
2072
1966
|
switch (_context60.prev = _context60.next) {
|
|
2073
1967
|
case 0:
|
|
@@ -2086,14 +1980,12 @@ describe('fields', function () {
|
|
|
2086
1980
|
};
|
|
2087
1981
|
}
|
|
2088
1982
|
});
|
|
2089
|
-
|
|
2090
1983
|
case 3:
|
|
2091
1984
|
result = _context60.sent;
|
|
2092
1985
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2093
1986
|
expect(requiredFn.mock.calls).toMatchSnapshot();
|
|
2094
1987
|
expect(requiredFn.mock.calls).toMatchSnapshot();
|
|
2095
1988
|
result.unmount();
|
|
2096
|
-
|
|
2097
1989
|
case 8:
|
|
2098
1990
|
case "end":
|
|
2099
1991
|
return _context60.stop();
|
|
@@ -2101,9 +1993,9 @@ describe('fields', function () {
|
|
|
2101
1993
|
}
|
|
2102
1994
|
}, _callee60);
|
|
2103
1995
|
})));
|
|
2104
|
-
test('given function that returns false', /*#__PURE__*/
|
|
1996
|
+
test('given function that returns false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee61() {
|
|
2105
1997
|
var result;
|
|
2106
|
-
return
|
|
1998
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee61$(_context61) {
|
|
2107
1999
|
while (1) {
|
|
2108
2000
|
switch (_context61.prev = _context61.next) {
|
|
2109
2001
|
case 0:
|
|
@@ -2121,12 +2013,10 @@ describe('fields', function () {
|
|
|
2121
2013
|
};
|
|
2122
2014
|
}
|
|
2123
2015
|
});
|
|
2124
|
-
|
|
2125
2016
|
case 2:
|
|
2126
2017
|
result = _context61.sent;
|
|
2127
2018
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2128
2019
|
result.unmount();
|
|
2129
|
-
|
|
2130
2020
|
case 5:
|
|
2131
2021
|
case "end":
|
|
2132
2022
|
return _context61.stop();
|
|
@@ -2134,9 +2024,9 @@ describe('fields', function () {
|
|
|
2134
2024
|
}
|
|
2135
2025
|
}, _callee61);
|
|
2136
2026
|
})));
|
|
2137
|
-
test('given function that returns null', /*#__PURE__*/
|
|
2027
|
+
test('given function that returns null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee62() {
|
|
2138
2028
|
var result;
|
|
2139
|
-
return
|
|
2029
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee62$(_context62) {
|
|
2140
2030
|
while (1) {
|
|
2141
2031
|
switch (_context62.prev = _context62.next) {
|
|
2142
2032
|
case 0:
|
|
@@ -2154,12 +2044,10 @@ describe('fields', function () {
|
|
|
2154
2044
|
};
|
|
2155
2045
|
}
|
|
2156
2046
|
});
|
|
2157
|
-
|
|
2158
2047
|
case 2:
|
|
2159
2048
|
result = _context62.sent;
|
|
2160
2049
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2161
2050
|
result.unmount();
|
|
2162
|
-
|
|
2163
2051
|
case 5:
|
|
2164
2052
|
case "end":
|
|
2165
2053
|
return _context62.stop();
|
|
@@ -2169,9 +2057,9 @@ describe('fields', function () {
|
|
|
2169
2057
|
})));
|
|
2170
2058
|
});
|
|
2171
2059
|
describe('requiredMessage', function () {
|
|
2172
|
-
test('given trigger and string message', /*#__PURE__*/
|
|
2060
|
+
test('given trigger and string message', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee63() {
|
|
2173
2061
|
var result;
|
|
2174
|
-
return
|
|
2062
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee63$(_context63) {
|
|
2175
2063
|
while (1) {
|
|
2176
2064
|
switch (_context63.prev = _context63.next) {
|
|
2177
2065
|
case 0:
|
|
@@ -2189,12 +2077,10 @@ describe('fields', function () {
|
|
|
2189
2077
|
};
|
|
2190
2078
|
}
|
|
2191
2079
|
});
|
|
2192
|
-
|
|
2193
2080
|
case 2:
|
|
2194
2081
|
result = _context63.sent;
|
|
2195
2082
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2196
2083
|
result.unmount();
|
|
2197
|
-
|
|
2198
2084
|
case 5:
|
|
2199
2085
|
case "end":
|
|
2200
2086
|
return _context63.stop();
|
|
@@ -2202,9 +2088,9 @@ describe('fields', function () {
|
|
|
2202
2088
|
}
|
|
2203
2089
|
}, _callee63);
|
|
2204
2090
|
})));
|
|
2205
|
-
test('given trigger and null message', /*#__PURE__*/
|
|
2091
|
+
test('given trigger and null message', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee64() {
|
|
2206
2092
|
var result;
|
|
2207
|
-
return
|
|
2093
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee64$(_context64) {
|
|
2208
2094
|
while (1) {
|
|
2209
2095
|
switch (_context64.prev = _context64.next) {
|
|
2210
2096
|
case 0:
|
|
@@ -2222,12 +2108,10 @@ describe('fields', function () {
|
|
|
2222
2108
|
};
|
|
2223
2109
|
}
|
|
2224
2110
|
});
|
|
2225
|
-
|
|
2226
2111
|
case 2:
|
|
2227
2112
|
result = _context64.sent;
|
|
2228
2113
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2229
2114
|
result.unmount();
|
|
2230
|
-
|
|
2231
2115
|
case 5:
|
|
2232
2116
|
case "end":
|
|
2233
2117
|
return _context64.stop();
|
|
@@ -2235,9 +2119,9 @@ describe('fields', function () {
|
|
|
2235
2119
|
}
|
|
2236
2120
|
}, _callee64);
|
|
2237
2121
|
})));
|
|
2238
|
-
test('given trigger and message function that returns string', /*#__PURE__*/
|
|
2122
|
+
test('given trigger and message function that returns string', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee65() {
|
|
2239
2123
|
var result;
|
|
2240
|
-
return
|
|
2124
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee65$(_context65) {
|
|
2241
2125
|
while (1) {
|
|
2242
2126
|
switch (_context65.prev = _context65.next) {
|
|
2243
2127
|
case 0:
|
|
@@ -2257,12 +2141,10 @@ describe('fields', function () {
|
|
|
2257
2141
|
};
|
|
2258
2142
|
}
|
|
2259
2143
|
});
|
|
2260
|
-
|
|
2261
2144
|
case 2:
|
|
2262
2145
|
result = _context65.sent;
|
|
2263
2146
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2264
2147
|
result.unmount();
|
|
2265
|
-
|
|
2266
2148
|
case 5:
|
|
2267
2149
|
case "end":
|
|
2268
2150
|
return _context65.stop();
|
|
@@ -2270,9 +2152,9 @@ describe('fields', function () {
|
|
|
2270
2152
|
}
|
|
2271
2153
|
}, _callee65);
|
|
2272
2154
|
})));
|
|
2273
|
-
test('given trigger and message function that returns null', /*#__PURE__*/
|
|
2155
|
+
test('given trigger and message function that returns null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee66() {
|
|
2274
2156
|
var result;
|
|
2275
|
-
return
|
|
2157
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee66$(_context66) {
|
|
2276
2158
|
while (1) {
|
|
2277
2159
|
switch (_context66.prev = _context66.next) {
|
|
2278
2160
|
case 0:
|
|
@@ -2292,12 +2174,10 @@ describe('fields', function () {
|
|
|
2292
2174
|
};
|
|
2293
2175
|
}
|
|
2294
2176
|
});
|
|
2295
|
-
|
|
2296
2177
|
case 2:
|
|
2297
2178
|
result = _context66.sent;
|
|
2298
2179
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2299
2180
|
result.unmount();
|
|
2300
|
-
|
|
2301
2181
|
case 5:
|
|
2302
2182
|
case "end":
|
|
2303
2183
|
return _context66.stop();
|
|
@@ -2305,9 +2185,9 @@ describe('fields', function () {
|
|
|
2305
2185
|
}
|
|
2306
2186
|
}, _callee66);
|
|
2307
2187
|
})));
|
|
2308
|
-
test('given no trigger', /*#__PURE__*/
|
|
2188
|
+
test('given no trigger', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee67() {
|
|
2309
2189
|
var result;
|
|
2310
|
-
return
|
|
2190
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee67$(_context67) {
|
|
2311
2191
|
while (1) {
|
|
2312
2192
|
switch (_context67.prev = _context67.next) {
|
|
2313
2193
|
case 0:
|
|
@@ -2325,12 +2205,10 @@ describe('fields', function () {
|
|
|
2325
2205
|
};
|
|
2326
2206
|
}
|
|
2327
2207
|
});
|
|
2328
|
-
|
|
2329
2208
|
case 2:
|
|
2330
2209
|
result = _context67.sent;
|
|
2331
2210
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2332
2211
|
result.unmount();
|
|
2333
|
-
|
|
2334
2212
|
case 5:
|
|
2335
2213
|
case "end":
|
|
2336
2214
|
return _context67.stop();
|
|
@@ -2340,8 +2218,8 @@ describe('fields', function () {
|
|
|
2340
2218
|
})));
|
|
2341
2219
|
});
|
|
2342
2220
|
describe('search', function () {
|
|
2343
|
-
test('=<<TODO>>=', /*#__PURE__*/
|
|
2344
|
-
return
|
|
2221
|
+
test('=<<TODO>>=', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee68() {
|
|
2222
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee68$(_context68) {
|
|
2345
2223
|
while (1) {
|
|
2346
2224
|
switch (_context68.prev = _context68.next) {
|
|
2347
2225
|
case 0:
|
|
@@ -2353,8 +2231,8 @@ describe('fields', function () {
|
|
|
2353
2231
|
})));
|
|
2354
2232
|
});
|
|
2355
2233
|
describe('serialize', function () {
|
|
2356
|
-
test('=<<TODO>>=', /*#__PURE__*/
|
|
2357
|
-
return
|
|
2234
|
+
test('=<<TODO>>=', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee69() {
|
|
2235
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee69$(_context69) {
|
|
2358
2236
|
while (1) {
|
|
2359
2237
|
switch (_context69.prev = _context69.next) {
|
|
2360
2238
|
case 0:
|
|
@@ -2366,9 +2244,9 @@ describe('fields', function () {
|
|
|
2366
2244
|
})));
|
|
2367
2245
|
});
|
|
2368
2246
|
describe('transient', function () {
|
|
2369
|
-
test('given true', /*#__PURE__*/
|
|
2247
|
+
test('given true', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee70() {
|
|
2370
2248
|
var result;
|
|
2371
|
-
return
|
|
2249
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee70$(_context70) {
|
|
2372
2250
|
while (1) {
|
|
2373
2251
|
switch (_context70.prev = _context70.next) {
|
|
2374
2252
|
case 0:
|
|
@@ -2384,12 +2262,10 @@ describe('fields', function () {
|
|
|
2384
2262
|
};
|
|
2385
2263
|
}
|
|
2386
2264
|
});
|
|
2387
|
-
|
|
2388
2265
|
case 2:
|
|
2389
2266
|
result = _context70.sent;
|
|
2390
2267
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2391
2268
|
result.unmount();
|
|
2392
|
-
|
|
2393
2269
|
case 5:
|
|
2394
2270
|
case "end":
|
|
2395
2271
|
return _context70.stop();
|
|
@@ -2397,9 +2273,9 @@ describe('fields', function () {
|
|
|
2397
2273
|
}
|
|
2398
2274
|
}, _callee70);
|
|
2399
2275
|
})));
|
|
2400
|
-
test('given false', /*#__PURE__*/
|
|
2276
|
+
test('given false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee71() {
|
|
2401
2277
|
var result;
|
|
2402
|
-
return
|
|
2278
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee71$(_context71) {
|
|
2403
2279
|
while (1) {
|
|
2404
2280
|
switch (_context71.prev = _context71.next) {
|
|
2405
2281
|
case 0:
|
|
@@ -2415,12 +2291,10 @@ describe('fields', function () {
|
|
|
2415
2291
|
};
|
|
2416
2292
|
}
|
|
2417
2293
|
});
|
|
2418
|
-
|
|
2419
2294
|
case 2:
|
|
2420
2295
|
result = _context71.sent;
|
|
2421
2296
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2422
2297
|
result.unmount();
|
|
2423
|
-
|
|
2424
2298
|
case 5:
|
|
2425
2299
|
case "end":
|
|
2426
2300
|
return _context71.stop();
|
|
@@ -2428,9 +2302,9 @@ describe('fields', function () {
|
|
|
2428
2302
|
}
|
|
2429
2303
|
}, _callee71);
|
|
2430
2304
|
})));
|
|
2431
|
-
test('given a string value', /*#__PURE__*/
|
|
2305
|
+
test('given a string value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee72() {
|
|
2432
2306
|
var result;
|
|
2433
|
-
return
|
|
2307
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee72$(_context72) {
|
|
2434
2308
|
while (1) {
|
|
2435
2309
|
switch (_context72.prev = _context72.next) {
|
|
2436
2310
|
case 0:
|
|
@@ -2446,12 +2320,10 @@ describe('fields', function () {
|
|
|
2446
2320
|
};
|
|
2447
2321
|
}
|
|
2448
2322
|
});
|
|
2449
|
-
|
|
2450
2323
|
case 2:
|
|
2451
2324
|
result = _context72.sent;
|
|
2452
2325
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2453
2326
|
result.unmount();
|
|
2454
|
-
|
|
2455
2327
|
case 5:
|
|
2456
2328
|
case "end":
|
|
2457
2329
|
return _context72.stop();
|
|
@@ -2459,9 +2331,9 @@ describe('fields', function () {
|
|
|
2459
2331
|
}
|
|
2460
2332
|
}, _callee72);
|
|
2461
2333
|
})));
|
|
2462
|
-
test('given a null value', /*#__PURE__*/
|
|
2334
|
+
test('given a null value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee73() {
|
|
2463
2335
|
var result;
|
|
2464
|
-
return
|
|
2336
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee73$(_context73) {
|
|
2465
2337
|
while (1) {
|
|
2466
2338
|
switch (_context73.prev = _context73.next) {
|
|
2467
2339
|
case 0:
|
|
@@ -2477,12 +2349,10 @@ describe('fields', function () {
|
|
|
2477
2349
|
};
|
|
2478
2350
|
}
|
|
2479
2351
|
});
|
|
2480
|
-
|
|
2481
2352
|
case 2:
|
|
2482
2353
|
result = _context73.sent;
|
|
2483
2354
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2484
2355
|
result.unmount();
|
|
2485
|
-
|
|
2486
2356
|
case 5:
|
|
2487
2357
|
case "end":
|
|
2488
2358
|
return _context73.stop();
|
|
@@ -2490,9 +2360,9 @@ describe('fields', function () {
|
|
|
2490
2360
|
}
|
|
2491
2361
|
}, _callee73);
|
|
2492
2362
|
})));
|
|
2493
|
-
test('given function that returns true', /*#__PURE__*/
|
|
2363
|
+
test('given function that returns true', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee74() {
|
|
2494
2364
|
var transientFn, result;
|
|
2495
|
-
return
|
|
2365
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee74$(_context74) {
|
|
2496
2366
|
while (1) {
|
|
2497
2367
|
switch (_context74.prev = _context74.next) {
|
|
2498
2368
|
case 0:
|
|
@@ -2511,13 +2381,11 @@ describe('fields', function () {
|
|
|
2511
2381
|
};
|
|
2512
2382
|
}
|
|
2513
2383
|
});
|
|
2514
|
-
|
|
2515
2384
|
case 3:
|
|
2516
2385
|
result = _context74.sent;
|
|
2517
2386
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2518
2387
|
expect(transientFn.mock.calls).toMatchSnapshot();
|
|
2519
2388
|
result.unmount();
|
|
2520
|
-
|
|
2521
2389
|
case 7:
|
|
2522
2390
|
case "end":
|
|
2523
2391
|
return _context74.stop();
|
|
@@ -2525,9 +2393,9 @@ describe('fields', function () {
|
|
|
2525
2393
|
}
|
|
2526
2394
|
}, _callee74);
|
|
2527
2395
|
})));
|
|
2528
|
-
test('given function that returns false', /*#__PURE__*/
|
|
2396
|
+
test('given function that returns false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee75() {
|
|
2529
2397
|
var result;
|
|
2530
|
-
return
|
|
2398
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee75$(_context75) {
|
|
2531
2399
|
while (1) {
|
|
2532
2400
|
switch (_context75.prev = _context75.next) {
|
|
2533
2401
|
case 0:
|
|
@@ -2545,12 +2413,10 @@ describe('fields', function () {
|
|
|
2545
2413
|
};
|
|
2546
2414
|
}
|
|
2547
2415
|
});
|
|
2548
|
-
|
|
2549
2416
|
case 2:
|
|
2550
2417
|
result = _context75.sent;
|
|
2551
2418
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2552
2419
|
result.unmount();
|
|
2553
|
-
|
|
2554
2420
|
case 5:
|
|
2555
2421
|
case "end":
|
|
2556
2422
|
return _context75.stop();
|
|
@@ -2558,9 +2424,9 @@ describe('fields', function () {
|
|
|
2558
2424
|
}
|
|
2559
2425
|
}, _callee75);
|
|
2560
2426
|
})));
|
|
2561
|
-
test('given function that returns null', /*#__PURE__*/
|
|
2427
|
+
test('given function that returns null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee76() {
|
|
2562
2428
|
var result;
|
|
2563
|
-
return
|
|
2429
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee76$(_context76) {
|
|
2564
2430
|
while (1) {
|
|
2565
2431
|
switch (_context76.prev = _context76.next) {
|
|
2566
2432
|
case 0:
|
|
@@ -2578,12 +2444,10 @@ describe('fields', function () {
|
|
|
2578
2444
|
};
|
|
2579
2445
|
}
|
|
2580
2446
|
});
|
|
2581
|
-
|
|
2582
2447
|
case 2:
|
|
2583
2448
|
result = _context76.sent;
|
|
2584
2449
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
2585
2450
|
result.unmount();
|
|
2586
|
-
|
|
2587
2451
|
case 5:
|
|
2588
2452
|
case "end":
|
|
2589
2453
|
return _context76.stop();
|
|
@@ -2594,9 +2458,9 @@ describe('fields', function () {
|
|
|
2594
2458
|
});
|
|
2595
2459
|
describe('type', function () {
|
|
2596
2460
|
describe('attributes', function () {
|
|
2597
|
-
test('minimal', /*#__PURE__*/
|
|
2461
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee77() {
|
|
2598
2462
|
var result;
|
|
2599
|
-
return
|
|
2463
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee77$(_context77) {
|
|
2600
2464
|
while (1) {
|
|
2601
2465
|
switch (_context77.prev = _context77.next) {
|
|
2602
2466
|
case 0:
|
|
@@ -2611,14 +2475,12 @@ describe('fields', function () {
|
|
|
2611
2475
|
};
|
|
2612
2476
|
}
|
|
2613
2477
|
});
|
|
2614
|
-
|
|
2615
2478
|
case 2:
|
|
2616
2479
|
result = _context77.sent;
|
|
2617
2480
|
// options should default to an empty list
|
|
2618
2481
|
// value should default to empty map
|
|
2619
2482
|
expect(result.find('AttributesFieldMock')).toMatchSnapshot();
|
|
2620
2483
|
result.unmount();
|
|
2621
|
-
|
|
2622
2484
|
case 5:
|
|
2623
2485
|
case "end":
|
|
2624
2486
|
return _context77.stop();
|
|
@@ -2626,8 +2488,8 @@ describe('fields', function () {
|
|
|
2626
2488
|
}
|
|
2627
2489
|
}, _callee77);
|
|
2628
2490
|
})));
|
|
2629
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
2630
|
-
return
|
|
2491
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee78() {
|
|
2492
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee78$(_context78) {
|
|
2631
2493
|
while (1) {
|
|
2632
2494
|
switch (_context78.prev = _context78.next) {
|
|
2633
2495
|
case 0:
|
|
@@ -2637,8 +2499,8 @@ describe('fields', function () {
|
|
|
2637
2499
|
}
|
|
2638
2500
|
}, _callee78);
|
|
2639
2501
|
})));
|
|
2640
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
2641
|
-
return
|
|
2502
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee79() {
|
|
2503
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee79$(_context79) {
|
|
2642
2504
|
while (1) {
|
|
2643
2505
|
switch (_context79.prev = _context79.next) {
|
|
2644
2506
|
case 0:
|
|
@@ -2648,8 +2510,8 @@ describe('fields', function () {
|
|
|
2648
2510
|
}
|
|
2649
2511
|
}, _callee79);
|
|
2650
2512
|
})));
|
|
2651
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
2652
|
-
return
|
|
2513
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee80() {
|
|
2514
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee80$(_context80) {
|
|
2653
2515
|
while (1) {
|
|
2654
2516
|
switch (_context80.prev = _context80.next) {
|
|
2655
2517
|
case 0:
|
|
@@ -2661,9 +2523,9 @@ describe('fields', function () {
|
|
|
2661
2523
|
})));
|
|
2662
2524
|
});
|
|
2663
2525
|
describe('checkbox', function () {
|
|
2664
|
-
test('minimal', /*#__PURE__*/
|
|
2526
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee81() {
|
|
2665
2527
|
var result;
|
|
2666
|
-
return
|
|
2528
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee81$(_context81) {
|
|
2667
2529
|
while (1) {
|
|
2668
2530
|
switch (_context81.prev = _context81.next) {
|
|
2669
2531
|
case 0:
|
|
@@ -2678,13 +2540,11 @@ describe('fields', function () {
|
|
|
2678
2540
|
};
|
|
2679
2541
|
}
|
|
2680
2542
|
});
|
|
2681
|
-
|
|
2682
2543
|
case 2:
|
|
2683
2544
|
result = _context81.sent;
|
|
2684
2545
|
// value should default to false
|
|
2685
2546
|
expect(result.find('CheckboxFieldMock')).toMatchSnapshot();
|
|
2686
2547
|
result.unmount();
|
|
2687
|
-
|
|
2688
2548
|
case 5:
|
|
2689
2549
|
case "end":
|
|
2690
2550
|
return _context81.stop();
|
|
@@ -2692,8 +2552,8 @@ describe('fields', function () {
|
|
|
2692
2552
|
}
|
|
2693
2553
|
}, _callee81);
|
|
2694
2554
|
})));
|
|
2695
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
2696
|
-
return
|
|
2555
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee82() {
|
|
2556
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee82$(_context82) {
|
|
2697
2557
|
while (1) {
|
|
2698
2558
|
switch (_context82.prev = _context82.next) {
|
|
2699
2559
|
case 0:
|
|
@@ -2705,9 +2565,9 @@ describe('fields', function () {
|
|
|
2705
2565
|
})));
|
|
2706
2566
|
});
|
|
2707
2567
|
describe('code', function () {
|
|
2708
|
-
test('minimal', /*#__PURE__*/
|
|
2568
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee83() {
|
|
2709
2569
|
var result;
|
|
2710
|
-
return
|
|
2570
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee83$(_context83) {
|
|
2711
2571
|
while (1) {
|
|
2712
2572
|
switch (_context83.prev = _context83.next) {
|
|
2713
2573
|
case 0:
|
|
@@ -2722,14 +2582,12 @@ describe('fields', function () {
|
|
|
2722
2582
|
};
|
|
2723
2583
|
}
|
|
2724
2584
|
});
|
|
2725
|
-
|
|
2726
2585
|
case 2:
|
|
2727
2586
|
result = _context83.sent;
|
|
2728
2587
|
// options should default to an empty list and language should be passed
|
|
2729
2588
|
// value should default to empty string
|
|
2730
2589
|
expect(result.find('CodeFieldMock')).toMatchSnapshot();
|
|
2731
2590
|
result.unmount();
|
|
2732
|
-
|
|
2733
2591
|
case 5:
|
|
2734
2592
|
case "end":
|
|
2735
2593
|
return _context83.stop();
|
|
@@ -2737,8 +2595,8 @@ describe('fields', function () {
|
|
|
2737
2595
|
}
|
|
2738
2596
|
}, _callee83);
|
|
2739
2597
|
})));
|
|
2740
|
-
test('=<<TODO>>= valid language', /*#__PURE__*/
|
|
2741
|
-
return
|
|
2598
|
+
test('=<<TODO>>= valid language', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee84() {
|
|
2599
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee84$(_context84) {
|
|
2742
2600
|
while (1) {
|
|
2743
2601
|
switch (_context84.prev = _context84.next) {
|
|
2744
2602
|
case 0:
|
|
@@ -2748,8 +2606,8 @@ describe('fields', function () {
|
|
|
2748
2606
|
}
|
|
2749
2607
|
}, _callee84);
|
|
2750
2608
|
})));
|
|
2751
|
-
test('=<<TODO>>= invalid language', /*#__PURE__*/
|
|
2752
|
-
return
|
|
2609
|
+
test('=<<TODO>>= invalid language', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee85() {
|
|
2610
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee85$(_context85) {
|
|
2753
2611
|
while (1) {
|
|
2754
2612
|
switch (_context85.prev = _context85.next) {
|
|
2755
2613
|
case 0:
|
|
@@ -2759,8 +2617,8 @@ describe('fields', function () {
|
|
|
2759
2617
|
}
|
|
2760
2618
|
}, _callee85);
|
|
2761
2619
|
})));
|
|
2762
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
2763
|
-
return
|
|
2620
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee86() {
|
|
2621
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee86$(_context86) {
|
|
2764
2622
|
while (1) {
|
|
2765
2623
|
switch (_context86.prev = _context86.next) {
|
|
2766
2624
|
case 0:
|
|
@@ -2770,8 +2628,8 @@ describe('fields', function () {
|
|
|
2770
2628
|
}
|
|
2771
2629
|
}, _callee86);
|
|
2772
2630
|
})));
|
|
2773
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
2774
|
-
return
|
|
2631
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee87() {
|
|
2632
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee87$(_context87) {
|
|
2775
2633
|
while (1) {
|
|
2776
2634
|
switch (_context87.prev = _context87.next) {
|
|
2777
2635
|
case 0:
|
|
@@ -2781,8 +2639,8 @@ describe('fields', function () {
|
|
|
2781
2639
|
}
|
|
2782
2640
|
}, _callee87);
|
|
2783
2641
|
})));
|
|
2784
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
2785
|
-
return
|
|
2642
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee88() {
|
|
2643
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee88$(_context88) {
|
|
2786
2644
|
while (1) {
|
|
2787
2645
|
switch (_context88.prev = _context88.next) {
|
|
2788
2646
|
case 0:
|
|
@@ -2809,8 +2667,9 @@ describe('fields', function () {
|
|
|
2809
2667
|
// expect(result.find('FormFieldMock')).toMatchSnapshot();
|
|
2810
2668
|
// result.unmount();
|
|
2811
2669
|
// });
|
|
2812
|
-
|
|
2813
|
-
|
|
2670
|
+
|
|
2671
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee89() {
|
|
2672
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee89$(_context89) {
|
|
2814
2673
|
while (1) {
|
|
2815
2674
|
switch (_context89.prev = _context89.next) {
|
|
2816
2675
|
case 0:
|
|
@@ -2820,8 +2679,8 @@ describe('fields', function () {
|
|
|
2820
2679
|
}
|
|
2821
2680
|
}, _callee89);
|
|
2822
2681
|
})));
|
|
2823
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
2824
|
-
return
|
|
2682
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee90() {
|
|
2683
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee90$(_context90) {
|
|
2825
2684
|
while (1) {
|
|
2826
2685
|
switch (_context90.prev = _context90.next) {
|
|
2827
2686
|
case 0:
|
|
@@ -2831,8 +2690,8 @@ describe('fields', function () {
|
|
|
2831
2690
|
}
|
|
2832
2691
|
}, _callee90);
|
|
2833
2692
|
})));
|
|
2834
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
2835
|
-
return
|
|
2693
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee91() {
|
|
2694
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee91$(_context91) {
|
|
2836
2695
|
while (1) {
|
|
2837
2696
|
switch (_context91.prev = _context91.next) {
|
|
2838
2697
|
case 0:
|
|
@@ -2842,8 +2701,8 @@ describe('fields', function () {
|
|
|
2842
2701
|
}
|
|
2843
2702
|
}, _callee91);
|
|
2844
2703
|
})));
|
|
2845
|
-
test('=<<TODO>>= valid search', /*#__PURE__*/
|
|
2846
|
-
return
|
|
2704
|
+
test('=<<TODO>>= valid search', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee92() {
|
|
2705
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee92$(_context92) {
|
|
2847
2706
|
while (1) {
|
|
2848
2707
|
switch (_context92.prev = _context92.next) {
|
|
2849
2708
|
case 0:
|
|
@@ -2853,8 +2712,8 @@ describe('fields', function () {
|
|
|
2853
2712
|
}
|
|
2854
2713
|
}, _callee92);
|
|
2855
2714
|
})));
|
|
2856
|
-
test('=<<TODO>>= invalid search', /*#__PURE__*/
|
|
2857
|
-
return
|
|
2715
|
+
test('=<<TODO>>= invalid search', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee93() {
|
|
2716
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee93$(_context93) {
|
|
2858
2717
|
while (1) {
|
|
2859
2718
|
switch (_context93.prev = _context93.next) {
|
|
2860
2719
|
case 0:
|
|
@@ -2881,8 +2740,9 @@ describe('fields', function () {
|
|
|
2881
2740
|
// expect(result.find('FormMultiFieldMock')).toMatchSnapshot();
|
|
2882
2741
|
// result.unmount();
|
|
2883
2742
|
// });
|
|
2884
|
-
|
|
2885
|
-
|
|
2743
|
+
|
|
2744
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee94() {
|
|
2745
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee94$(_context94) {
|
|
2886
2746
|
while (1) {
|
|
2887
2747
|
switch (_context94.prev = _context94.next) {
|
|
2888
2748
|
case 0:
|
|
@@ -2892,8 +2752,8 @@ describe('fields', function () {
|
|
|
2892
2752
|
}
|
|
2893
2753
|
}, _callee94);
|
|
2894
2754
|
})));
|
|
2895
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
2896
|
-
return
|
|
2755
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee95() {
|
|
2756
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee95$(_context95) {
|
|
2897
2757
|
while (1) {
|
|
2898
2758
|
switch (_context95.prev = _context95.next) {
|
|
2899
2759
|
case 0:
|
|
@@ -2903,8 +2763,8 @@ describe('fields', function () {
|
|
|
2903
2763
|
}
|
|
2904
2764
|
}, _callee95);
|
|
2905
2765
|
})));
|
|
2906
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
2907
|
-
return
|
|
2766
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee96() {
|
|
2767
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee96$(_context96) {
|
|
2908
2768
|
while (1) {
|
|
2909
2769
|
switch (_context96.prev = _context96.next) {
|
|
2910
2770
|
case 0:
|
|
@@ -2914,8 +2774,8 @@ describe('fields', function () {
|
|
|
2914
2774
|
}
|
|
2915
2775
|
}, _callee96);
|
|
2916
2776
|
})));
|
|
2917
|
-
test('=<<TODO>>= valid search', /*#__PURE__*/
|
|
2918
|
-
return
|
|
2777
|
+
test('=<<TODO>>= valid search', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee97() {
|
|
2778
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee97$(_context97) {
|
|
2919
2779
|
while (1) {
|
|
2920
2780
|
switch (_context97.prev = _context97.next) {
|
|
2921
2781
|
case 0:
|
|
@@ -2925,8 +2785,8 @@ describe('fields', function () {
|
|
|
2925
2785
|
}
|
|
2926
2786
|
}, _callee97);
|
|
2927
2787
|
})));
|
|
2928
|
-
test('=<<TODO>>= invalid search', /*#__PURE__*/
|
|
2929
|
-
return
|
|
2788
|
+
test('=<<TODO>>= invalid search', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee98() {
|
|
2789
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee98$(_context98) {
|
|
2930
2790
|
while (1) {
|
|
2931
2791
|
switch (_context98.prev = _context98.next) {
|
|
2932
2792
|
case 0:
|
|
@@ -2938,9 +2798,9 @@ describe('fields', function () {
|
|
|
2938
2798
|
})));
|
|
2939
2799
|
});
|
|
2940
2800
|
describe('password', function () {
|
|
2941
|
-
test('minimal', /*#__PURE__*/
|
|
2801
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee99() {
|
|
2942
2802
|
var result;
|
|
2943
|
-
return
|
|
2803
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee99$(_context99) {
|
|
2944
2804
|
while (1) {
|
|
2945
2805
|
switch (_context99.prev = _context99.next) {
|
|
2946
2806
|
case 0:
|
|
@@ -2955,13 +2815,11 @@ describe('fields', function () {
|
|
|
2955
2815
|
};
|
|
2956
2816
|
}
|
|
2957
2817
|
});
|
|
2958
|
-
|
|
2959
2818
|
case 2:
|
|
2960
2819
|
result = _context99.sent;
|
|
2961
2820
|
// value should default to empty string
|
|
2962
2821
|
expect(result.find('PasswordFieldMock')).toMatchSnapshot();
|
|
2963
2822
|
result.unmount();
|
|
2964
|
-
|
|
2965
2823
|
case 5:
|
|
2966
2824
|
case "end":
|
|
2967
2825
|
return _context99.stop();
|
|
@@ -2969,8 +2827,8 @@ describe('fields', function () {
|
|
|
2969
2827
|
}
|
|
2970
2828
|
}, _callee99);
|
|
2971
2829
|
})));
|
|
2972
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
2973
|
-
return
|
|
2830
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee100() {
|
|
2831
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee100$(_context100) {
|
|
2974
2832
|
while (1) {
|
|
2975
2833
|
switch (_context100.prev = _context100.next) {
|
|
2976
2834
|
case 0:
|
|
@@ -2982,9 +2840,9 @@ describe('fields', function () {
|
|
|
2982
2840
|
})));
|
|
2983
2841
|
});
|
|
2984
2842
|
describe('radio', function () {
|
|
2985
|
-
test('minimal', /*#__PURE__*/
|
|
2843
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee101() {
|
|
2986
2844
|
var result;
|
|
2987
|
-
return
|
|
2845
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee101$(_context101) {
|
|
2988
2846
|
while (1) {
|
|
2989
2847
|
switch (_context101.prev = _context101.next) {
|
|
2990
2848
|
case 0:
|
|
@@ -2999,14 +2857,12 @@ describe('fields', function () {
|
|
|
2999
2857
|
};
|
|
3000
2858
|
}
|
|
3001
2859
|
});
|
|
3002
|
-
|
|
3003
2860
|
case 2:
|
|
3004
2861
|
result = _context101.sent;
|
|
3005
2862
|
// options should default to an empty list
|
|
3006
2863
|
// value should default to empty string
|
|
3007
2864
|
expect(result.find('RadioFieldMock')).toMatchSnapshot();
|
|
3008
2865
|
result.unmount();
|
|
3009
|
-
|
|
3010
2866
|
case 5:
|
|
3011
2867
|
case "end":
|
|
3012
2868
|
return _context101.stop();
|
|
@@ -3014,8 +2870,8 @@ describe('fields', function () {
|
|
|
3014
2870
|
}
|
|
3015
2871
|
}, _callee101);
|
|
3016
2872
|
})));
|
|
3017
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
3018
|
-
return
|
|
2873
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee102() {
|
|
2874
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee102$(_context102) {
|
|
3019
2875
|
while (1) {
|
|
3020
2876
|
switch (_context102.prev = _context102.next) {
|
|
3021
2877
|
case 0:
|
|
@@ -3025,8 +2881,8 @@ describe('fields', function () {
|
|
|
3025
2881
|
}
|
|
3026
2882
|
}, _callee102);
|
|
3027
2883
|
})));
|
|
3028
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
3029
|
-
return
|
|
2884
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee103() {
|
|
2885
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee103$(_context103) {
|
|
3030
2886
|
while (1) {
|
|
3031
2887
|
switch (_context103.prev = _context103.next) {
|
|
3032
2888
|
case 0:
|
|
@@ -3036,8 +2892,8 @@ describe('fields', function () {
|
|
|
3036
2892
|
}
|
|
3037
2893
|
}, _callee103);
|
|
3038
2894
|
})));
|
|
3039
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
3040
|
-
return
|
|
2895
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee104() {
|
|
2896
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee104$(_context104) {
|
|
3041
2897
|
while (1) {
|
|
3042
2898
|
switch (_context104.prev = _context104.next) {
|
|
3043
2899
|
case 0:
|
|
@@ -3049,8 +2905,8 @@ describe('fields', function () {
|
|
|
3049
2905
|
})));
|
|
3050
2906
|
});
|
|
3051
2907
|
describe('table', function () {
|
|
3052
|
-
test('=<<TODO>>=', /*#__PURE__*/
|
|
3053
|
-
return
|
|
2908
|
+
test('=<<TODO>>=', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee105() {
|
|
2909
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee105$(_context105) {
|
|
3054
2910
|
while (1) {
|
|
3055
2911
|
switch (_context105.prev = _context105.next) {
|
|
3056
2912
|
case 0:
|
|
@@ -3062,9 +2918,9 @@ describe('fields', function () {
|
|
|
3062
2918
|
})));
|
|
3063
2919
|
});
|
|
3064
2920
|
describe('select', function () {
|
|
3065
|
-
test('minimal', /*#__PURE__*/
|
|
2921
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee106() {
|
|
3066
2922
|
var result;
|
|
3067
|
-
return
|
|
2923
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee106$(_context106) {
|
|
3068
2924
|
while (1) {
|
|
3069
2925
|
switch (_context106.prev = _context106.next) {
|
|
3070
2926
|
case 0:
|
|
@@ -3079,14 +2935,12 @@ describe('fields', function () {
|
|
|
3079
2935
|
};
|
|
3080
2936
|
}
|
|
3081
2937
|
});
|
|
3082
|
-
|
|
3083
2938
|
case 2:
|
|
3084
2939
|
result = _context106.sent;
|
|
3085
2940
|
// options should default to an empty list
|
|
3086
2941
|
// value should default to empty string
|
|
3087
2942
|
expect(result.find('SelectFieldMock')).toMatchSnapshot();
|
|
3088
2943
|
result.unmount();
|
|
3089
|
-
|
|
3090
2944
|
case 5:
|
|
3091
2945
|
case "end":
|
|
3092
2946
|
return _context106.stop();
|
|
@@ -3094,8 +2948,8 @@ describe('fields', function () {
|
|
|
3094
2948
|
}
|
|
3095
2949
|
}, _callee106);
|
|
3096
2950
|
})));
|
|
3097
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
3098
|
-
return
|
|
2951
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee107() {
|
|
2952
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee107$(_context107) {
|
|
3099
2953
|
while (1) {
|
|
3100
2954
|
switch (_context107.prev = _context107.next) {
|
|
3101
2955
|
case 0:
|
|
@@ -3105,8 +2959,8 @@ describe('fields', function () {
|
|
|
3105
2959
|
}
|
|
3106
2960
|
}, _callee107);
|
|
3107
2961
|
})));
|
|
3108
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
3109
|
-
return
|
|
2962
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee108() {
|
|
2963
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee108$(_context108) {
|
|
3110
2964
|
while (1) {
|
|
3111
2965
|
switch (_context108.prev = _context108.next) {
|
|
3112
2966
|
case 0:
|
|
@@ -3116,8 +2970,8 @@ describe('fields', function () {
|
|
|
3116
2970
|
}
|
|
3117
2971
|
}, _callee108);
|
|
3118
2972
|
})));
|
|
3119
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
3120
|
-
return
|
|
2973
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee109() {
|
|
2974
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee109$(_context109) {
|
|
3121
2975
|
while (1) {
|
|
3122
2976
|
switch (_context109.prev = _context109.next) {
|
|
3123
2977
|
case 0:
|
|
@@ -3129,9 +2983,9 @@ describe('fields', function () {
|
|
|
3129
2983
|
})));
|
|
3130
2984
|
});
|
|
3131
2985
|
describe('select-multi', function () {
|
|
3132
|
-
test('minimal', /*#__PURE__*/
|
|
2986
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee110() {
|
|
3133
2987
|
var result;
|
|
3134
|
-
return
|
|
2988
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee110$(_context110) {
|
|
3135
2989
|
while (1) {
|
|
3136
2990
|
switch (_context110.prev = _context110.next) {
|
|
3137
2991
|
case 0:
|
|
@@ -3146,14 +3000,12 @@ describe('fields', function () {
|
|
|
3146
3000
|
};
|
|
3147
3001
|
}
|
|
3148
3002
|
});
|
|
3149
|
-
|
|
3150
3003
|
case 2:
|
|
3151
3004
|
result = _context110.sent;
|
|
3152
3005
|
// options should default to an empty list
|
|
3153
3006
|
// value should default to empty array
|
|
3154
3007
|
expect(result.find('SelectMultiFieldMock')).toMatchSnapshot();
|
|
3155
3008
|
result.unmount();
|
|
3156
|
-
|
|
3157
3009
|
case 5:
|
|
3158
3010
|
case "end":
|
|
3159
3011
|
return _context110.stop();
|
|
@@ -3161,8 +3013,8 @@ describe('fields', function () {
|
|
|
3161
3013
|
}
|
|
3162
3014
|
}, _callee110);
|
|
3163
3015
|
})));
|
|
3164
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
3165
|
-
return
|
|
3016
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee111() {
|
|
3017
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee111$(_context111) {
|
|
3166
3018
|
while (1) {
|
|
3167
3019
|
switch (_context111.prev = _context111.next) {
|
|
3168
3020
|
case 0:
|
|
@@ -3172,8 +3024,8 @@ describe('fields', function () {
|
|
|
3172
3024
|
}
|
|
3173
3025
|
}, _callee111);
|
|
3174
3026
|
})));
|
|
3175
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
3176
|
-
return
|
|
3027
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee112() {
|
|
3028
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee112$(_context112) {
|
|
3177
3029
|
while (1) {
|
|
3178
3030
|
switch (_context112.prev = _context112.next) {
|
|
3179
3031
|
case 0:
|
|
@@ -3183,8 +3035,8 @@ describe('fields', function () {
|
|
|
3183
3035
|
}
|
|
3184
3036
|
}, _callee112);
|
|
3185
3037
|
})));
|
|
3186
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
3187
|
-
return
|
|
3038
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee113() {
|
|
3039
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee113$(_context113) {
|
|
3188
3040
|
while (1) {
|
|
3189
3041
|
switch (_context113.prev = _context113.next) {
|
|
3190
3042
|
case 0:
|
|
@@ -3196,9 +3048,9 @@ describe('fields', function () {
|
|
|
3196
3048
|
})));
|
|
3197
3049
|
});
|
|
3198
3050
|
describe('team', function () {
|
|
3199
|
-
test('minimal', /*#__PURE__*/
|
|
3051
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee114() {
|
|
3200
3052
|
var result;
|
|
3201
|
-
return
|
|
3053
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee114$(_context114) {
|
|
3202
3054
|
while (1) {
|
|
3203
3055
|
switch (_context114.prev = _context114.next) {
|
|
3204
3056
|
case 0:
|
|
@@ -3213,14 +3065,12 @@ describe('fields', function () {
|
|
|
3213
3065
|
};
|
|
3214
3066
|
}
|
|
3215
3067
|
});
|
|
3216
|
-
|
|
3217
3068
|
case 2:
|
|
3218
3069
|
result = _context114.sent;
|
|
3219
3070
|
// options is not passed right now
|
|
3220
3071
|
// value should default to null
|
|
3221
3072
|
expect(result.find('TeamFieldMock')).toMatchSnapshot();
|
|
3222
3073
|
result.unmount();
|
|
3223
|
-
|
|
3224
3074
|
case 5:
|
|
3225
3075
|
case "end":
|
|
3226
3076
|
return _context114.stop();
|
|
@@ -3228,8 +3078,8 @@ describe('fields', function () {
|
|
|
3228
3078
|
}
|
|
3229
3079
|
}, _callee114);
|
|
3230
3080
|
})));
|
|
3231
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
3232
|
-
return
|
|
3081
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee115() {
|
|
3082
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee115$(_context115) {
|
|
3233
3083
|
while (1) {
|
|
3234
3084
|
switch (_context115.prev = _context115.next) {
|
|
3235
3085
|
case 0:
|
|
@@ -3239,8 +3089,8 @@ describe('fields', function () {
|
|
|
3239
3089
|
}
|
|
3240
3090
|
}, _callee115);
|
|
3241
3091
|
})));
|
|
3242
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
3243
|
-
return
|
|
3092
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee116() {
|
|
3093
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee116$(_context116) {
|
|
3244
3094
|
while (1) {
|
|
3245
3095
|
switch (_context116.prev = _context116.next) {
|
|
3246
3096
|
case 0:
|
|
@@ -3250,8 +3100,8 @@ describe('fields', function () {
|
|
|
3250
3100
|
}
|
|
3251
3101
|
}, _callee116);
|
|
3252
3102
|
})));
|
|
3253
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
3254
|
-
return
|
|
3103
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee117() {
|
|
3104
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee117$(_context117) {
|
|
3255
3105
|
while (1) {
|
|
3256
3106
|
switch (_context117.prev = _context117.next) {
|
|
3257
3107
|
case 0:
|
|
@@ -3263,9 +3113,9 @@ describe('fields', function () {
|
|
|
3263
3113
|
})));
|
|
3264
3114
|
});
|
|
3265
3115
|
describe('team-multi', function () {
|
|
3266
|
-
test('minimal', /*#__PURE__*/
|
|
3116
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee118() {
|
|
3267
3117
|
var result;
|
|
3268
|
-
return
|
|
3118
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee118$(_context118) {
|
|
3269
3119
|
while (1) {
|
|
3270
3120
|
switch (_context118.prev = _context118.next) {
|
|
3271
3121
|
case 0:
|
|
@@ -3280,14 +3130,12 @@ describe('fields', function () {
|
|
|
3280
3130
|
};
|
|
3281
3131
|
}
|
|
3282
3132
|
});
|
|
3283
|
-
|
|
3284
3133
|
case 2:
|
|
3285
3134
|
result = _context118.sent;
|
|
3286
3135
|
// options is not passed right now
|
|
3287
3136
|
// value should default to empty array
|
|
3288
3137
|
expect(result.find('TeamMultiFieldMock')).toMatchSnapshot();
|
|
3289
3138
|
result.unmount();
|
|
3290
|
-
|
|
3291
3139
|
case 5:
|
|
3292
3140
|
case "end":
|
|
3293
3141
|
return _context118.stop();
|
|
@@ -3295,8 +3143,8 @@ describe('fields', function () {
|
|
|
3295
3143
|
}
|
|
3296
3144
|
}, _callee118);
|
|
3297
3145
|
})));
|
|
3298
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
3299
|
-
return
|
|
3146
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee119() {
|
|
3147
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee119$(_context119) {
|
|
3300
3148
|
while (1) {
|
|
3301
3149
|
switch (_context119.prev = _context119.next) {
|
|
3302
3150
|
case 0:
|
|
@@ -3306,8 +3154,8 @@ describe('fields', function () {
|
|
|
3306
3154
|
}
|
|
3307
3155
|
}, _callee119);
|
|
3308
3156
|
})));
|
|
3309
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
3310
|
-
return
|
|
3157
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee120() {
|
|
3158
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee120$(_context120) {
|
|
3311
3159
|
while (1) {
|
|
3312
3160
|
switch (_context120.prev = _context120.next) {
|
|
3313
3161
|
case 0:
|
|
@@ -3317,8 +3165,8 @@ describe('fields', function () {
|
|
|
3317
3165
|
}
|
|
3318
3166
|
}, _callee120);
|
|
3319
3167
|
})));
|
|
3320
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
3321
|
-
return
|
|
3168
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee121() {
|
|
3169
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee121$(_context121) {
|
|
3322
3170
|
while (1) {
|
|
3323
3171
|
switch (_context121.prev = _context121.next) {
|
|
3324
3172
|
case 0:
|
|
@@ -3330,9 +3178,9 @@ describe('fields', function () {
|
|
|
3330
3178
|
})));
|
|
3331
3179
|
});
|
|
3332
3180
|
describe('text', function () {
|
|
3333
|
-
test('minimal', /*#__PURE__*/
|
|
3181
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee122() {
|
|
3334
3182
|
var result;
|
|
3335
|
-
return
|
|
3183
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee122$(_context122) {
|
|
3336
3184
|
while (1) {
|
|
3337
3185
|
switch (_context122.prev = _context122.next) {
|
|
3338
3186
|
case 0:
|
|
@@ -3347,14 +3195,12 @@ describe('fields', function () {
|
|
|
3347
3195
|
};
|
|
3348
3196
|
}
|
|
3349
3197
|
});
|
|
3350
|
-
|
|
3351
3198
|
case 2:
|
|
3352
3199
|
result = _context122.sent;
|
|
3353
3200
|
// options should default to an empty list
|
|
3354
3201
|
// value should default to empty string
|
|
3355
3202
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3356
3203
|
result.unmount();
|
|
3357
|
-
|
|
3358
3204
|
case 5:
|
|
3359
3205
|
case "end":
|
|
3360
3206
|
return _context122.stop();
|
|
@@ -3362,8 +3208,8 @@ describe('fields', function () {
|
|
|
3362
3208
|
}
|
|
3363
3209
|
}, _callee122);
|
|
3364
3210
|
})));
|
|
3365
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
3366
|
-
return
|
|
3211
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee123() {
|
|
3212
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee123$(_context123) {
|
|
3367
3213
|
while (1) {
|
|
3368
3214
|
switch (_context123.prev = _context123.next) {
|
|
3369
3215
|
case 0:
|
|
@@ -3373,8 +3219,8 @@ describe('fields', function () {
|
|
|
3373
3219
|
}
|
|
3374
3220
|
}, _callee123);
|
|
3375
3221
|
})));
|
|
3376
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
3377
|
-
return
|
|
3222
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee124() {
|
|
3223
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee124$(_context124) {
|
|
3378
3224
|
while (1) {
|
|
3379
3225
|
switch (_context124.prev = _context124.next) {
|
|
3380
3226
|
case 0:
|
|
@@ -3384,8 +3230,8 @@ describe('fields', function () {
|
|
|
3384
3230
|
}
|
|
3385
3231
|
}, _callee124);
|
|
3386
3232
|
})));
|
|
3387
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
3388
|
-
return
|
|
3233
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee125() {
|
|
3234
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee125$(_context125) {
|
|
3389
3235
|
while (1) {
|
|
3390
3236
|
switch (_context125.prev = _context125.next) {
|
|
3391
3237
|
case 0:
|
|
@@ -3397,9 +3243,9 @@ describe('fields', function () {
|
|
|
3397
3243
|
})));
|
|
3398
3244
|
});
|
|
3399
3245
|
describe('text-multi', function () {
|
|
3400
|
-
test('minimal', /*#__PURE__*/
|
|
3246
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee126() {
|
|
3401
3247
|
var result;
|
|
3402
|
-
return
|
|
3248
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee126$(_context126) {
|
|
3403
3249
|
while (1) {
|
|
3404
3250
|
switch (_context126.prev = _context126.next) {
|
|
3405
3251
|
case 0:
|
|
@@ -3414,14 +3260,12 @@ describe('fields', function () {
|
|
|
3414
3260
|
};
|
|
3415
3261
|
}
|
|
3416
3262
|
});
|
|
3417
|
-
|
|
3418
3263
|
case 2:
|
|
3419
3264
|
result = _context126.sent;
|
|
3420
3265
|
// options should default to an empty list
|
|
3421
3266
|
// value should default to empty list
|
|
3422
3267
|
expect(result.find('TextMultiFieldMock')).toMatchSnapshot();
|
|
3423
3268
|
result.unmount();
|
|
3424
|
-
|
|
3425
3269
|
case 5:
|
|
3426
3270
|
case "end":
|
|
3427
3271
|
return _context126.stop();
|
|
@@ -3429,8 +3273,8 @@ describe('fields', function () {
|
|
|
3429
3273
|
}
|
|
3430
3274
|
}, _callee126);
|
|
3431
3275
|
})));
|
|
3432
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
3433
|
-
return
|
|
3276
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee127() {
|
|
3277
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee127$(_context127) {
|
|
3434
3278
|
while (1) {
|
|
3435
3279
|
switch (_context127.prev = _context127.next) {
|
|
3436
3280
|
case 0:
|
|
@@ -3440,8 +3284,8 @@ describe('fields', function () {
|
|
|
3440
3284
|
}
|
|
3441
3285
|
}, _callee127);
|
|
3442
3286
|
})));
|
|
3443
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
3444
|
-
return
|
|
3287
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee128() {
|
|
3288
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee128$(_context128) {
|
|
3445
3289
|
while (1) {
|
|
3446
3290
|
switch (_context128.prev = _context128.next) {
|
|
3447
3291
|
case 0:
|
|
@@ -3451,8 +3295,8 @@ describe('fields', function () {
|
|
|
3451
3295
|
}
|
|
3452
3296
|
}, _callee128);
|
|
3453
3297
|
})));
|
|
3454
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
3455
|
-
return
|
|
3298
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee129() {
|
|
3299
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee129$(_context129) {
|
|
3456
3300
|
while (1) {
|
|
3457
3301
|
switch (_context129.prev = _context129.next) {
|
|
3458
3302
|
case 0:
|
|
@@ -3464,9 +3308,9 @@ describe('fields', function () {
|
|
|
3464
3308
|
})));
|
|
3465
3309
|
});
|
|
3466
3310
|
describe('user', function () {
|
|
3467
|
-
test('minimal', /*#__PURE__*/
|
|
3311
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee130() {
|
|
3468
3312
|
var result;
|
|
3469
|
-
return
|
|
3313
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee130$(_context130) {
|
|
3470
3314
|
while (1) {
|
|
3471
3315
|
switch (_context130.prev = _context130.next) {
|
|
3472
3316
|
case 0:
|
|
@@ -3481,14 +3325,12 @@ describe('fields', function () {
|
|
|
3481
3325
|
};
|
|
3482
3326
|
}
|
|
3483
3327
|
});
|
|
3484
|
-
|
|
3485
3328
|
case 2:
|
|
3486
3329
|
result = _context130.sent;
|
|
3487
3330
|
// options is not passed right now
|
|
3488
3331
|
// value should default to null
|
|
3489
3332
|
expect(result.find('UserFieldMock')).toMatchSnapshot();
|
|
3490
3333
|
result.unmount();
|
|
3491
|
-
|
|
3492
3334
|
case 5:
|
|
3493
3335
|
case "end":
|
|
3494
3336
|
return _context130.stop();
|
|
@@ -3496,8 +3338,8 @@ describe('fields', function () {
|
|
|
3496
3338
|
}
|
|
3497
3339
|
}, _callee130);
|
|
3498
3340
|
})));
|
|
3499
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
3500
|
-
return
|
|
3341
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee131() {
|
|
3342
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee131$(_context131) {
|
|
3501
3343
|
while (1) {
|
|
3502
3344
|
switch (_context131.prev = _context131.next) {
|
|
3503
3345
|
case 0:
|
|
@@ -3507,8 +3349,8 @@ describe('fields', function () {
|
|
|
3507
3349
|
}
|
|
3508
3350
|
}, _callee131);
|
|
3509
3351
|
})));
|
|
3510
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
3511
|
-
return
|
|
3352
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee132() {
|
|
3353
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee132$(_context132) {
|
|
3512
3354
|
while (1) {
|
|
3513
3355
|
switch (_context132.prev = _context132.next) {
|
|
3514
3356
|
case 0:
|
|
@@ -3518,8 +3360,8 @@ describe('fields', function () {
|
|
|
3518
3360
|
}
|
|
3519
3361
|
}, _callee132);
|
|
3520
3362
|
})));
|
|
3521
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
3522
|
-
return
|
|
3363
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee133() {
|
|
3364
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee133$(_context133) {
|
|
3523
3365
|
while (1) {
|
|
3524
3366
|
switch (_context133.prev = _context133.next) {
|
|
3525
3367
|
case 0:
|
|
@@ -3531,9 +3373,9 @@ describe('fields', function () {
|
|
|
3531
3373
|
})));
|
|
3532
3374
|
});
|
|
3533
3375
|
describe('user-multi', function () {
|
|
3534
|
-
test('minimal', /*#__PURE__*/
|
|
3376
|
+
test('minimal', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee134() {
|
|
3535
3377
|
var result;
|
|
3536
|
-
return
|
|
3378
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee134$(_context134) {
|
|
3537
3379
|
while (1) {
|
|
3538
3380
|
switch (_context134.prev = _context134.next) {
|
|
3539
3381
|
case 0:
|
|
@@ -3548,14 +3390,12 @@ describe('fields', function () {
|
|
|
3548
3390
|
};
|
|
3549
3391
|
}
|
|
3550
3392
|
});
|
|
3551
|
-
|
|
3552
3393
|
case 2:
|
|
3553
3394
|
result = _context134.sent;
|
|
3554
3395
|
// options is not passed right now
|
|
3555
3396
|
// value should default to null
|
|
3556
3397
|
expect(result.find('UserMultiFieldMock')).toMatchSnapshot();
|
|
3557
3398
|
result.unmount();
|
|
3558
|
-
|
|
3559
3399
|
case 5:
|
|
3560
3400
|
case "end":
|
|
3561
3401
|
return _context134.stop();
|
|
@@ -3563,8 +3403,8 @@ describe('fields', function () {
|
|
|
3563
3403
|
}
|
|
3564
3404
|
}, _callee134);
|
|
3565
3405
|
})));
|
|
3566
|
-
test('=<<TODO>>= invalid value type', /*#__PURE__*/
|
|
3567
|
-
return
|
|
3406
|
+
test('=<<TODO>>= invalid value type', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee135() {
|
|
3407
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee135$(_context135) {
|
|
3568
3408
|
while (1) {
|
|
3569
3409
|
switch (_context135.prev = _context135.next) {
|
|
3570
3410
|
case 0:
|
|
@@ -3574,8 +3414,8 @@ describe('fields', function () {
|
|
|
3574
3414
|
}
|
|
3575
3415
|
}, _callee135);
|
|
3576
3416
|
})));
|
|
3577
|
-
test('=<<TODO>>= valid options', /*#__PURE__*/
|
|
3578
|
-
return
|
|
3417
|
+
test('=<<TODO>>= valid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee136() {
|
|
3418
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee136$(_context136) {
|
|
3579
3419
|
while (1) {
|
|
3580
3420
|
switch (_context136.prev = _context136.next) {
|
|
3581
3421
|
case 0:
|
|
@@ -3585,8 +3425,8 @@ describe('fields', function () {
|
|
|
3585
3425
|
}
|
|
3586
3426
|
}, _callee136);
|
|
3587
3427
|
})));
|
|
3588
|
-
test('=<<TODO>>= invalid options', /*#__PURE__*/
|
|
3589
|
-
return
|
|
3428
|
+
test('=<<TODO>>= invalid options', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee137() {
|
|
3429
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee137$(_context137) {
|
|
3590
3430
|
while (1) {
|
|
3591
3431
|
switch (_context137.prev = _context137.next) {
|
|
3592
3432
|
case 0:
|
|
@@ -3599,9 +3439,9 @@ describe('fields', function () {
|
|
|
3599
3439
|
});
|
|
3600
3440
|
});
|
|
3601
3441
|
describe('visible', function () {
|
|
3602
|
-
test('given true', /*#__PURE__*/
|
|
3442
|
+
test('given true', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee138() {
|
|
3603
3443
|
var result;
|
|
3604
|
-
return
|
|
3444
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee138$(_context138) {
|
|
3605
3445
|
while (1) {
|
|
3606
3446
|
switch (_context138.prev = _context138.next) {
|
|
3607
3447
|
case 0:
|
|
@@ -3617,12 +3457,10 @@ describe('fields', function () {
|
|
|
3617
3457
|
};
|
|
3618
3458
|
}
|
|
3619
3459
|
});
|
|
3620
|
-
|
|
3621
3460
|
case 2:
|
|
3622
3461
|
result = _context138.sent;
|
|
3623
3462
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3624
3463
|
result.unmount();
|
|
3625
|
-
|
|
3626
3464
|
case 5:
|
|
3627
3465
|
case "end":
|
|
3628
3466
|
return _context138.stop();
|
|
@@ -3630,9 +3468,9 @@ describe('fields', function () {
|
|
|
3630
3468
|
}
|
|
3631
3469
|
}, _callee138);
|
|
3632
3470
|
})));
|
|
3633
|
-
test('given false', /*#__PURE__*/
|
|
3471
|
+
test('given false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee139() {
|
|
3634
3472
|
var result;
|
|
3635
|
-
return
|
|
3473
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee139$(_context139) {
|
|
3636
3474
|
while (1) {
|
|
3637
3475
|
switch (_context139.prev = _context139.next) {
|
|
3638
3476
|
case 0:
|
|
@@ -3648,12 +3486,10 @@ describe('fields', function () {
|
|
|
3648
3486
|
};
|
|
3649
3487
|
}
|
|
3650
3488
|
});
|
|
3651
|
-
|
|
3652
3489
|
case 2:
|
|
3653
3490
|
result = _context139.sent;
|
|
3654
3491
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3655
3492
|
result.unmount();
|
|
3656
|
-
|
|
3657
3493
|
case 5:
|
|
3658
3494
|
case "end":
|
|
3659
3495
|
return _context139.stop();
|
|
@@ -3661,9 +3497,9 @@ describe('fields', function () {
|
|
|
3661
3497
|
}
|
|
3662
3498
|
}, _callee139);
|
|
3663
3499
|
})));
|
|
3664
|
-
test('given a string value', /*#__PURE__*/
|
|
3500
|
+
test('given a string value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee140() {
|
|
3665
3501
|
var result;
|
|
3666
|
-
return
|
|
3502
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee140$(_context140) {
|
|
3667
3503
|
while (1) {
|
|
3668
3504
|
switch (_context140.prev = _context140.next) {
|
|
3669
3505
|
case 0:
|
|
@@ -3679,12 +3515,10 @@ describe('fields', function () {
|
|
|
3679
3515
|
};
|
|
3680
3516
|
}
|
|
3681
3517
|
});
|
|
3682
|
-
|
|
3683
3518
|
case 2:
|
|
3684
3519
|
result = _context140.sent;
|
|
3685
3520
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3686
3521
|
result.unmount();
|
|
3687
|
-
|
|
3688
3522
|
case 5:
|
|
3689
3523
|
case "end":
|
|
3690
3524
|
return _context140.stop();
|
|
@@ -3692,9 +3526,9 @@ describe('fields', function () {
|
|
|
3692
3526
|
}
|
|
3693
3527
|
}, _callee140);
|
|
3694
3528
|
})));
|
|
3695
|
-
test('given a null value', /*#__PURE__*/
|
|
3529
|
+
test('given a null value', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee141() {
|
|
3696
3530
|
var result;
|
|
3697
|
-
return
|
|
3531
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee141$(_context141) {
|
|
3698
3532
|
while (1) {
|
|
3699
3533
|
switch (_context141.prev = _context141.next) {
|
|
3700
3534
|
case 0:
|
|
@@ -3710,12 +3544,10 @@ describe('fields', function () {
|
|
|
3710
3544
|
};
|
|
3711
3545
|
}
|
|
3712
3546
|
});
|
|
3713
|
-
|
|
3714
3547
|
case 2:
|
|
3715
3548
|
result = _context141.sent;
|
|
3716
3549
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3717
3550
|
result.unmount();
|
|
3718
|
-
|
|
3719
3551
|
case 5:
|
|
3720
3552
|
case "end":
|
|
3721
3553
|
return _context141.stop();
|
|
@@ -3723,9 +3555,9 @@ describe('fields', function () {
|
|
|
3723
3555
|
}
|
|
3724
3556
|
}, _callee141);
|
|
3725
3557
|
})));
|
|
3726
|
-
test('given function that returns true', /*#__PURE__*/
|
|
3558
|
+
test('given function that returns true', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee142() {
|
|
3727
3559
|
var visibleFn, result;
|
|
3728
|
-
return
|
|
3560
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee142$(_context142) {
|
|
3729
3561
|
while (1) {
|
|
3730
3562
|
switch (_context142.prev = _context142.next) {
|
|
3731
3563
|
case 0:
|
|
@@ -3744,13 +3576,11 @@ describe('fields', function () {
|
|
|
3744
3576
|
};
|
|
3745
3577
|
}
|
|
3746
3578
|
});
|
|
3747
|
-
|
|
3748
3579
|
case 3:
|
|
3749
3580
|
result = _context142.sent;
|
|
3750
3581
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3751
3582
|
expect(visibleFn.mock.calls).toMatchSnapshot();
|
|
3752
3583
|
result.unmount();
|
|
3753
|
-
|
|
3754
3584
|
case 7:
|
|
3755
3585
|
case "end":
|
|
3756
3586
|
return _context142.stop();
|
|
@@ -3758,9 +3588,9 @@ describe('fields', function () {
|
|
|
3758
3588
|
}
|
|
3759
3589
|
}, _callee142);
|
|
3760
3590
|
})));
|
|
3761
|
-
test('given function that returns false', /*#__PURE__*/
|
|
3591
|
+
test('given function that returns false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee143() {
|
|
3762
3592
|
var result;
|
|
3763
|
-
return
|
|
3593
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee143$(_context143) {
|
|
3764
3594
|
while (1) {
|
|
3765
3595
|
switch (_context143.prev = _context143.next) {
|
|
3766
3596
|
case 0:
|
|
@@ -3778,12 +3608,10 @@ describe('fields', function () {
|
|
|
3778
3608
|
};
|
|
3779
3609
|
}
|
|
3780
3610
|
});
|
|
3781
|
-
|
|
3782
3611
|
case 2:
|
|
3783
3612
|
result = _context143.sent;
|
|
3784
3613
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3785
3614
|
result.unmount();
|
|
3786
|
-
|
|
3787
3615
|
case 5:
|
|
3788
3616
|
case "end":
|
|
3789
3617
|
return _context143.stop();
|
|
@@ -3791,9 +3619,9 @@ describe('fields', function () {
|
|
|
3791
3619
|
}
|
|
3792
3620
|
}, _callee143);
|
|
3793
3621
|
})));
|
|
3794
|
-
test('given function that returns null', /*#__PURE__*/
|
|
3622
|
+
test('given function that returns null', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee144() {
|
|
3795
3623
|
var result;
|
|
3796
|
-
return
|
|
3624
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee144$(_context144) {
|
|
3797
3625
|
while (1) {
|
|
3798
3626
|
switch (_context144.prev = _context144.next) {
|
|
3799
3627
|
case 0:
|
|
@@ -3811,12 +3639,10 @@ describe('fields', function () {
|
|
|
3811
3639
|
};
|
|
3812
3640
|
}
|
|
3813
3641
|
});
|
|
3814
|
-
|
|
3815
3642
|
case 2:
|
|
3816
3643
|
result = _context144.sent;
|
|
3817
3644
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3818
3645
|
result.unmount();
|
|
3819
|
-
|
|
3820
3646
|
case 5:
|
|
3821
3647
|
case "end":
|
|
3822
3648
|
return _context144.stop();
|
|
@@ -3827,9 +3653,9 @@ describe('fields', function () {
|
|
|
3827
3653
|
});
|
|
3828
3654
|
});
|
|
3829
3655
|
describe('setValue', function () {
|
|
3830
|
-
test('triggerChange', /*#__PURE__*/
|
|
3656
|
+
test('triggerChange', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee145() {
|
|
3831
3657
|
var onChangeMock, result;
|
|
3832
|
-
return
|
|
3658
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee145$(_context145) {
|
|
3833
3659
|
while (1) {
|
|
3834
3660
|
switch (_context145.prev = _context145.next) {
|
|
3835
3661
|
case 0:
|
|
@@ -3856,18 +3682,16 @@ describe('setValue', function () {
|
|
|
3856
3682
|
};
|
|
3857
3683
|
}
|
|
3858
3684
|
});
|
|
3859
|
-
|
|
3860
3685
|
case 3:
|
|
3861
3686
|
result = _context145.sent;
|
|
3862
|
-
setValue(FORM_KEY, 'test', 'Hello World!');
|
|
3863
|
-
result.update();
|
|
3864
|
-
|
|
3865
|
-
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3687
|
+
(0, _Form.setValue)(FORM_KEY, 'test', 'Hello World!');
|
|
3688
|
+
result.update();
|
|
3689
|
+
// The Field should be dirty and the value should be updated.
|
|
3690
|
+
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3691
|
+
// onChange should be called with the current bindings
|
|
3866
3692
|
// (values and dataSources).
|
|
3867
|
-
|
|
3868
3693
|
expect(onChangeMock.mock.calls).toMatchSnapshot();
|
|
3869
3694
|
result.unmount();
|
|
3870
|
-
|
|
3871
3695
|
case 9:
|
|
3872
3696
|
case "end":
|
|
3873
3697
|
return _context145.stop();
|
|
@@ -3875,9 +3699,9 @@ describe('setValue', function () {
|
|
|
3875
3699
|
}
|
|
3876
3700
|
}, _callee145);
|
|
3877
3701
|
})));
|
|
3878
|
-
test('triggerChange false', /*#__PURE__*/
|
|
3702
|
+
test('triggerChange false', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee146() {
|
|
3879
3703
|
var onChangeMock, result;
|
|
3880
|
-
return
|
|
3704
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee146$(_context146) {
|
|
3881
3705
|
while (1) {
|
|
3882
3706
|
switch (_context146.prev = _context146.next) {
|
|
3883
3707
|
case 0:
|
|
@@ -3894,17 +3718,15 @@ describe('setValue', function () {
|
|
|
3894
3718
|
};
|
|
3895
3719
|
}
|
|
3896
3720
|
});
|
|
3897
|
-
|
|
3898
3721
|
case 3:
|
|
3899
3722
|
result = _context146.sent;
|
|
3900
|
-
setValue(FORM_KEY, 'test', 'Hello World!', false);
|
|
3901
|
-
result.update();
|
|
3902
|
-
|
|
3903
|
-
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3904
|
-
|
|
3723
|
+
(0, _Form.setValue)(FORM_KEY, 'test', 'Hello World!', false);
|
|
3724
|
+
result.update();
|
|
3725
|
+
// The Field should be dirty and the value should be updated.
|
|
3726
|
+
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
3727
|
+
// onChange should not have been called
|
|
3905
3728
|
expect(onChangeMock.mock.calls.length).toBe(0);
|
|
3906
3729
|
result.unmount();
|
|
3907
|
-
|
|
3908
3730
|
case 9:
|
|
3909
3731
|
case "end":
|
|
3910
3732
|
return _context146.stop();
|
|
@@ -3913,9 +3735,9 @@ describe('setValue', function () {
|
|
|
3913
3735
|
}, _callee146);
|
|
3914
3736
|
})));
|
|
3915
3737
|
describe('empty string values should use FIELD_DEFAULT_VALUES', function () {
|
|
3916
|
-
test('attributes', /*#__PURE__*/
|
|
3738
|
+
test('attributes', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee147() {
|
|
3917
3739
|
var result;
|
|
3918
|
-
return
|
|
3740
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee147$(_context147) {
|
|
3919
3741
|
while (1) {
|
|
3920
3742
|
switch (_context147.prev = _context147.next) {
|
|
3921
3743
|
case 0:
|
|
@@ -3933,15 +3755,13 @@ describe('setValue', function () {
|
|
|
3933
3755
|
};
|
|
3934
3756
|
}
|
|
3935
3757
|
});
|
|
3936
|
-
|
|
3937
3758
|
case 2:
|
|
3938
3759
|
result = _context147.sent;
|
|
3939
|
-
setValue(FORM_KEY, 'test', '');
|
|
3760
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
3940
3761
|
result.update();
|
|
3941
|
-
expect(result.find('AttributesFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('attributes'));
|
|
3762
|
+
expect(result.find('AttributesFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('attributes'));
|
|
3942
3763
|
expect(result.find('AttributesFieldMock')).toMatchSnapshot();
|
|
3943
3764
|
result.unmount();
|
|
3944
|
-
|
|
3945
3765
|
case 8:
|
|
3946
3766
|
case "end":
|
|
3947
3767
|
return _context147.stop();
|
|
@@ -3949,9 +3769,9 @@ describe('setValue', function () {
|
|
|
3949
3769
|
}
|
|
3950
3770
|
}, _callee147);
|
|
3951
3771
|
})));
|
|
3952
|
-
test('checkbox', /*#__PURE__*/
|
|
3772
|
+
test('checkbox', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee148() {
|
|
3953
3773
|
var result;
|
|
3954
|
-
return
|
|
3774
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee148$(_context148) {
|
|
3955
3775
|
while (1) {
|
|
3956
3776
|
switch (_context148.prev = _context148.next) {
|
|
3957
3777
|
case 0:
|
|
@@ -3967,15 +3787,13 @@ describe('setValue', function () {
|
|
|
3967
3787
|
};
|
|
3968
3788
|
}
|
|
3969
3789
|
});
|
|
3970
|
-
|
|
3971
3790
|
case 2:
|
|
3972
3791
|
result = _context148.sent;
|
|
3973
|
-
setValue(FORM_KEY, 'test', '');
|
|
3792
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
3974
3793
|
result.update();
|
|
3975
|
-
expect(result.find('CheckboxFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('checkbox'));
|
|
3794
|
+
expect(result.find('CheckboxFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('checkbox'));
|
|
3976
3795
|
expect(result.find('CheckboxFieldMock')).toMatchSnapshot();
|
|
3977
3796
|
result.unmount();
|
|
3978
|
-
|
|
3979
3797
|
case 8:
|
|
3980
3798
|
case "end":
|
|
3981
3799
|
return _context148.stop();
|
|
@@ -3983,9 +3801,9 @@ describe('setValue', function () {
|
|
|
3983
3801
|
}
|
|
3984
3802
|
}, _callee148);
|
|
3985
3803
|
})));
|
|
3986
|
-
test('code', /*#__PURE__*/
|
|
3804
|
+
test('code', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee149() {
|
|
3987
3805
|
var result;
|
|
3988
|
-
return
|
|
3806
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee149$(_context149) {
|
|
3989
3807
|
while (1) {
|
|
3990
3808
|
switch (_context149.prev = _context149.next) {
|
|
3991
3809
|
case 0:
|
|
@@ -4001,16 +3819,13 @@ describe('setValue', function () {
|
|
|
4001
3819
|
};
|
|
4002
3820
|
}
|
|
4003
3821
|
});
|
|
4004
|
-
|
|
4005
3822
|
case 2:
|
|
4006
3823
|
result = _context149.sent;
|
|
4007
|
-
setValue(FORM_KEY, 'test', '');
|
|
3824
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4008
3825
|
result.update();
|
|
4009
3826
|
expect(result.find('CodeFieldMock').prop('value')).toBe(''); // no default
|
|
4010
|
-
|
|
4011
3827
|
expect(result.find('CodeFieldMock')).toMatchSnapshot();
|
|
4012
3828
|
result.unmount();
|
|
4013
|
-
|
|
4014
3829
|
case 8:
|
|
4015
3830
|
case "end":
|
|
4016
3831
|
return _context149.stop();
|
|
@@ -4018,9 +3833,9 @@ describe('setValue', function () {
|
|
|
4018
3833
|
}
|
|
4019
3834
|
}, _callee149);
|
|
4020
3835
|
})));
|
|
4021
|
-
test('form', /*#__PURE__*/
|
|
3836
|
+
test('form', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee150() {
|
|
4022
3837
|
var result;
|
|
4023
|
-
return
|
|
3838
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee150$(_context150) {
|
|
4024
3839
|
while (1) {
|
|
4025
3840
|
switch (_context150.prev = _context150.next) {
|
|
4026
3841
|
case 0:
|
|
@@ -4039,15 +3854,13 @@ describe('setValue', function () {
|
|
|
4039
3854
|
};
|
|
4040
3855
|
}
|
|
4041
3856
|
});
|
|
4042
|
-
|
|
4043
3857
|
case 2:
|
|
4044
3858
|
result = _context150.sent;
|
|
4045
|
-
setValue(FORM_KEY, 'test', '');
|
|
3859
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4046
3860
|
result.update();
|
|
4047
|
-
expect(result.find('FormFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('form'));
|
|
3861
|
+
expect(result.find('FormFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('form'));
|
|
4048
3862
|
expect(result.find('FormFieldMock')).toMatchSnapshot();
|
|
4049
3863
|
result.unmount();
|
|
4050
|
-
|
|
4051
3864
|
case 8:
|
|
4052
3865
|
case "end":
|
|
4053
3866
|
return _context150.stop();
|
|
@@ -4055,9 +3868,9 @@ describe('setValue', function () {
|
|
|
4055
3868
|
}
|
|
4056
3869
|
}, _callee150);
|
|
4057
3870
|
})));
|
|
4058
|
-
test('form-multi', /*#__PURE__*/
|
|
3871
|
+
test('form-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee151() {
|
|
4059
3872
|
var result;
|
|
4060
|
-
return
|
|
3873
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee151$(_context151) {
|
|
4061
3874
|
while (1) {
|
|
4062
3875
|
switch (_context151.prev = _context151.next) {
|
|
4063
3876
|
case 0:
|
|
@@ -4079,15 +3892,13 @@ describe('setValue', function () {
|
|
|
4079
3892
|
};
|
|
4080
3893
|
}
|
|
4081
3894
|
});
|
|
4082
|
-
|
|
4083
3895
|
case 2:
|
|
4084
3896
|
result = _context151.sent;
|
|
4085
|
-
setValue(FORM_KEY, 'test', '');
|
|
3897
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4086
3898
|
result.update();
|
|
4087
|
-
expect(result.find('FormMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('form-multi'));
|
|
3899
|
+
expect(result.find('FormMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('form-multi'));
|
|
4088
3900
|
expect(result.find('FormMultiFieldMock')).toMatchSnapshot();
|
|
4089
3901
|
result.unmount();
|
|
4090
|
-
|
|
4091
3902
|
case 8:
|
|
4092
3903
|
case "end":
|
|
4093
3904
|
return _context151.stop();
|
|
@@ -4095,9 +3906,9 @@ describe('setValue', function () {
|
|
|
4095
3906
|
}
|
|
4096
3907
|
}, _callee151);
|
|
4097
3908
|
})));
|
|
4098
|
-
test('password', /*#__PURE__*/
|
|
3909
|
+
test('password', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee152() {
|
|
4099
3910
|
var result;
|
|
4100
|
-
return
|
|
3911
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee152$(_context152) {
|
|
4101
3912
|
while (1) {
|
|
4102
3913
|
switch (_context152.prev = _context152.next) {
|
|
4103
3914
|
case 0:
|
|
@@ -4113,16 +3924,13 @@ describe('setValue', function () {
|
|
|
4113
3924
|
};
|
|
4114
3925
|
}
|
|
4115
3926
|
});
|
|
4116
|
-
|
|
4117
3927
|
case 2:
|
|
4118
3928
|
result = _context152.sent;
|
|
4119
|
-
setValue(FORM_KEY, 'test', '');
|
|
3929
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4120
3930
|
result.update();
|
|
4121
3931
|
expect(result.find('PasswordFieldMock').prop('value')).toBe(''); // no default
|
|
4122
|
-
|
|
4123
3932
|
expect(result.find('PasswordFieldMock')).toMatchSnapshot();
|
|
4124
3933
|
result.unmount();
|
|
4125
|
-
|
|
4126
3934
|
case 8:
|
|
4127
3935
|
case "end":
|
|
4128
3936
|
return _context152.stop();
|
|
@@ -4130,9 +3938,9 @@ describe('setValue', function () {
|
|
|
4130
3938
|
}
|
|
4131
3939
|
}, _callee152);
|
|
4132
3940
|
})));
|
|
4133
|
-
test('radio', /*#__PURE__*/
|
|
3941
|
+
test('radio', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee153() {
|
|
4134
3942
|
var result;
|
|
4135
|
-
return
|
|
3943
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee153$(_context153) {
|
|
4136
3944
|
while (1) {
|
|
4137
3945
|
switch (_context153.prev = _context153.next) {
|
|
4138
3946
|
case 0:
|
|
@@ -4151,16 +3959,13 @@ describe('setValue', function () {
|
|
|
4151
3959
|
};
|
|
4152
3960
|
}
|
|
4153
3961
|
});
|
|
4154
|
-
|
|
4155
3962
|
case 2:
|
|
4156
3963
|
result = _context153.sent;
|
|
4157
|
-
setValue(FORM_KEY, 'test', '');
|
|
3964
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4158
3965
|
result.update();
|
|
4159
3966
|
expect(result.find('RadioFieldMock').prop('value')).toBe(''); // no default
|
|
4160
|
-
|
|
4161
3967
|
expect(result.find('RadioFieldMock')).toMatchSnapshot();
|
|
4162
3968
|
result.unmount();
|
|
4163
|
-
|
|
4164
3969
|
case 8:
|
|
4165
3970
|
case "end":
|
|
4166
3971
|
return _context153.stop();
|
|
@@ -4168,9 +3973,9 @@ describe('setValue', function () {
|
|
|
4168
3973
|
}
|
|
4169
3974
|
}, _callee153);
|
|
4170
3975
|
})));
|
|
4171
|
-
test('select', /*#__PURE__*/
|
|
3976
|
+
test('select', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee154() {
|
|
4172
3977
|
var result;
|
|
4173
|
-
return
|
|
3978
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee154$(_context154) {
|
|
4174
3979
|
while (1) {
|
|
4175
3980
|
switch (_context154.prev = _context154.next) {
|
|
4176
3981
|
case 0:
|
|
@@ -4189,16 +3994,13 @@ describe('setValue', function () {
|
|
|
4189
3994
|
};
|
|
4190
3995
|
}
|
|
4191
3996
|
});
|
|
4192
|
-
|
|
4193
3997
|
case 2:
|
|
4194
3998
|
result = _context154.sent;
|
|
4195
|
-
setValue(FORM_KEY, 'test', '');
|
|
3999
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4196
4000
|
result.update();
|
|
4197
4001
|
expect(result.find('SelectFieldMock').prop('value')).toBe(''); // no default
|
|
4198
|
-
|
|
4199
4002
|
expect(result.find('SelectFieldMock')).toMatchSnapshot();
|
|
4200
4003
|
result.unmount();
|
|
4201
|
-
|
|
4202
4004
|
case 8:
|
|
4203
4005
|
case "end":
|
|
4204
4006
|
return _context154.stop();
|
|
@@ -4206,9 +4008,9 @@ describe('setValue', function () {
|
|
|
4206
4008
|
}
|
|
4207
4009
|
}, _callee154);
|
|
4208
4010
|
})));
|
|
4209
|
-
test('select-multi', /*#__PURE__*/
|
|
4011
|
+
test('select-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee155() {
|
|
4210
4012
|
var result;
|
|
4211
|
-
return
|
|
4013
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee155$(_context155) {
|
|
4212
4014
|
while (1) {
|
|
4213
4015
|
switch (_context155.prev = _context155.next) {
|
|
4214
4016
|
case 0:
|
|
@@ -4230,15 +4032,13 @@ describe('setValue', function () {
|
|
|
4230
4032
|
};
|
|
4231
4033
|
}
|
|
4232
4034
|
});
|
|
4233
|
-
|
|
4234
4035
|
case 2:
|
|
4235
4036
|
result = _context155.sent;
|
|
4236
|
-
setValue(FORM_KEY, 'test', '');
|
|
4037
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4237
4038
|
result.update();
|
|
4238
|
-
expect(result.find('SelectMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('select-multi'));
|
|
4039
|
+
expect(result.find('SelectMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('select-multi'));
|
|
4239
4040
|
expect(result.find('SelectMultiFieldMock')).toMatchSnapshot();
|
|
4240
4041
|
result.unmount();
|
|
4241
|
-
|
|
4242
4042
|
case 8:
|
|
4243
4043
|
case "end":
|
|
4244
4044
|
return _context155.stop();
|
|
@@ -4246,9 +4046,9 @@ describe('setValue', function () {
|
|
|
4246
4046
|
}
|
|
4247
4047
|
}, _callee155);
|
|
4248
4048
|
})));
|
|
4249
|
-
test('team', /*#__PURE__*/
|
|
4049
|
+
test('team', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee156() {
|
|
4250
4050
|
var result;
|
|
4251
|
-
return
|
|
4051
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee156$(_context156) {
|
|
4252
4052
|
while (1) {
|
|
4253
4053
|
switch (_context156.prev = _context156.next) {
|
|
4254
4054
|
case 0:
|
|
@@ -4267,15 +4067,13 @@ describe('setValue', function () {
|
|
|
4267
4067
|
};
|
|
4268
4068
|
}
|
|
4269
4069
|
});
|
|
4270
|
-
|
|
4271
4070
|
case 2:
|
|
4272
4071
|
result = _context156.sent;
|
|
4273
|
-
setValue(FORM_KEY, 'test', '');
|
|
4072
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4274
4073
|
result.update();
|
|
4275
|
-
expect(result.find('TeamFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('team'));
|
|
4074
|
+
expect(result.find('TeamFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('team'));
|
|
4276
4075
|
expect(result.find('TeamFieldMock')).toMatchSnapshot();
|
|
4277
4076
|
result.unmount();
|
|
4278
|
-
|
|
4279
4077
|
case 8:
|
|
4280
4078
|
case "end":
|
|
4281
4079
|
return _context156.stop();
|
|
@@ -4283,9 +4081,9 @@ describe('setValue', function () {
|
|
|
4283
4081
|
}
|
|
4284
4082
|
}, _callee156);
|
|
4285
4083
|
})));
|
|
4286
|
-
test('team-multi', /*#__PURE__*/
|
|
4084
|
+
test('team-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee157() {
|
|
4287
4085
|
var result;
|
|
4288
|
-
return
|
|
4086
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee157$(_context157) {
|
|
4289
4087
|
while (1) {
|
|
4290
4088
|
switch (_context157.prev = _context157.next) {
|
|
4291
4089
|
case 0:
|
|
@@ -4307,15 +4105,13 @@ describe('setValue', function () {
|
|
|
4307
4105
|
};
|
|
4308
4106
|
}
|
|
4309
4107
|
});
|
|
4310
|
-
|
|
4311
4108
|
case 2:
|
|
4312
4109
|
result = _context157.sent;
|
|
4313
|
-
setValue(FORM_KEY, 'test', '');
|
|
4110
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4314
4111
|
result.update();
|
|
4315
|
-
expect(result.find('TeamMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('team-multi'));
|
|
4112
|
+
expect(result.find('TeamMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('team-multi'));
|
|
4316
4113
|
expect(result.find('TeamMultiFieldMock')).toMatchSnapshot();
|
|
4317
4114
|
result.unmount();
|
|
4318
|
-
|
|
4319
4115
|
case 8:
|
|
4320
4116
|
case "end":
|
|
4321
4117
|
return _context157.stop();
|
|
@@ -4323,9 +4119,9 @@ describe('setValue', function () {
|
|
|
4323
4119
|
}
|
|
4324
4120
|
}, _callee157);
|
|
4325
4121
|
})));
|
|
4326
|
-
test('text', /*#__PURE__*/
|
|
4122
|
+
test('text', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee158() {
|
|
4327
4123
|
var result;
|
|
4328
|
-
return
|
|
4124
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee158$(_context158) {
|
|
4329
4125
|
while (1) {
|
|
4330
4126
|
switch (_context158.prev = _context158.next) {
|
|
4331
4127
|
case 0:
|
|
@@ -4341,16 +4137,13 @@ describe('setValue', function () {
|
|
|
4341
4137
|
};
|
|
4342
4138
|
}
|
|
4343
4139
|
});
|
|
4344
|
-
|
|
4345
4140
|
case 2:
|
|
4346
4141
|
result = _context158.sent;
|
|
4347
|
-
setValue(FORM_KEY, 'test', '');
|
|
4142
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4348
4143
|
result.update();
|
|
4349
4144
|
expect(result.find('TextFieldMock').prop('value')).toBe(''); // no default
|
|
4350
|
-
|
|
4351
4145
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
4352
4146
|
result.unmount();
|
|
4353
|
-
|
|
4354
4147
|
case 8:
|
|
4355
4148
|
case "end":
|
|
4356
4149
|
return _context158.stop();
|
|
@@ -4358,9 +4151,9 @@ describe('setValue', function () {
|
|
|
4358
4151
|
}
|
|
4359
4152
|
}, _callee158);
|
|
4360
4153
|
})));
|
|
4361
|
-
test('text-multi', /*#__PURE__*/
|
|
4154
|
+
test('text-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee159() {
|
|
4362
4155
|
var result;
|
|
4363
|
-
return
|
|
4156
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee159$(_context159) {
|
|
4364
4157
|
while (1) {
|
|
4365
4158
|
switch (_context159.prev = _context159.next) {
|
|
4366
4159
|
case 0:
|
|
@@ -4376,15 +4169,13 @@ describe('setValue', function () {
|
|
|
4376
4169
|
};
|
|
4377
4170
|
}
|
|
4378
4171
|
});
|
|
4379
|
-
|
|
4380
4172
|
case 2:
|
|
4381
4173
|
result = _context159.sent;
|
|
4382
|
-
setValue(FORM_KEY, 'test', '');
|
|
4174
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4383
4175
|
result.update();
|
|
4384
|
-
expect(result.find('TextMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('text-multi'));
|
|
4176
|
+
expect(result.find('TextMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('text-multi'));
|
|
4385
4177
|
expect(result.find('TextMultiFieldMock')).toMatchSnapshot();
|
|
4386
4178
|
result.unmount();
|
|
4387
|
-
|
|
4388
4179
|
case 8:
|
|
4389
4180
|
case "end":
|
|
4390
4181
|
return _context159.stop();
|
|
@@ -4392,9 +4183,9 @@ describe('setValue', function () {
|
|
|
4392
4183
|
}
|
|
4393
4184
|
}, _callee159);
|
|
4394
4185
|
})));
|
|
4395
|
-
test('user', /*#__PURE__*/
|
|
4186
|
+
test('user', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee160() {
|
|
4396
4187
|
var result;
|
|
4397
|
-
return
|
|
4188
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee160$(_context160) {
|
|
4398
4189
|
while (1) {
|
|
4399
4190
|
switch (_context160.prev = _context160.next) {
|
|
4400
4191
|
case 0:
|
|
@@ -4412,15 +4203,13 @@ describe('setValue', function () {
|
|
|
4412
4203
|
};
|
|
4413
4204
|
}
|
|
4414
4205
|
});
|
|
4415
|
-
|
|
4416
4206
|
case 2:
|
|
4417
4207
|
result = _context160.sent;
|
|
4418
|
-
setValue(FORM_KEY, 'test', '');
|
|
4208
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4419
4209
|
result.update();
|
|
4420
|
-
expect(result.find('UserFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('user'));
|
|
4210
|
+
expect(result.find('UserFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('user'));
|
|
4421
4211
|
expect(result.find('UserFieldMock')).toMatchSnapshot();
|
|
4422
4212
|
result.unmount();
|
|
4423
|
-
|
|
4424
4213
|
case 8:
|
|
4425
4214
|
case "end":
|
|
4426
4215
|
return _context160.stop();
|
|
@@ -4428,9 +4217,9 @@ describe('setValue', function () {
|
|
|
4428
4217
|
}
|
|
4429
4218
|
}, _callee160);
|
|
4430
4219
|
})));
|
|
4431
|
-
test('user-multi', /*#__PURE__*/
|
|
4220
|
+
test('user-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee161() {
|
|
4432
4221
|
var result;
|
|
4433
|
-
return
|
|
4222
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee161$(_context161) {
|
|
4434
4223
|
while (1) {
|
|
4435
4224
|
switch (_context161.prev = _context161.next) {
|
|
4436
4225
|
case 0:
|
|
@@ -4450,15 +4239,13 @@ describe('setValue', function () {
|
|
|
4450
4239
|
};
|
|
4451
4240
|
}
|
|
4452
4241
|
});
|
|
4453
|
-
|
|
4454
4242
|
case 2:
|
|
4455
4243
|
result = _context161.sent;
|
|
4456
|
-
setValue(FORM_KEY, 'test', '');
|
|
4244
|
+
(0, _Form.setValue)(FORM_KEY, 'test', '');
|
|
4457
4245
|
result.update();
|
|
4458
|
-
expect(result.find('UserMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('user-multi'));
|
|
4246
|
+
expect(result.find('UserMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('user-multi'));
|
|
4459
4247
|
expect(result.find('UserMultiFieldMock')).toMatchSnapshot();
|
|
4460
4248
|
result.unmount();
|
|
4461
|
-
|
|
4462
4249
|
case 8:
|
|
4463
4250
|
case "end":
|
|
4464
4251
|
return _context161.stop();
|
|
@@ -4468,9 +4255,9 @@ describe('setValue', function () {
|
|
|
4468
4255
|
})));
|
|
4469
4256
|
});
|
|
4470
4257
|
describe('null values should use FIELD_DEFAULT_VALUES', function () {
|
|
4471
|
-
test('attributes', /*#__PURE__*/
|
|
4258
|
+
test('attributes', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee162() {
|
|
4472
4259
|
var result;
|
|
4473
|
-
return
|
|
4260
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee162$(_context162) {
|
|
4474
4261
|
while (1) {
|
|
4475
4262
|
switch (_context162.prev = _context162.next) {
|
|
4476
4263
|
case 0:
|
|
@@ -4488,15 +4275,13 @@ describe('setValue', function () {
|
|
|
4488
4275
|
};
|
|
4489
4276
|
}
|
|
4490
4277
|
});
|
|
4491
|
-
|
|
4492
4278
|
case 2:
|
|
4493
4279
|
result = _context162.sent;
|
|
4494
|
-
setValue(FORM_KEY, 'test', null);
|
|
4280
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4495
4281
|
result.update();
|
|
4496
|
-
expect(result.find('AttributesFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('attributes'));
|
|
4282
|
+
expect(result.find('AttributesFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('attributes'));
|
|
4497
4283
|
expect(result.find('AttributesFieldMock')).toMatchSnapshot();
|
|
4498
4284
|
result.unmount();
|
|
4499
|
-
|
|
4500
4285
|
case 8:
|
|
4501
4286
|
case "end":
|
|
4502
4287
|
return _context162.stop();
|
|
@@ -4504,9 +4289,9 @@ describe('setValue', function () {
|
|
|
4504
4289
|
}
|
|
4505
4290
|
}, _callee162);
|
|
4506
4291
|
})));
|
|
4507
|
-
test('checkbox', /*#__PURE__*/
|
|
4292
|
+
test('checkbox', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee163() {
|
|
4508
4293
|
var result;
|
|
4509
|
-
return
|
|
4294
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee163$(_context163) {
|
|
4510
4295
|
while (1) {
|
|
4511
4296
|
switch (_context163.prev = _context163.next) {
|
|
4512
4297
|
case 0:
|
|
@@ -4522,15 +4307,13 @@ describe('setValue', function () {
|
|
|
4522
4307
|
};
|
|
4523
4308
|
}
|
|
4524
4309
|
});
|
|
4525
|
-
|
|
4526
4310
|
case 2:
|
|
4527
4311
|
result = _context163.sent;
|
|
4528
|
-
setValue(FORM_KEY, 'test', null);
|
|
4312
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4529
4313
|
result.update();
|
|
4530
|
-
expect(result.find('CheckboxFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('checkbox'));
|
|
4314
|
+
expect(result.find('CheckboxFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('checkbox'));
|
|
4531
4315
|
expect(result.find('CheckboxFieldMock')).toMatchSnapshot();
|
|
4532
4316
|
result.unmount();
|
|
4533
|
-
|
|
4534
4317
|
case 8:
|
|
4535
4318
|
case "end":
|
|
4536
4319
|
return _context163.stop();
|
|
@@ -4538,9 +4321,9 @@ describe('setValue', function () {
|
|
|
4538
4321
|
}
|
|
4539
4322
|
}, _callee163);
|
|
4540
4323
|
})));
|
|
4541
|
-
test('code', /*#__PURE__*/
|
|
4324
|
+
test('code', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee164() {
|
|
4542
4325
|
var result;
|
|
4543
|
-
return
|
|
4326
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee164$(_context164) {
|
|
4544
4327
|
while (1) {
|
|
4545
4328
|
switch (_context164.prev = _context164.next) {
|
|
4546
4329
|
case 0:
|
|
@@ -4556,16 +4339,13 @@ describe('setValue', function () {
|
|
|
4556
4339
|
};
|
|
4557
4340
|
}
|
|
4558
4341
|
});
|
|
4559
|
-
|
|
4560
4342
|
case 2:
|
|
4561
4343
|
result = _context164.sent;
|
|
4562
|
-
setValue(FORM_KEY, 'test', null);
|
|
4344
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4563
4345
|
result.update();
|
|
4564
4346
|
expect(result.find('CodeFieldMock').prop('value')).toBe(''); // no default
|
|
4565
|
-
|
|
4566
4347
|
expect(result.find('CodeFieldMock')).toMatchSnapshot();
|
|
4567
4348
|
result.unmount();
|
|
4568
|
-
|
|
4569
4349
|
case 8:
|
|
4570
4350
|
case "end":
|
|
4571
4351
|
return _context164.stop();
|
|
@@ -4573,9 +4353,9 @@ describe('setValue', function () {
|
|
|
4573
4353
|
}
|
|
4574
4354
|
}, _callee164);
|
|
4575
4355
|
})));
|
|
4576
|
-
test('form', /*#__PURE__*/
|
|
4356
|
+
test('form', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee165() {
|
|
4577
4357
|
var result;
|
|
4578
|
-
return
|
|
4358
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee165$(_context165) {
|
|
4579
4359
|
while (1) {
|
|
4580
4360
|
switch (_context165.prev = _context165.next) {
|
|
4581
4361
|
case 0:
|
|
@@ -4594,15 +4374,13 @@ describe('setValue', function () {
|
|
|
4594
4374
|
};
|
|
4595
4375
|
}
|
|
4596
4376
|
});
|
|
4597
|
-
|
|
4598
4377
|
case 2:
|
|
4599
4378
|
result = _context165.sent;
|
|
4600
|
-
setValue(FORM_KEY, 'test', null);
|
|
4379
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4601
4380
|
result.update();
|
|
4602
|
-
expect(result.find('FormFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('form'));
|
|
4381
|
+
expect(result.find('FormFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('form'));
|
|
4603
4382
|
expect(result.find('FormFieldMock')).toMatchSnapshot();
|
|
4604
4383
|
result.unmount();
|
|
4605
|
-
|
|
4606
4384
|
case 8:
|
|
4607
4385
|
case "end":
|
|
4608
4386
|
return _context165.stop();
|
|
@@ -4610,9 +4388,9 @@ describe('setValue', function () {
|
|
|
4610
4388
|
}
|
|
4611
4389
|
}, _callee165);
|
|
4612
4390
|
})));
|
|
4613
|
-
test('form-multi', /*#__PURE__*/
|
|
4391
|
+
test('form-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee166() {
|
|
4614
4392
|
var result;
|
|
4615
|
-
return
|
|
4393
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee166$(_context166) {
|
|
4616
4394
|
while (1) {
|
|
4617
4395
|
switch (_context166.prev = _context166.next) {
|
|
4618
4396
|
case 0:
|
|
@@ -4634,15 +4412,13 @@ describe('setValue', function () {
|
|
|
4634
4412
|
};
|
|
4635
4413
|
}
|
|
4636
4414
|
});
|
|
4637
|
-
|
|
4638
4415
|
case 2:
|
|
4639
4416
|
result = _context166.sent;
|
|
4640
|
-
setValue(FORM_KEY, 'test', null);
|
|
4417
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4641
4418
|
result.update();
|
|
4642
|
-
expect(result.find('FormMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('form-multi'));
|
|
4419
|
+
expect(result.find('FormMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('form-multi'));
|
|
4643
4420
|
expect(result.find('FormMultiFieldMock')).toMatchSnapshot();
|
|
4644
4421
|
result.unmount();
|
|
4645
|
-
|
|
4646
4422
|
case 8:
|
|
4647
4423
|
case "end":
|
|
4648
4424
|
return _context166.stop();
|
|
@@ -4650,9 +4426,9 @@ describe('setValue', function () {
|
|
|
4650
4426
|
}
|
|
4651
4427
|
}, _callee166);
|
|
4652
4428
|
})));
|
|
4653
|
-
test('password', /*#__PURE__*/
|
|
4429
|
+
test('password', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee167() {
|
|
4654
4430
|
var result;
|
|
4655
|
-
return
|
|
4431
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee167$(_context167) {
|
|
4656
4432
|
while (1) {
|
|
4657
4433
|
switch (_context167.prev = _context167.next) {
|
|
4658
4434
|
case 0:
|
|
@@ -4668,16 +4444,13 @@ describe('setValue', function () {
|
|
|
4668
4444
|
};
|
|
4669
4445
|
}
|
|
4670
4446
|
});
|
|
4671
|
-
|
|
4672
4447
|
case 2:
|
|
4673
4448
|
result = _context167.sent;
|
|
4674
|
-
setValue(FORM_KEY, 'test', null);
|
|
4449
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4675
4450
|
result.update();
|
|
4676
4451
|
expect(result.find('PasswordFieldMock').prop('value')).toBe(''); // no default
|
|
4677
|
-
|
|
4678
4452
|
expect(result.find('PasswordFieldMock')).toMatchSnapshot();
|
|
4679
4453
|
result.unmount();
|
|
4680
|
-
|
|
4681
4454
|
case 8:
|
|
4682
4455
|
case "end":
|
|
4683
4456
|
return _context167.stop();
|
|
@@ -4685,9 +4458,9 @@ describe('setValue', function () {
|
|
|
4685
4458
|
}
|
|
4686
4459
|
}, _callee167);
|
|
4687
4460
|
})));
|
|
4688
|
-
test('radio', /*#__PURE__*/
|
|
4461
|
+
test('radio', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee168() {
|
|
4689
4462
|
var result;
|
|
4690
|
-
return
|
|
4463
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee168$(_context168) {
|
|
4691
4464
|
while (1) {
|
|
4692
4465
|
switch (_context168.prev = _context168.next) {
|
|
4693
4466
|
case 0:
|
|
@@ -4706,16 +4479,13 @@ describe('setValue', function () {
|
|
|
4706
4479
|
};
|
|
4707
4480
|
}
|
|
4708
4481
|
});
|
|
4709
|
-
|
|
4710
4482
|
case 2:
|
|
4711
4483
|
result = _context168.sent;
|
|
4712
|
-
setValue(FORM_KEY, 'test', null);
|
|
4484
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4713
4485
|
result.update();
|
|
4714
4486
|
expect(result.find('RadioFieldMock').prop('value')).toBe(''); // no default
|
|
4715
|
-
|
|
4716
4487
|
expect(result.find('RadioFieldMock')).toMatchSnapshot();
|
|
4717
4488
|
result.unmount();
|
|
4718
|
-
|
|
4719
4489
|
case 8:
|
|
4720
4490
|
case "end":
|
|
4721
4491
|
return _context168.stop();
|
|
@@ -4723,9 +4493,9 @@ describe('setValue', function () {
|
|
|
4723
4493
|
}
|
|
4724
4494
|
}, _callee168);
|
|
4725
4495
|
})));
|
|
4726
|
-
test('select', /*#__PURE__*/
|
|
4496
|
+
test('select', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee169() {
|
|
4727
4497
|
var result;
|
|
4728
|
-
return
|
|
4498
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee169$(_context169) {
|
|
4729
4499
|
while (1) {
|
|
4730
4500
|
switch (_context169.prev = _context169.next) {
|
|
4731
4501
|
case 0:
|
|
@@ -4744,16 +4514,13 @@ describe('setValue', function () {
|
|
|
4744
4514
|
};
|
|
4745
4515
|
}
|
|
4746
4516
|
});
|
|
4747
|
-
|
|
4748
4517
|
case 2:
|
|
4749
4518
|
result = _context169.sent;
|
|
4750
|
-
setValue(FORM_KEY, 'test', null);
|
|
4519
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4751
4520
|
result.update();
|
|
4752
4521
|
expect(result.find('SelectFieldMock').prop('value')).toBe(''); // no default
|
|
4753
|
-
|
|
4754
4522
|
expect(result.find('SelectFieldMock')).toMatchSnapshot();
|
|
4755
4523
|
result.unmount();
|
|
4756
|
-
|
|
4757
4524
|
case 8:
|
|
4758
4525
|
case "end":
|
|
4759
4526
|
return _context169.stop();
|
|
@@ -4761,9 +4528,9 @@ describe('setValue', function () {
|
|
|
4761
4528
|
}
|
|
4762
4529
|
}, _callee169);
|
|
4763
4530
|
})));
|
|
4764
|
-
test('select-multi', /*#__PURE__*/
|
|
4531
|
+
test('select-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee170() {
|
|
4765
4532
|
var result;
|
|
4766
|
-
return
|
|
4533
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee170$(_context170) {
|
|
4767
4534
|
while (1) {
|
|
4768
4535
|
switch (_context170.prev = _context170.next) {
|
|
4769
4536
|
case 0:
|
|
@@ -4785,15 +4552,13 @@ describe('setValue', function () {
|
|
|
4785
4552
|
};
|
|
4786
4553
|
}
|
|
4787
4554
|
});
|
|
4788
|
-
|
|
4789
4555
|
case 2:
|
|
4790
4556
|
result = _context170.sent;
|
|
4791
|
-
setValue(FORM_KEY, 'test', null);
|
|
4557
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4792
4558
|
result.update();
|
|
4793
|
-
expect(result.find('SelectMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('select-multi'));
|
|
4559
|
+
expect(result.find('SelectMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('select-multi'));
|
|
4794
4560
|
expect(result.find('SelectMultiFieldMock')).toMatchSnapshot();
|
|
4795
4561
|
result.unmount();
|
|
4796
|
-
|
|
4797
4562
|
case 8:
|
|
4798
4563
|
case "end":
|
|
4799
4564
|
return _context170.stop();
|
|
@@ -4801,9 +4566,9 @@ describe('setValue', function () {
|
|
|
4801
4566
|
}
|
|
4802
4567
|
}, _callee170);
|
|
4803
4568
|
})));
|
|
4804
|
-
test('team', /*#__PURE__*/
|
|
4569
|
+
test('team', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee171() {
|
|
4805
4570
|
var result;
|
|
4806
|
-
return
|
|
4571
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee171$(_context171) {
|
|
4807
4572
|
while (1) {
|
|
4808
4573
|
switch (_context171.prev = _context171.next) {
|
|
4809
4574
|
case 0:
|
|
@@ -4822,15 +4587,13 @@ describe('setValue', function () {
|
|
|
4822
4587
|
};
|
|
4823
4588
|
}
|
|
4824
4589
|
});
|
|
4825
|
-
|
|
4826
4590
|
case 2:
|
|
4827
4591
|
result = _context171.sent;
|
|
4828
|
-
setValue(FORM_KEY, 'test', null);
|
|
4592
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4829
4593
|
result.update();
|
|
4830
|
-
expect(result.find('TeamFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('team'));
|
|
4594
|
+
expect(result.find('TeamFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('team'));
|
|
4831
4595
|
expect(result.find('TeamFieldMock')).toMatchSnapshot();
|
|
4832
4596
|
result.unmount();
|
|
4833
|
-
|
|
4834
4597
|
case 8:
|
|
4835
4598
|
case "end":
|
|
4836
4599
|
return _context171.stop();
|
|
@@ -4838,9 +4601,9 @@ describe('setValue', function () {
|
|
|
4838
4601
|
}
|
|
4839
4602
|
}, _callee171);
|
|
4840
4603
|
})));
|
|
4841
|
-
test('team-multi', /*#__PURE__*/
|
|
4604
|
+
test('team-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee172() {
|
|
4842
4605
|
var result;
|
|
4843
|
-
return
|
|
4606
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee172$(_context172) {
|
|
4844
4607
|
while (1) {
|
|
4845
4608
|
switch (_context172.prev = _context172.next) {
|
|
4846
4609
|
case 0:
|
|
@@ -4862,15 +4625,13 @@ describe('setValue', function () {
|
|
|
4862
4625
|
};
|
|
4863
4626
|
}
|
|
4864
4627
|
});
|
|
4865
|
-
|
|
4866
4628
|
case 2:
|
|
4867
4629
|
result = _context172.sent;
|
|
4868
|
-
setValue(FORM_KEY, 'test', null);
|
|
4630
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4869
4631
|
result.update();
|
|
4870
|
-
expect(result.find('TeamMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('team-multi'));
|
|
4632
|
+
expect(result.find('TeamMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('team-multi'));
|
|
4871
4633
|
expect(result.find('TeamMultiFieldMock')).toMatchSnapshot();
|
|
4872
4634
|
result.unmount();
|
|
4873
|
-
|
|
4874
4635
|
case 8:
|
|
4875
4636
|
case "end":
|
|
4876
4637
|
return _context172.stop();
|
|
@@ -4878,9 +4639,9 @@ describe('setValue', function () {
|
|
|
4878
4639
|
}
|
|
4879
4640
|
}, _callee172);
|
|
4880
4641
|
})));
|
|
4881
|
-
test('text', /*#__PURE__*/
|
|
4642
|
+
test('text', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee173() {
|
|
4882
4643
|
var result;
|
|
4883
|
-
return
|
|
4644
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee173$(_context173) {
|
|
4884
4645
|
while (1) {
|
|
4885
4646
|
switch (_context173.prev = _context173.next) {
|
|
4886
4647
|
case 0:
|
|
@@ -4896,16 +4657,13 @@ describe('setValue', function () {
|
|
|
4896
4657
|
};
|
|
4897
4658
|
}
|
|
4898
4659
|
});
|
|
4899
|
-
|
|
4900
4660
|
case 2:
|
|
4901
4661
|
result = _context173.sent;
|
|
4902
|
-
setValue(FORM_KEY, 'test', null);
|
|
4662
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4903
4663
|
result.update();
|
|
4904
4664
|
expect(result.find('TextFieldMock').prop('value')).toBe(''); // no default
|
|
4905
|
-
|
|
4906
4665
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
4907
4666
|
result.unmount();
|
|
4908
|
-
|
|
4909
4667
|
case 8:
|
|
4910
4668
|
case "end":
|
|
4911
4669
|
return _context173.stop();
|
|
@@ -4913,9 +4671,9 @@ describe('setValue', function () {
|
|
|
4913
4671
|
}
|
|
4914
4672
|
}, _callee173);
|
|
4915
4673
|
})));
|
|
4916
|
-
test('text-multi', /*#__PURE__*/
|
|
4674
|
+
test('text-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee174() {
|
|
4917
4675
|
var result;
|
|
4918
|
-
return
|
|
4676
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee174$(_context174) {
|
|
4919
4677
|
while (1) {
|
|
4920
4678
|
switch (_context174.prev = _context174.next) {
|
|
4921
4679
|
case 0:
|
|
@@ -4931,15 +4689,13 @@ describe('setValue', function () {
|
|
|
4931
4689
|
};
|
|
4932
4690
|
}
|
|
4933
4691
|
});
|
|
4934
|
-
|
|
4935
4692
|
case 2:
|
|
4936
4693
|
result = _context174.sent;
|
|
4937
|
-
setValue(FORM_KEY, 'test', null);
|
|
4694
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4938
4695
|
result.update();
|
|
4939
|
-
expect(result.find('TextMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('text-multi'));
|
|
4696
|
+
expect(result.find('TextMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('text-multi'));
|
|
4940
4697
|
expect(result.find('TextMultiFieldMock')).toMatchSnapshot();
|
|
4941
4698
|
result.unmount();
|
|
4942
|
-
|
|
4943
4699
|
case 8:
|
|
4944
4700
|
case "end":
|
|
4945
4701
|
return _context174.stop();
|
|
@@ -4947,9 +4703,9 @@ describe('setValue', function () {
|
|
|
4947
4703
|
}
|
|
4948
4704
|
}, _callee174);
|
|
4949
4705
|
})));
|
|
4950
|
-
test('user', /*#__PURE__*/
|
|
4706
|
+
test('user', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee175() {
|
|
4951
4707
|
var result;
|
|
4952
|
-
return
|
|
4708
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee175$(_context175) {
|
|
4953
4709
|
while (1) {
|
|
4954
4710
|
switch (_context175.prev = _context175.next) {
|
|
4955
4711
|
case 0:
|
|
@@ -4967,15 +4723,13 @@ describe('setValue', function () {
|
|
|
4967
4723
|
};
|
|
4968
4724
|
}
|
|
4969
4725
|
});
|
|
4970
|
-
|
|
4971
4726
|
case 2:
|
|
4972
4727
|
result = _context175.sent;
|
|
4973
|
-
setValue(FORM_KEY, 'test', null);
|
|
4728
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
4974
4729
|
result.update();
|
|
4975
|
-
expect(result.find('UserFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('user'));
|
|
4730
|
+
expect(result.find('UserFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('user'));
|
|
4976
4731
|
expect(result.find('UserFieldMock')).toMatchSnapshot();
|
|
4977
4732
|
result.unmount();
|
|
4978
|
-
|
|
4979
4733
|
case 8:
|
|
4980
4734
|
case "end":
|
|
4981
4735
|
return _context175.stop();
|
|
@@ -4983,9 +4737,9 @@ describe('setValue', function () {
|
|
|
4983
4737
|
}
|
|
4984
4738
|
}, _callee175);
|
|
4985
4739
|
})));
|
|
4986
|
-
test('user-multi', /*#__PURE__*/
|
|
4740
|
+
test('user-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee176() {
|
|
4987
4741
|
var result;
|
|
4988
|
-
return
|
|
4742
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee176$(_context176) {
|
|
4989
4743
|
while (1) {
|
|
4990
4744
|
switch (_context176.prev = _context176.next) {
|
|
4991
4745
|
case 0:
|
|
@@ -5005,15 +4759,13 @@ describe('setValue', function () {
|
|
|
5005
4759
|
};
|
|
5006
4760
|
}
|
|
5007
4761
|
});
|
|
5008
|
-
|
|
5009
4762
|
case 2:
|
|
5010
4763
|
result = _context176.sent;
|
|
5011
|
-
setValue(FORM_KEY, 'test', null);
|
|
4764
|
+
(0, _Form.setValue)(FORM_KEY, 'test', null);
|
|
5012
4765
|
result.update();
|
|
5013
|
-
expect(result.find('UserMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('user-multi'));
|
|
4766
|
+
expect(result.find('UserMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('user-multi'));
|
|
5014
4767
|
expect(result.find('UserMultiFieldMock')).toMatchSnapshot();
|
|
5015
4768
|
result.unmount();
|
|
5016
|
-
|
|
5017
4769
|
case 8:
|
|
5018
4770
|
case "end":
|
|
5019
4771
|
return _context176.stop();
|
|
@@ -5023,9 +4775,9 @@ describe('setValue', function () {
|
|
|
5023
4775
|
})));
|
|
5024
4776
|
});
|
|
5025
4777
|
describe('undefined values should use FIELD_DEFAULT_VALUES', function () {
|
|
5026
|
-
test('attributes', /*#__PURE__*/
|
|
4778
|
+
test('attributes', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee177() {
|
|
5027
4779
|
var result;
|
|
5028
|
-
return
|
|
4780
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee177$(_context177) {
|
|
5029
4781
|
while (1) {
|
|
5030
4782
|
switch (_context177.prev = _context177.next) {
|
|
5031
4783
|
case 0:
|
|
@@ -5043,15 +4795,13 @@ describe('setValue', function () {
|
|
|
5043
4795
|
};
|
|
5044
4796
|
}
|
|
5045
4797
|
});
|
|
5046
|
-
|
|
5047
4798
|
case 2:
|
|
5048
4799
|
result = _context177.sent;
|
|
5049
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
4800
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5050
4801
|
result.update();
|
|
5051
|
-
expect(result.find('AttributesFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('attributes'));
|
|
4802
|
+
expect(result.find('AttributesFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('attributes'));
|
|
5052
4803
|
expect(result.find('AttributesFieldMock')).toMatchSnapshot();
|
|
5053
4804
|
result.unmount();
|
|
5054
|
-
|
|
5055
4805
|
case 8:
|
|
5056
4806
|
case "end":
|
|
5057
4807
|
return _context177.stop();
|
|
@@ -5059,9 +4809,9 @@ describe('setValue', function () {
|
|
|
5059
4809
|
}
|
|
5060
4810
|
}, _callee177);
|
|
5061
4811
|
})));
|
|
5062
|
-
test('checkbox', /*#__PURE__*/
|
|
4812
|
+
test('checkbox', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee178() {
|
|
5063
4813
|
var result;
|
|
5064
|
-
return
|
|
4814
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee178$(_context178) {
|
|
5065
4815
|
while (1) {
|
|
5066
4816
|
switch (_context178.prev = _context178.next) {
|
|
5067
4817
|
case 0:
|
|
@@ -5077,15 +4827,13 @@ describe('setValue', function () {
|
|
|
5077
4827
|
};
|
|
5078
4828
|
}
|
|
5079
4829
|
});
|
|
5080
|
-
|
|
5081
4830
|
case 2:
|
|
5082
4831
|
result = _context178.sent;
|
|
5083
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
4832
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5084
4833
|
result.update();
|
|
5085
|
-
expect(result.find('CheckboxFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('checkbox'));
|
|
4834
|
+
expect(result.find('CheckboxFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('checkbox'));
|
|
5086
4835
|
expect(result.find('CheckboxFieldMock')).toMatchSnapshot();
|
|
5087
4836
|
result.unmount();
|
|
5088
|
-
|
|
5089
4837
|
case 8:
|
|
5090
4838
|
case "end":
|
|
5091
4839
|
return _context178.stop();
|
|
@@ -5093,9 +4841,9 @@ describe('setValue', function () {
|
|
|
5093
4841
|
}
|
|
5094
4842
|
}, _callee178);
|
|
5095
4843
|
})));
|
|
5096
|
-
test('code', /*#__PURE__*/
|
|
4844
|
+
test('code', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee179() {
|
|
5097
4845
|
var result;
|
|
5098
|
-
return
|
|
4846
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee179$(_context179) {
|
|
5099
4847
|
while (1) {
|
|
5100
4848
|
switch (_context179.prev = _context179.next) {
|
|
5101
4849
|
case 0:
|
|
@@ -5111,16 +4859,13 @@ describe('setValue', function () {
|
|
|
5111
4859
|
};
|
|
5112
4860
|
}
|
|
5113
4861
|
});
|
|
5114
|
-
|
|
5115
4862
|
case 2:
|
|
5116
4863
|
result = _context179.sent;
|
|
5117
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
4864
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5118
4865
|
result.update();
|
|
5119
4866
|
expect(result.find('CodeFieldMock').prop('value')).toBe(''); // no default
|
|
5120
|
-
|
|
5121
4867
|
expect(result.find('CodeFieldMock')).toMatchSnapshot();
|
|
5122
4868
|
result.unmount();
|
|
5123
|
-
|
|
5124
4869
|
case 8:
|
|
5125
4870
|
case "end":
|
|
5126
4871
|
return _context179.stop();
|
|
@@ -5128,9 +4873,9 @@ describe('setValue', function () {
|
|
|
5128
4873
|
}
|
|
5129
4874
|
}, _callee179);
|
|
5130
4875
|
})));
|
|
5131
|
-
test('form', /*#__PURE__*/
|
|
4876
|
+
test('form', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee180() {
|
|
5132
4877
|
var result;
|
|
5133
|
-
return
|
|
4878
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee180$(_context180) {
|
|
5134
4879
|
while (1) {
|
|
5135
4880
|
switch (_context180.prev = _context180.next) {
|
|
5136
4881
|
case 0:
|
|
@@ -5149,15 +4894,13 @@ describe('setValue', function () {
|
|
|
5149
4894
|
};
|
|
5150
4895
|
}
|
|
5151
4896
|
});
|
|
5152
|
-
|
|
5153
4897
|
case 2:
|
|
5154
4898
|
result = _context180.sent;
|
|
5155
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
4899
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5156
4900
|
result.update();
|
|
5157
|
-
expect(result.find('FormFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('form'));
|
|
4901
|
+
expect(result.find('FormFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('form'));
|
|
5158
4902
|
expect(result.find('FormFieldMock')).toMatchSnapshot();
|
|
5159
4903
|
result.unmount();
|
|
5160
|
-
|
|
5161
4904
|
case 8:
|
|
5162
4905
|
case "end":
|
|
5163
4906
|
return _context180.stop();
|
|
@@ -5165,9 +4908,9 @@ describe('setValue', function () {
|
|
|
5165
4908
|
}
|
|
5166
4909
|
}, _callee180);
|
|
5167
4910
|
})));
|
|
5168
|
-
test('form-multi', /*#__PURE__*/
|
|
4911
|
+
test('form-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee181() {
|
|
5169
4912
|
var result;
|
|
5170
|
-
return
|
|
4913
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee181$(_context181) {
|
|
5171
4914
|
while (1) {
|
|
5172
4915
|
switch (_context181.prev = _context181.next) {
|
|
5173
4916
|
case 0:
|
|
@@ -5189,15 +4932,13 @@ describe('setValue', function () {
|
|
|
5189
4932
|
};
|
|
5190
4933
|
}
|
|
5191
4934
|
});
|
|
5192
|
-
|
|
5193
4935
|
case 2:
|
|
5194
4936
|
result = _context181.sent;
|
|
5195
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
4937
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5196
4938
|
result.update();
|
|
5197
|
-
expect(result.find('FormMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('form-multi'));
|
|
4939
|
+
expect(result.find('FormMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('form-multi'));
|
|
5198
4940
|
expect(result.find('FormMultiFieldMock')).toMatchSnapshot();
|
|
5199
4941
|
result.unmount();
|
|
5200
|
-
|
|
5201
4942
|
case 8:
|
|
5202
4943
|
case "end":
|
|
5203
4944
|
return _context181.stop();
|
|
@@ -5205,9 +4946,9 @@ describe('setValue', function () {
|
|
|
5205
4946
|
}
|
|
5206
4947
|
}, _callee181);
|
|
5207
4948
|
})));
|
|
5208
|
-
test('password', /*#__PURE__*/
|
|
4949
|
+
test('password', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee182() {
|
|
5209
4950
|
var result;
|
|
5210
|
-
return
|
|
4951
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee182$(_context182) {
|
|
5211
4952
|
while (1) {
|
|
5212
4953
|
switch (_context182.prev = _context182.next) {
|
|
5213
4954
|
case 0:
|
|
@@ -5223,16 +4964,13 @@ describe('setValue', function () {
|
|
|
5223
4964
|
};
|
|
5224
4965
|
}
|
|
5225
4966
|
});
|
|
5226
|
-
|
|
5227
4967
|
case 2:
|
|
5228
4968
|
result = _context182.sent;
|
|
5229
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
4969
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5230
4970
|
result.update();
|
|
5231
4971
|
expect(result.find('PasswordFieldMock').prop('value')).toBe(''); // no default
|
|
5232
|
-
|
|
5233
4972
|
expect(result.find('PasswordFieldMock')).toMatchSnapshot();
|
|
5234
4973
|
result.unmount();
|
|
5235
|
-
|
|
5236
4974
|
case 8:
|
|
5237
4975
|
case "end":
|
|
5238
4976
|
return _context182.stop();
|
|
@@ -5240,9 +4978,9 @@ describe('setValue', function () {
|
|
|
5240
4978
|
}
|
|
5241
4979
|
}, _callee182);
|
|
5242
4980
|
})));
|
|
5243
|
-
test('radio', /*#__PURE__*/
|
|
4981
|
+
test('radio', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee183() {
|
|
5244
4982
|
var result;
|
|
5245
|
-
return
|
|
4983
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee183$(_context183) {
|
|
5246
4984
|
while (1) {
|
|
5247
4985
|
switch (_context183.prev = _context183.next) {
|
|
5248
4986
|
case 0:
|
|
@@ -5261,16 +4999,13 @@ describe('setValue', function () {
|
|
|
5261
4999
|
};
|
|
5262
5000
|
}
|
|
5263
5001
|
});
|
|
5264
|
-
|
|
5265
5002
|
case 2:
|
|
5266
5003
|
result = _context183.sent;
|
|
5267
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
5004
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5268
5005
|
result.update();
|
|
5269
5006
|
expect(result.find('RadioFieldMock').prop('value')).toBe(''); // no default
|
|
5270
|
-
|
|
5271
5007
|
expect(result.find('RadioFieldMock')).toMatchSnapshot();
|
|
5272
5008
|
result.unmount();
|
|
5273
|
-
|
|
5274
5009
|
case 8:
|
|
5275
5010
|
case "end":
|
|
5276
5011
|
return _context183.stop();
|
|
@@ -5278,9 +5013,9 @@ describe('setValue', function () {
|
|
|
5278
5013
|
}
|
|
5279
5014
|
}, _callee183);
|
|
5280
5015
|
})));
|
|
5281
|
-
test('select', /*#__PURE__*/
|
|
5016
|
+
test('select', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee184() {
|
|
5282
5017
|
var result;
|
|
5283
|
-
return
|
|
5018
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee184$(_context184) {
|
|
5284
5019
|
while (1) {
|
|
5285
5020
|
switch (_context184.prev = _context184.next) {
|
|
5286
5021
|
case 0:
|
|
@@ -5299,16 +5034,13 @@ describe('setValue', function () {
|
|
|
5299
5034
|
};
|
|
5300
5035
|
}
|
|
5301
5036
|
});
|
|
5302
|
-
|
|
5303
5037
|
case 2:
|
|
5304
5038
|
result = _context184.sent;
|
|
5305
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
5039
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5306
5040
|
result.update();
|
|
5307
5041
|
expect(result.find('SelectFieldMock').prop('value')).toBe(''); // no default
|
|
5308
|
-
|
|
5309
5042
|
expect(result.find('SelectFieldMock')).toMatchSnapshot();
|
|
5310
5043
|
result.unmount();
|
|
5311
|
-
|
|
5312
5044
|
case 8:
|
|
5313
5045
|
case "end":
|
|
5314
5046
|
return _context184.stop();
|
|
@@ -5316,9 +5048,9 @@ describe('setValue', function () {
|
|
|
5316
5048
|
}
|
|
5317
5049
|
}, _callee184);
|
|
5318
5050
|
})));
|
|
5319
|
-
test('select-multi', /*#__PURE__*/
|
|
5051
|
+
test('select-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee185() {
|
|
5320
5052
|
var result;
|
|
5321
|
-
return
|
|
5053
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee185$(_context185) {
|
|
5322
5054
|
while (1) {
|
|
5323
5055
|
switch (_context185.prev = _context185.next) {
|
|
5324
5056
|
case 0:
|
|
@@ -5340,15 +5072,13 @@ describe('setValue', function () {
|
|
|
5340
5072
|
};
|
|
5341
5073
|
}
|
|
5342
5074
|
});
|
|
5343
|
-
|
|
5344
5075
|
case 2:
|
|
5345
5076
|
result = _context185.sent;
|
|
5346
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
5077
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5347
5078
|
result.update();
|
|
5348
|
-
expect(result.find('SelectMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('select-multi'));
|
|
5079
|
+
expect(result.find('SelectMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('select-multi'));
|
|
5349
5080
|
expect(result.find('SelectMultiFieldMock')).toMatchSnapshot();
|
|
5350
5081
|
result.unmount();
|
|
5351
|
-
|
|
5352
5082
|
case 8:
|
|
5353
5083
|
case "end":
|
|
5354
5084
|
return _context185.stop();
|
|
@@ -5356,9 +5086,9 @@ describe('setValue', function () {
|
|
|
5356
5086
|
}
|
|
5357
5087
|
}, _callee185);
|
|
5358
5088
|
})));
|
|
5359
|
-
test('team', /*#__PURE__*/
|
|
5089
|
+
test('team', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee186() {
|
|
5360
5090
|
var result;
|
|
5361
|
-
return
|
|
5091
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee186$(_context186) {
|
|
5362
5092
|
while (1) {
|
|
5363
5093
|
switch (_context186.prev = _context186.next) {
|
|
5364
5094
|
case 0:
|
|
@@ -5377,15 +5107,13 @@ describe('setValue', function () {
|
|
|
5377
5107
|
};
|
|
5378
5108
|
}
|
|
5379
5109
|
});
|
|
5380
|
-
|
|
5381
5110
|
case 2:
|
|
5382
5111
|
result = _context186.sent;
|
|
5383
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
5112
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5384
5113
|
result.update();
|
|
5385
|
-
expect(result.find('TeamFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('team'));
|
|
5114
|
+
expect(result.find('TeamFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('team'));
|
|
5386
5115
|
expect(result.find('TeamFieldMock')).toMatchSnapshot();
|
|
5387
5116
|
result.unmount();
|
|
5388
|
-
|
|
5389
5117
|
case 8:
|
|
5390
5118
|
case "end":
|
|
5391
5119
|
return _context186.stop();
|
|
@@ -5393,9 +5121,9 @@ describe('setValue', function () {
|
|
|
5393
5121
|
}
|
|
5394
5122
|
}, _callee186);
|
|
5395
5123
|
})));
|
|
5396
|
-
test('team-multi', /*#__PURE__*/
|
|
5124
|
+
test('team-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee187() {
|
|
5397
5125
|
var result;
|
|
5398
|
-
return
|
|
5126
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee187$(_context187) {
|
|
5399
5127
|
while (1) {
|
|
5400
5128
|
switch (_context187.prev = _context187.next) {
|
|
5401
5129
|
case 0:
|
|
@@ -5417,15 +5145,13 @@ describe('setValue', function () {
|
|
|
5417
5145
|
};
|
|
5418
5146
|
}
|
|
5419
5147
|
});
|
|
5420
|
-
|
|
5421
5148
|
case 2:
|
|
5422
5149
|
result = _context187.sent;
|
|
5423
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
5150
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5424
5151
|
result.update();
|
|
5425
|
-
expect(result.find('TeamMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('team-multi'));
|
|
5152
|
+
expect(result.find('TeamMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('team-multi'));
|
|
5426
5153
|
expect(result.find('TeamMultiFieldMock')).toMatchSnapshot();
|
|
5427
5154
|
result.unmount();
|
|
5428
|
-
|
|
5429
5155
|
case 8:
|
|
5430
5156
|
case "end":
|
|
5431
5157
|
return _context187.stop();
|
|
@@ -5433,9 +5159,9 @@ describe('setValue', function () {
|
|
|
5433
5159
|
}
|
|
5434
5160
|
}, _callee187);
|
|
5435
5161
|
})));
|
|
5436
|
-
test('text', /*#__PURE__*/
|
|
5162
|
+
test('text', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee188() {
|
|
5437
5163
|
var result;
|
|
5438
|
-
return
|
|
5164
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee188$(_context188) {
|
|
5439
5165
|
while (1) {
|
|
5440
5166
|
switch (_context188.prev = _context188.next) {
|
|
5441
5167
|
case 0:
|
|
@@ -5451,16 +5177,13 @@ describe('setValue', function () {
|
|
|
5451
5177
|
};
|
|
5452
5178
|
}
|
|
5453
5179
|
});
|
|
5454
|
-
|
|
5455
5180
|
case 2:
|
|
5456
5181
|
result = _context188.sent;
|
|
5457
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
5182
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5458
5183
|
result.update();
|
|
5459
5184
|
expect(result.find('TextFieldMock').prop('value')).toBe(''); // no default
|
|
5460
|
-
|
|
5461
5185
|
expect(result.find('TextFieldMock')).toMatchSnapshot();
|
|
5462
5186
|
result.unmount();
|
|
5463
|
-
|
|
5464
5187
|
case 8:
|
|
5465
5188
|
case "end":
|
|
5466
5189
|
return _context188.stop();
|
|
@@ -5468,9 +5191,9 @@ describe('setValue', function () {
|
|
|
5468
5191
|
}
|
|
5469
5192
|
}, _callee188);
|
|
5470
5193
|
})));
|
|
5471
|
-
test('text-multi', /*#__PURE__*/
|
|
5194
|
+
test('text-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee189() {
|
|
5472
5195
|
var result;
|
|
5473
|
-
return
|
|
5196
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee189$(_context189) {
|
|
5474
5197
|
while (1) {
|
|
5475
5198
|
switch (_context189.prev = _context189.next) {
|
|
5476
5199
|
case 0:
|
|
@@ -5486,15 +5209,13 @@ describe('setValue', function () {
|
|
|
5486
5209
|
};
|
|
5487
5210
|
}
|
|
5488
5211
|
});
|
|
5489
|
-
|
|
5490
5212
|
case 2:
|
|
5491
5213
|
result = _context189.sent;
|
|
5492
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
5214
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5493
5215
|
result.update();
|
|
5494
|
-
expect(result.find('TextMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('text-multi'));
|
|
5216
|
+
expect(result.find('TextMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('text-multi'));
|
|
5495
5217
|
expect(result.find('TextMultiFieldMock')).toMatchSnapshot();
|
|
5496
5218
|
result.unmount();
|
|
5497
|
-
|
|
5498
5219
|
case 8:
|
|
5499
5220
|
case "end":
|
|
5500
5221
|
return _context189.stop();
|
|
@@ -5502,9 +5223,9 @@ describe('setValue', function () {
|
|
|
5502
5223
|
}
|
|
5503
5224
|
}, _callee189);
|
|
5504
5225
|
})));
|
|
5505
|
-
test('user', /*#__PURE__*/
|
|
5226
|
+
test('user', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee190() {
|
|
5506
5227
|
var result;
|
|
5507
|
-
return
|
|
5228
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee190$(_context190) {
|
|
5508
5229
|
while (1) {
|
|
5509
5230
|
switch (_context190.prev = _context190.next) {
|
|
5510
5231
|
case 0:
|
|
@@ -5522,15 +5243,13 @@ describe('setValue', function () {
|
|
|
5522
5243
|
};
|
|
5523
5244
|
}
|
|
5524
5245
|
});
|
|
5525
|
-
|
|
5526
5246
|
case 2:
|
|
5527
5247
|
result = _context190.sent;
|
|
5528
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
5248
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5529
5249
|
result.update();
|
|
5530
|
-
expect(result.find('UserFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('user'));
|
|
5250
|
+
expect(result.find('UserFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('user'));
|
|
5531
5251
|
expect(result.find('UserFieldMock')).toMatchSnapshot();
|
|
5532
5252
|
result.unmount();
|
|
5533
|
-
|
|
5534
5253
|
case 8:
|
|
5535
5254
|
case "end":
|
|
5536
5255
|
return _context190.stop();
|
|
@@ -5538,9 +5257,9 @@ describe('setValue', function () {
|
|
|
5538
5257
|
}
|
|
5539
5258
|
}, _callee190);
|
|
5540
5259
|
})));
|
|
5541
|
-
test('user-multi', /*#__PURE__*/
|
|
5260
|
+
test('user-multi', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee191() {
|
|
5542
5261
|
var result;
|
|
5543
|
-
return
|
|
5262
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee191$(_context191) {
|
|
5544
5263
|
while (1) {
|
|
5545
5264
|
switch (_context191.prev = _context191.next) {
|
|
5546
5265
|
case 0:
|
|
@@ -5560,15 +5279,13 @@ describe('setValue', function () {
|
|
|
5560
5279
|
};
|
|
5561
5280
|
}
|
|
5562
5281
|
});
|
|
5563
|
-
|
|
5564
5282
|
case 2:
|
|
5565
5283
|
result = _context191.sent;
|
|
5566
|
-
setValue(FORM_KEY, 'test', undefined);
|
|
5284
|
+
(0, _Form.setValue)(FORM_KEY, 'test', undefined);
|
|
5567
5285
|
result.update();
|
|
5568
|
-
expect(result.find('UserMultiFieldMock').prop('value')).toBe(FIELD_DEFAULT_VALUES.get('user-multi'));
|
|
5286
|
+
expect(result.find('UserMultiFieldMock').prop('value')).toBe(_Form2.FIELD_DEFAULT_VALUES.get('user-multi'));
|
|
5569
5287
|
expect(result.find('UserMultiFieldMock')).toMatchSnapshot();
|
|
5570
5288
|
result.unmount();
|
|
5571
|
-
|
|
5572
5289
|
case 8:
|
|
5573
5290
|
case "end":
|
|
5574
5291
|
return _context191.stop();
|
|
@@ -5579,9 +5296,9 @@ describe('setValue', function () {
|
|
|
5579
5296
|
});
|
|
5580
5297
|
});
|
|
5581
5298
|
describe('handleSubmit', function () {
|
|
5582
|
-
test('happy path', /*#__PURE__*/
|
|
5299
|
+
test('happy path', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee192() {
|
|
5583
5300
|
var submitFn, saveFn, onSave, handleSubmit, result;
|
|
5584
|
-
return
|
|
5301
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee192$(_context192) {
|
|
5585
5302
|
while (1) {
|
|
5586
5303
|
switch (_context192.prev = _context192.next) {
|
|
5587
5304
|
case 0:
|
|
@@ -5611,33 +5328,33 @@ describe('handleSubmit', function () {
|
|
|
5611
5328
|
handleSubmit: handleSubmit,
|
|
5612
5329
|
onSave: onSave
|
|
5613
5330
|
});
|
|
5614
|
-
|
|
5615
5331
|
case 6:
|
|
5616
5332
|
result = _context192.sent;
|
|
5617
|
-
submitForm(FORM_KEY, {});
|
|
5333
|
+
(0, _Form.submitForm)(FORM_KEY, {});
|
|
5618
5334
|
|
|
5335
|
+
// FormButtons submitting prop should be set to true
|
|
5619
5336
|
result.update();
|
|
5620
5337
|
expect(result.find('FormLayout')).toMatchSnapshot();
|
|
5621
5338
|
_context192.next = 12;
|
|
5622
5339
|
return submitFn();
|
|
5623
|
-
|
|
5624
5340
|
case 12:
|
|
5625
5341
|
// FormButtons submitting prop should be false
|
|
5626
5342
|
result.update();
|
|
5627
|
-
expect(result.find('FormLayout')).toMatchSnapshot();
|
|
5343
|
+
expect(result.find('FormLayout')).toMatchSnapshot();
|
|
5344
|
+
|
|
5345
|
+
// check mocks
|
|
5628
5346
|
//
|
|
5629
5347
|
// both should be called with formOptions provided above
|
|
5630
|
-
|
|
5631
5348
|
expect(handleSubmit.mock.calls).toMatchSnapshot();
|
|
5632
|
-
expect(onSave.mock.calls).toMatchSnapshot();
|
|
5633
|
-
|
|
5634
|
-
expect(submitFn.mock.calls).toMatchSnapshot();
|
|
5349
|
+
expect(onSave.mock.calls).toMatchSnapshot();
|
|
5350
|
+
// should be called with values map and bindings object
|
|
5351
|
+
expect(submitFn.mock.calls).toMatchSnapshot();
|
|
5352
|
+
// should be called with resolved value of submitFn
|
|
5353
|
+
expect(saveFn.mock.calls).toMatchSnapshot();
|
|
5635
5354
|
|
|
5636
|
-
|
|
5355
|
+
// cleanup
|
|
5637
5356
|
//
|
|
5638
|
-
|
|
5639
5357
|
result.unmount();
|
|
5640
|
-
|
|
5641
5358
|
case 19:
|
|
5642
5359
|
case "end":
|
|
5643
5360
|
return _context192.stop();
|
|
@@ -5645,9 +5362,9 @@ describe('handleSubmit', function () {
|
|
|
5645
5362
|
}
|
|
5646
5363
|
}, _callee192);
|
|
5647
5364
|
})));
|
|
5648
|
-
test('submit error', /*#__PURE__*/
|
|
5365
|
+
test('submit error', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee193() {
|
|
5649
5366
|
var submitFn, handleSubmit, result;
|
|
5650
|
-
return
|
|
5367
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee193$(_context193) {
|
|
5651
5368
|
while (1) {
|
|
5652
5369
|
switch (_context193.prev = _context193.next) {
|
|
5653
5370
|
case 0:
|
|
@@ -5661,20 +5378,17 @@ describe('handleSubmit', function () {
|
|
|
5661
5378
|
return mountForm({
|
|
5662
5379
|
handleSubmit: handleSubmit
|
|
5663
5380
|
});
|
|
5664
|
-
|
|
5665
5381
|
case 4:
|
|
5666
5382
|
result = _context193.sent;
|
|
5667
|
-
submitForm('test', {});
|
|
5383
|
+
(0, _Form.submitForm)('test', {});
|
|
5668
5384
|
_context193.next = 8;
|
|
5669
5385
|
return submitFn()["catch"](function (e) {
|
|
5670
5386
|
return e;
|
|
5671
5387
|
});
|
|
5672
|
-
|
|
5673
5388
|
case 8:
|
|
5674
5389
|
result.update();
|
|
5675
5390
|
expect(result.find('FormLayout')).toMatchSnapshot();
|
|
5676
5391
|
result.unmount();
|
|
5677
|
-
|
|
5678
5392
|
case 11:
|
|
5679
5393
|
case "end":
|
|
5680
5394
|
return _context193.stop();
|
|
@@ -5682,9 +5396,9 @@ describe('handleSubmit', function () {
|
|
|
5682
5396
|
}
|
|
5683
5397
|
}, _callee193);
|
|
5684
5398
|
})));
|
|
5685
|
-
test('submit unexpected error, we expect the promise to reject with a string', /*#__PURE__*/
|
|
5399
|
+
test('submit unexpected error, we expect the promise to reject with a string', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee194() {
|
|
5686
5400
|
var submitFn, handleSubmit, result;
|
|
5687
|
-
return
|
|
5401
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee194$(_context194) {
|
|
5688
5402
|
while (1) {
|
|
5689
5403
|
switch (_context194.prev = _context194.next) {
|
|
5690
5404
|
case 0:
|
|
@@ -5698,20 +5412,17 @@ describe('handleSubmit', function () {
|
|
|
5698
5412
|
return mountForm({
|
|
5699
5413
|
handleSubmit: handleSubmit
|
|
5700
5414
|
});
|
|
5701
|
-
|
|
5702
5415
|
case 4:
|
|
5703
5416
|
result = _context194.sent;
|
|
5704
|
-
submitForm('test', {});
|
|
5417
|
+
(0, _Form.submitForm)('test', {});
|
|
5705
5418
|
_context194.next = 8;
|
|
5706
5419
|
return submitFn()["catch"](function (e) {
|
|
5707
5420
|
return e;
|
|
5708
5421
|
});
|
|
5709
|
-
|
|
5710
5422
|
case 8:
|
|
5711
5423
|
result.update();
|
|
5712
5424
|
expect(result.find('FormLayout')).toMatchSnapshot();
|
|
5713
5425
|
result.unmount();
|
|
5714
|
-
|
|
5715
5426
|
case 11:
|
|
5716
5427
|
case "end":
|
|
5717
5428
|
return _context194.stop();
|
|
@@ -5719,9 +5430,9 @@ describe('handleSubmit', function () {
|
|
|
5719
5430
|
}
|
|
5720
5431
|
}, _callee194);
|
|
5721
5432
|
})));
|
|
5722
|
-
test('submit error calls onError', /*#__PURE__*/
|
|
5433
|
+
test('submit error calls onError', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee195() {
|
|
5723
5434
|
var submitFn, handleSubmit, errorFn, onError, result;
|
|
5724
|
-
return
|
|
5435
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee195$(_context195) {
|
|
5725
5436
|
while (1) {
|
|
5726
5437
|
switch (_context195.prev = _context195.next) {
|
|
5727
5438
|
case 0:
|
|
@@ -5731,9 +5442,7 @@ describe('handleSubmit', function () {
|
|
|
5731
5442
|
handleSubmit = jest.fn(function () {
|
|
5732
5443
|
return submitFn;
|
|
5733
5444
|
}); // This mock should be called with the string in the rejected promise above
|
|
5734
|
-
|
|
5735
5445
|
errorFn = jest.fn(); // This mock should be called with the formOptions provided below
|
|
5736
|
-
|
|
5737
5446
|
onError = jest.fn(function () {
|
|
5738
5447
|
return errorFn;
|
|
5739
5448
|
});
|
|
@@ -5745,20 +5454,17 @@ describe('handleSubmit', function () {
|
|
|
5745
5454
|
handleSubmit: handleSubmit,
|
|
5746
5455
|
onError: onError
|
|
5747
5456
|
});
|
|
5748
|
-
|
|
5749
5457
|
case 6:
|
|
5750
5458
|
result = _context195.sent;
|
|
5751
|
-
submitForm('test', {});
|
|
5459
|
+
(0, _Form.submitForm)('test', {});
|
|
5752
5460
|
_context195.next = 10;
|
|
5753
5461
|
return submitFn()["catch"](function (e) {
|
|
5754
5462
|
return e;
|
|
5755
5463
|
});
|
|
5756
|
-
|
|
5757
5464
|
case 10:
|
|
5758
5465
|
expect(onError.mock.calls).toMatchSnapshot();
|
|
5759
5466
|
expect(errorFn.mock.calls).toMatchSnapshot();
|
|
5760
5467
|
result.unmount();
|
|
5761
|
-
|
|
5762
5468
|
case 13:
|
|
5763
5469
|
case "end":
|
|
5764
5470
|
return _context195.stop();
|
|
@@ -5768,9 +5474,9 @@ describe('handleSubmit', function () {
|
|
|
5768
5474
|
})));
|
|
5769
5475
|
});
|
|
5770
5476
|
describe('submitForm', function () {
|
|
5771
|
-
test('with fieldset and values', /*#__PURE__*/
|
|
5477
|
+
test('with fieldset and values', /*#__PURE__*/(0, _asyncToGenerator2["default"])( /*#__PURE__*/(0, _regeneratorRuntime2["default"])().mark(function _callee196() {
|
|
5772
5478
|
var onSubmit, handleSubmit, result;
|
|
5773
|
-
return
|
|
5479
|
+
return (0, _regeneratorRuntime2["default"])().wrap(function _callee196$(_context196) {
|
|
5774
5480
|
while (1) {
|
|
5775
5481
|
switch (_context196.prev = _context196.next) {
|
|
5776
5482
|
case 0:
|
|
@@ -5803,10 +5509,9 @@ describe('submitForm', function () {
|
|
|
5803
5509
|
},
|
|
5804
5510
|
handleSubmit: handleSubmit
|
|
5805
5511
|
});
|
|
5806
|
-
|
|
5807
5512
|
case 4:
|
|
5808
5513
|
result = _context196.sent;
|
|
5809
|
-
submitForm(FORM_KEY, {
|
|
5514
|
+
(0, _Form.submitForm)(FORM_KEY, {
|
|
5810
5515
|
fieldSet: ['firstName', 'lastName'],
|
|
5811
5516
|
values: {
|
|
5812
5517
|
firstName: 'Matt',
|
|
@@ -5817,7 +5522,6 @@ describe('submitForm', function () {
|
|
|
5817
5522
|
expect(onSubmit.mock.calls).toMatchSnapshot();
|
|
5818
5523
|
expect(result.find('FormLayout').prop('bindings')).toMatchSnapshot();
|
|
5819
5524
|
result.unmount();
|
|
5820
|
-
|
|
5821
5525
|
case 10:
|
|
5822
5526
|
case "end":
|
|
5823
5527
|
return _context196.stop();
|