foreman_acd 0.9.7 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -19
- data/app/controllers/ui_acd_controller.rb +1 -1
- data/db/migrate/20210503122809_add_git_url_to_ansible_playbooks.rb +1 -1
- data/lib/foreman_acd/engine.rb +4 -10
- data/lib/foreman_acd/plugin.rb +1 -1
- data/lib/foreman_acd/version.rb +1 -1
- data/package.json +5 -3
- data/test/controllers/ui_acd_controller_test.rb +1 -1
- data/webpack/components/ApplicationDefinition/ApplicationDefinition.js +210 -121
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionActions.js +79 -91
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionConstants.js +30 -15
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionHelper.js +15 -15
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionReducer.js +96 -63
- data/webpack/components/ApplicationDefinition/ApplicationDefinitionSelectors.js +22 -11
- data/webpack/components/ApplicationDefinition/__fixtures__/{applicationDefinitionConfData_1.fixtures.js → applicationDefinitionConfData1.fixtures.js} +77 -105
- data/webpack/components/ApplicationDefinition/__fixtures__/applicationDefinitionReducer.fixtures.js +49 -29
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinition.test.js +4 -4
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionHelper.test.js +16 -0
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionReducer.test.js +0 -5
- data/webpack/components/ApplicationDefinition/__tests__/ApplicationDefinitionSelectors.test.js +25 -25
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionReducer.test.js.snap +9 -1
- data/webpack/components/ApplicationDefinition/__tests__/__snapshots__/ApplicationDefinitionSelectors.test.js.snap +11 -11
- data/webpack/components/ApplicationDefinition/components/AnsiblePlaybookSelector.js +30 -25
- data/webpack/components/ApplicationDefinition/components/__tests__/AnsiblePlaybookSelector.test.js +3 -3
- data/webpack/components/ApplicationDefinition/index.js +0 -1
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImport.js +91 -105
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportActions.js +59 -84
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportConstants.js +12 -6
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportReducer.js +21 -27
- data/webpack/components/ApplicationDefinitionImport/ApplicationDefinitionImportSelectors.js +14 -7
- data/webpack/components/ApplicationDefinitionImport/__fixtures__/{applicationDefinitionImportConfData_1.fixtures.js → applicationDefinitionImportConfData1.fixtures.js} +32 -40
- data/webpack/components/ApplicationDefinitionImport/__fixtures__/applicationDefinitionImportReducer.fixtures.js +14 -16
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImport.test.js +38 -8
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportReducer.test.js +0 -2
- data/webpack/components/ApplicationDefinitionImport/__tests__/ApplicationDefinitionImportSelectors.test.js +9 -9
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImport.test.js.snap +116 -2
- data/webpack/components/ApplicationDefinitionImport/__tests__/__snapshots__/ApplicationDefinitionImportSelectors.test.js.snap +3 -3
- data/webpack/components/ApplicationInstance/ApplicationInstance.js +344 -193
- data/webpack/components/ApplicationInstance/ApplicationInstanceActions.js +92 -105
- data/webpack/components/ApplicationInstance/ApplicationInstanceConstants.js +34 -17
- data/webpack/components/ApplicationInstance/ApplicationInstanceHelper.js +4 -7
- data/webpack/components/ApplicationInstance/ApplicationInstanceReducer.js +114 -74
- data/webpack/components/ApplicationInstance/ApplicationInstanceSelectors.js +18 -9
- data/webpack/components/ApplicationInstance/__fixtures__/{applicationInstanceConfData_1.fixtures.js → applicationInstanceConfData1.fixtures.js} +68 -86
- data/webpack/components/ApplicationInstance/__fixtures__/applicationInstanceReducer.fixtures.js +24 -32
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstance.test.js +75 -10
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceReducer.test.js +0 -8
- data/webpack/components/ApplicationInstance/__tests__/ApplicationInstanceSelectors.test.js +27 -27
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstance.test.js.snap +606 -2
- data/webpack/components/ApplicationInstance/__tests__/__snapshots__/ApplicationInstanceSelectors.test.js.snap +12 -12
- data/webpack/components/ApplicationInstance/components/AppDefinitionSelector.js +32 -25
- data/webpack/components/ApplicationInstance/components/Service.js +7 -18
- data/webpack/components/ApplicationInstance/components/ServiceCounter.js +25 -18
- data/webpack/components/ApplicationInstance/index.js +0 -1
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReport.js +167 -110
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportActions.js +20 -25
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportConstants.js +10 -5
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportReducer.js +9 -12
- data/webpack/components/ApplicationInstanceReport/ApplicationInstanceReportSelectors.js +12 -6
- data/webpack/components/ApplicationInstanceReport/__fixtures__/{applicationInstanceReportData_1.fixtures.js → applicationInstanceReportData1.fixtures.js} +154 -101
- data/webpack/components/ApplicationInstanceReport/__fixtures__/applicationInstanceReportReducer.fixtures.js +3 -10
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReport.test.js +28 -22
- data/webpack/components/ApplicationInstanceReport/__tests__/ApplicationInstanceReportSelectors.test.js +5 -7
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportReducer.test.js.snap +0 -1
- data/webpack/components/ApplicationInstanceReport/__tests__/__snapshots__/ApplicationInstanceReportSelectors.test.js.snap +2 -2
- data/webpack/components/ApplicationInstanceReport/components/ReportViewer.js +9 -5
- data/webpack/components/ApplicationInstanceReport/components/__tests__/ReportViewer.test.js +1 -3
- data/webpack/components/ExistingHostSelection/ExistingHostSelection.js +35 -56
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionActions.js +21 -28
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionConstants.js +6 -3
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionReducer.js +16 -19
- data/webpack/components/ExistingHostSelection/ExistingHostSelectionSelectors.js +8 -4
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionConfData1.fixtures.js +187 -0
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionReducer.fixtures.js +13 -24
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelection.test.js +3 -2
- data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelectionSelectors.test.js +11 -14
- data/webpack/components/ExistingHostSelection/__tests__/__snapshots__/ExistingHostSelectionSelectors.test.js.snap +5 -5
- data/webpack/components/ExistingHostSelection/components/ServiceSelector.js +31 -25
- data/webpack/components/ExistingHostSelection/components/__tests__/ServiceSelector.test.js +3 -9
- data/webpack/components/ParameterSelection/ParameterSelection.js +258 -174
- data/webpack/components/ParameterSelection/ParameterSelectionActions.js +110 -100
- data/webpack/components/ParameterSelection/ParameterSelectionConstants.js +22 -11
- data/webpack/components/ParameterSelection/ParameterSelectionHelper.js +13 -11
- data/webpack/components/ParameterSelection/ParameterSelectionReducer.js +63 -49
- data/webpack/components/ParameterSelection/ParameterSelectionSelectors.js +10 -5
- data/webpack/components/ParameterSelection/__fixtures__/{parameterSelectionData_1.fixtures.js → parameterSelectionData1.fixtures.js} +67 -104
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelectionReducer.fixtures.js +22 -26
- data/webpack/components/ParameterSelection/__tests__/ParameterSelection.test.js +50 -36
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionHelper.test.js +76 -0
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionReducer.test.js +0 -2
- data/webpack/components/ParameterSelection/__tests__/ParameterSelectionSelectors.test.js +23 -25
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelection.test.js.snap +100 -0
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionReducer.test.js.snap +99 -112
- data/webpack/components/ParameterSelection/__tests__/__snapshots__/ParameterSelectionSelectors.test.js.snap +18 -19
- data/webpack/components/ParameterSelection/index.js +1 -4
- data/webpack/components/SyncGitRepo/SyncGitRepo.js +124 -117
- data/webpack/components/SyncGitRepo/SyncGitRepoActions.js +64 -74
- data/webpack/components/SyncGitRepo/SyncGitRepoReducer.js +17 -17
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoConfData1.fixtures.js +7 -0
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoReducer.fixtures.js +10 -18
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepo.test.js +80 -6
- data/webpack/components/SyncGitRepo/__tests__/SyncGitRepoSelectors.test.js +9 -11
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepo.test.js.snap +192 -1
- data/webpack/components/SyncGitRepo/__tests__/__snapshots__/SyncGitRepoSelectors.test.js.snap +4 -4
- data/webpack/components/SyncGitRepo/components/FormTextInput.js +26 -21
- data/webpack/components/SyncGitRepo/components/ScmTypeSelector.js +29 -24
- data/webpack/components/SyncGitRepo/index.js +2 -5
- data/webpack/components/common/AddTableEntry.js +3 -10
- data/webpack/components/common/DeleteTableEntry.js +7 -15
- data/webpack/components/common/EditTableEntry.js +7 -7
- data/webpack/components/common/ExtSelect.js +12 -8
- data/webpack/components/common/ExtTextInput.js +12 -7
- data/webpack/components/common/LockTableEntry.js +6 -6
- data/webpack/components/common/RailsData.js +6 -16
- data/webpack/components/common/__tests__/ExtSelect.test.js +2 -2
- data/webpack/components/common/__tests__/RailsData.test.js +0 -2
- data/webpack/global_test_setup.js +11 -0
- data/webpack/helper.js +10 -21
- data/webpack/helper.test.js +17 -29
- data/webpack/index.js +25 -7
- data/webpack/js-yaml.js +1563 -1135
- data/webpack/reducer.js +52 -27
- metadata +16 -14
- data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionConfData_1.fixtures.js +0 -191
- data/webpack/components/ParameterSelection/__fixtures__/parameterSelection.fixtures.js +0 -153
- data/webpack/components/SyncGitRepo/__fixtures__/syncGitRepoConfData_1.fixtures.js +0 -7
data/webpack/components/ExistingHostSelection/__fixtures__/existingHostSelectionReducer.fixtures.js
CHANGED
@@ -1,15 +1,8 @@
|
|
1
1
|
import Immutable from 'seamless-immutable';
|
2
|
-
import {
|
3
|
-
cloneDeep,
|
4
|
-
findIndex,
|
5
|
-
findLastIndex,
|
6
|
-
} from 'lodash';
|
7
2
|
|
8
|
-
import {
|
9
|
-
existingHostSelectionConfData_1,
|
10
|
-
} from '../__fixtures__/existingHostSelectionConfData_1.fixtures';
|
3
|
+
import { existingHostSelectionConfData1 } from '../__fixtures__/existingHostSelectionConfData1.fixtures';
|
11
4
|
|
12
|
-
export const successState = Immutable(
|
5
|
+
export const successState = Immutable(existingHostSelectionConfData1);
|
13
6
|
|
14
7
|
export const initExistingHostSelectionPayload = {
|
15
8
|
payload: {
|
@@ -19,12 +12,12 @@ export const initExistingHostSelectionPayload = {
|
|
19
12
|
value: 5,
|
20
13
|
label: 'isaac-anselm',
|
21
14
|
disabled: true,
|
22
|
-
tooltipText: 'Host already used for this application instance'
|
23
|
-
}
|
15
|
+
tooltipText: 'Host already used for this application instance',
|
16
|
+
},
|
24
17
|
],
|
25
18
|
selectedHosts: [],
|
26
19
|
hostsInHostgroup: {},
|
27
|
-
}
|
20
|
+
},
|
28
21
|
};
|
29
22
|
|
30
23
|
export const existingHostSelectionSelectionChangedPayload = {
|
@@ -33,7 +26,7 @@ export const existingHostSelectionSelectionChangedPayload = {
|
|
33
26
|
label: 'isaar-anselm',
|
34
27
|
value: 3,
|
35
28
|
},
|
36
|
-
]
|
29
|
+
],
|
37
30
|
};
|
38
31
|
|
39
32
|
export const loadExistingHostSelectionSuccessPayload = {
|
@@ -84,9 +77,7 @@ export const loadExistingHostSelectionSuccessPayload = {
|
|
84
77
|
compute_resource_name: null,
|
85
78
|
compute_profile_id: null,
|
86
79
|
compute_profile_name: null,
|
87
|
-
capabilities: [
|
88
|
-
'build'
|
89
|
-
],
|
80
|
+
capabilities: ['build'],
|
90
81
|
provision_method: 'build',
|
91
82
|
certname: 'isaac-anselm.mylocal',
|
92
83
|
image_id: null,
|
@@ -114,7 +105,7 @@ export const loadExistingHostSelectionSuccessPayload = {
|
|
114
105
|
puppet_proxy: null,
|
115
106
|
puppet_ca_proxy: null,
|
116
107
|
hostgroup_name: 'base',
|
117
|
-
hostgroup_title: 'base'
|
108
|
+
hostgroup_title: 'base',
|
118
109
|
},
|
119
110
|
{
|
120
111
|
ip: null,
|
@@ -162,9 +153,7 @@ export const loadExistingHostSelectionSuccessPayload = {
|
|
162
153
|
compute_resource_name: null,
|
163
154
|
compute_profile_id: null,
|
164
155
|
compute_profile_name: null,
|
165
|
-
capabilities: [
|
166
|
-
'build'
|
167
|
-
],
|
156
|
+
capabilities: ['build'],
|
168
157
|
provision_method: 'build',
|
169
158
|
certname: 'lllllll.mylocal',
|
170
159
|
image_id: null,
|
@@ -192,12 +181,12 @@ export const loadExistingHostSelectionSuccessPayload = {
|
|
192
181
|
puppet_proxy: null,
|
193
182
|
puppet_ca_proxy: null,
|
194
183
|
hostgroup_name: 'base',
|
195
|
-
hostgroup_title: 'base'
|
196
|
-
}
|
184
|
+
hostgroup_title: 'base',
|
185
|
+
},
|
197
186
|
],
|
198
|
-
serviceId: 1
|
187
|
+
serviceId: 1,
|
199
188
|
};
|
200
189
|
|
201
190
|
export const loadExistingHostSelectionFailurePayload = {
|
202
|
-
error:
|
191
|
+
error: 'Something really bad happend',
|
203
192
|
};
|
@@ -6,12 +6,13 @@ const noop = () => {};
|
|
6
6
|
|
7
7
|
const fixtures = {
|
8
8
|
'should render existing host selection': {
|
9
|
-
location:
|
10
|
-
organization:
|
9
|
+
location: 'Default Location',
|
10
|
+
organization: 'Default Organization',
|
11
11
|
services: [],
|
12
12
|
allHosts: [],
|
13
13
|
initExistingHostSelection: noop,
|
14
14
|
loadHostsOfHostgroup: noop,
|
15
|
+
hostSelectionChanged: noop,
|
15
16
|
},
|
16
17
|
};
|
17
18
|
|
data/webpack/components/ExistingHostSelection/__tests__/ExistingHostSelectionSelectors.test.js
CHANGED
@@ -8,9 +8,7 @@ import {
|
|
8
8
|
selectHostsInHostgroup,
|
9
9
|
} from '../ExistingHostSelectionSelectors';
|
10
10
|
|
11
|
-
import {
|
12
|
-
existingHostSelectionConfData_1,
|
13
|
-
} from '../__fixtures__/existingHostSelectionConfData_1.fixtures';
|
11
|
+
import { existingHostSelectionConfData1 } from '../__fixtures__/existingHostSelectionConfData1.fixtures';
|
14
12
|
|
15
13
|
const stateFactory = obj => ({
|
16
14
|
foremanAcd: {
|
@@ -19,18 +17,17 @@ const stateFactory = obj => ({
|
|
19
17
|
});
|
20
18
|
|
21
19
|
const fixtures = {
|
22
|
-
'should return serviceId from
|
23
|
-
selectServiceId(stateFactory(
|
24
|
-
'should return availableHosts from
|
25
|
-
selectAvailableHosts(stateFactory(
|
26
|
-
'should return alreadyUsedHosts from
|
27
|
-
selectAlreadyUsedHosts(stateFactory(
|
28
|
-
'should return selectedHosts from
|
29
|
-
selectSelectedHosts(stateFactory(
|
30
|
-
'should return hostsInHostgroup from
|
31
|
-
selectHostsInHostgroup(stateFactory(
|
20
|
+
'should return serviceId from existingHostSelectionConfData1 fixtures': () =>
|
21
|
+
selectServiceId(stateFactory(existingHostSelectionConfData1)),
|
22
|
+
'should return availableHosts from existingHostSelectionConfData1 fixtures': () =>
|
23
|
+
selectAvailableHosts(stateFactory(existingHostSelectionConfData1)),
|
24
|
+
'should return alreadyUsedHosts from existingHostSelectionConfData1 fixtures': () =>
|
25
|
+
selectAlreadyUsedHosts(stateFactory(existingHostSelectionConfData1)),
|
26
|
+
'should return selectedHosts from existingHostSelectionConfData1 fixtures': () =>
|
27
|
+
selectSelectedHosts(stateFactory(existingHostSelectionConfData1)),
|
28
|
+
'should return hostsInHostgroup from existingHostSelectionConfData1 fixtures': () =>
|
29
|
+
selectHostsInHostgroup(stateFactory(existingHostSelectionConfData1)),
|
32
30
|
};
|
33
31
|
|
34
32
|
describe('ExistingHostSelectionSelectors', () =>
|
35
33
|
testSelectorsSnapshotWithFixtures(fixtures));
|
36
|
-
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
2
2
|
|
3
|
-
exports[`ExistingHostSelectionSelectors should return alreadyUsedHosts from
|
3
|
+
exports[`ExistingHostSelectionSelectors should return alreadyUsedHosts from existingHostSelectionConfData1 fixtures 1`] = `
|
4
4
|
Array [
|
5
5
|
Object {
|
6
6
|
"disabled": true,
|
@@ -11,7 +11,7 @@ Array [
|
|
11
11
|
]
|
12
12
|
`;
|
13
13
|
|
14
|
-
exports[`ExistingHostSelectionSelectors should return availableHosts from
|
14
|
+
exports[`ExistingHostSelectionSelectors should return availableHosts from existingHostSelectionConfData1 fixtures 1`] = `
|
15
15
|
Array [
|
16
16
|
Object {
|
17
17
|
"label": "lllllll",
|
@@ -20,8 +20,8 @@ Array [
|
|
20
20
|
]
|
21
21
|
`;
|
22
22
|
|
23
|
-
exports[`ExistingHostSelectionSelectors should return hostsInHostgroup from
|
23
|
+
exports[`ExistingHostSelectionSelectors should return hostsInHostgroup from existingHostSelectionConfData1 fixtures 1`] = `undefined`;
|
24
24
|
|
25
|
-
exports[`ExistingHostSelectionSelectors should return selectedHosts from
|
25
|
+
exports[`ExistingHostSelectionSelectors should return selectedHosts from existingHostSelectionConfData1 fixtures 1`] = `Array []`;
|
26
26
|
|
27
|
-
exports[`ExistingHostSelectionSelectors should return serviceId from
|
27
|
+
exports[`ExistingHostSelectionSelectors should return serviceId from existingHostSelectionConfData1 fixtures 1`] = `2`;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
import PropTypes from 'prop-types';
|
3
3
|
import ExtSelect from '../../common/ExtSelect';
|
4
|
-
import RailsData from '../../common/RailsData'
|
4
|
+
import RailsData from '../../common/RailsData';
|
5
5
|
|
6
|
-
const ServiceSelector= ({
|
6
|
+
const ServiceSelector = ({
|
7
7
|
label,
|
8
8
|
hidden,
|
9
9
|
viewText,
|
@@ -11,32 +11,31 @@ const ServiceSelector= ({
|
|
11
11
|
onChange,
|
12
12
|
options,
|
13
13
|
additionalData,
|
14
|
-
}) =>
|
15
|
-
|
16
|
-
<
|
17
|
-
|
18
|
-
<
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
/>
|
34
|
-
</div>
|
14
|
+
}) => (
|
15
|
+
<div className="form-group">
|
16
|
+
<label className="col-md-2 control-label">{label}</label>
|
17
|
+
<div className="col-md-4">
|
18
|
+
<ExtSelect
|
19
|
+
hidden={hidden}
|
20
|
+
editable
|
21
|
+
viewText={viewText}
|
22
|
+
selectValue={selectValue}
|
23
|
+
onChange={onChange}
|
24
|
+
options={options}
|
25
|
+
additionalData={additionalData}
|
26
|
+
/>
|
27
|
+
<RailsData
|
28
|
+
key="service_id"
|
29
|
+
view="existing_host_selection"
|
30
|
+
parameter="service_id"
|
31
|
+
value={selectValue}
|
32
|
+
/>
|
35
33
|
</div>
|
36
|
-
|
37
|
-
|
34
|
+
</div>
|
35
|
+
);
|
38
36
|
|
39
37
|
ServiceSelector.propTypes = {
|
38
|
+
hidden: PropTypes.bool.isRequired,
|
40
39
|
label: PropTypes.string.isRequired,
|
41
40
|
viewText: PropTypes.string,
|
42
41
|
selectValue: PropTypes.string,
|
@@ -45,4 +44,11 @@ ServiceSelector.propTypes = {
|
|
45
44
|
additionalData: PropTypes.object,
|
46
45
|
};
|
47
46
|
|
47
|
+
ServiceSelector.defaultProps = {
|
48
|
+
additionalData: {},
|
49
|
+
options: {},
|
50
|
+
selectValue: '',
|
51
|
+
viewText: undefined,
|
52
|
+
};
|
53
|
+
|
48
54
|
export default ServiceSelector;
|
@@ -4,11 +4,6 @@ import ServiceSelector from '../ServiceSelector';
|
|
4
4
|
|
5
5
|
const noop = () => {};
|
6
6
|
|
7
|
-
const data = [
|
8
|
-
{ name: 'report 1', status: 'done' },
|
9
|
-
{ name: 'report 2', status: 'pending' }
|
10
|
-
];
|
11
|
-
|
12
7
|
const fixtures = {
|
13
8
|
'should render the service selector': {
|
14
9
|
hidden: false,
|
@@ -16,7 +11,7 @@ const fixtures = {
|
|
16
11
|
viewText: 'view service',
|
17
12
|
selectValue: '1',
|
18
13
|
onChange: noop,
|
19
|
-
options: { first: 'first', second: 'second'},
|
14
|
+
options: { first: 'first', second: 'second' },
|
20
15
|
additionalData: { moreData: 'moooore' },
|
21
16
|
},
|
22
17
|
'should render the hidden service selector': {
|
@@ -25,11 +20,10 @@ const fixtures = {
|
|
25
20
|
viewText: 'view service',
|
26
21
|
selectValue: '1',
|
27
22
|
onChange: noop,
|
28
|
-
options: { first: 'first', second: 'second'},
|
29
|
-
additionalData: {
|
23
|
+
options: { first: 'first', second: 'second' },
|
24
|
+
additionalData: {},
|
30
25
|
},
|
31
26
|
};
|
32
27
|
|
33
28
|
describe('ServiceSelector', () =>
|
34
29
|
testComponentSnapshotsWithFixtures(ServiceSelector, fixtures));
|
35
|
-
|