[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-ui / test-utils / factories / licenseModel / FeatureGroupFactories.js
1 /*!
2  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
13  * or implied. See the License for the specific language governing
14  * permissions and limitations under the License.
15  */
16 import { Factory } from 'rosie';
17 import {overviewEditorHeaders} from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js';
18 import IdMixin from 'test-utils/factories/mixins/IdMixin.js';
19
20 Factory.define('FeatureGroupBaseFactory')
21         .attrs({
22                 'name': 'featureGroup',
23                 'description': 'description'
24         });
25
26 Factory.define('FeatureGroupExtendedBaseFactory')
27         .extend('FeatureGroupBaseFactory')
28         .attrs({
29                 'partNumber': '1212'
30         });
31
32 export const FeatureGroupListItemFactory = new Factory()
33         .extend('FeatureGroupBaseFactory')
34         .extend(IdMixin)
35         .attrs({
36                 children: [],
37                 isCollapsed: true,
38                 itemType: overviewEditorHeaders.FEATURE_GROUP
39         });
40
41 export const FeatureGroupDispatchFactory = new Factory()
42         .extend('FeatureGroupExtendedBaseFactory')
43         .attrs({
44                 'licenseKeyGroupsIds': [],
45                 'entitlementPoolsIds': []
46         });
47
48 export const FeatureGroupStoreFactory = new Factory()
49         .extend('FeatureGroupExtendedBaseFactory')
50         .extend(IdMixin)
51         .attrs({
52                 licenseKeyGroupsIds: [],
53                 entitlementPoolsIds: [],
54                 referencingLicenseAgreements: []
55         });
56
57 export const FeatureGroupDataListFactory = new Factory()
58         .extend('FeatureGroupExtendedBaseFactory')
59         .extend(IdMixin)
60         .attrs({
61                 licenseKeyGroupsIds: [],
62                 entitlementPoolsIds: [],
63                 referencingLicenseAgreements: [],
64                 children: [],
65                 itemType: overviewEditorHeaders.FEATURE_GROUP
66         });
67
68 export const FeatureGroupPostFactory = new Factory()
69         .extend('FeatureGroupExtendedBaseFactory')
70         .attrs({
71                 addedLicenseKeyGroupsIds: [],
72                 addedEntitlementPoolsIds: []
73         });
74
75 export const FeatureGroupPutFactory = new Factory()
76         .extend('FeatureGroupExtendedBaseFactory')
77         .attrs({
78                 addedLicenseKeyGroupsIds: [],
79                 addedEntitlementPoolsIds: [],
80                 removedLicenseKeyGroupsIds: [],
81                 removedEntitlementPoolsIds: []
82         });