blob: 42209792b910d1ac6d33ade7c0b6d233fdd0cc93 [file] [log] [blame]
AviZi280f8012017-06-09 02:39:56 +03001/*!
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 */
16import { Factory } from 'rosie';
17import {overviewEditorHeaders} from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js';
18import IdMixin from 'test-utils/factories/mixins/IdMixin.js';
19
20Factory.define('FeatureGroupBaseFactory')
21 .attrs({
22 'name': 'featureGroup',
23 'description': 'description'
24 });
25
26Factory.define('FeatureGroupExtendedBaseFactory')
27 .extend('FeatureGroupBaseFactory')
28 .attrs({
29 'partNumber': '1212'
30 });
31
32export const FeatureGroupListItemFactory = new Factory()
33 .extend('FeatureGroupBaseFactory')
34 .extend(IdMixin)
35 .attrs({
36 children: [],
37 isCollapsed: true,
38 itemType: overviewEditorHeaders.FEATURE_GROUP
39 });
40
41export const FeatureGroupDispatchFactory = new Factory()
42 .extend('FeatureGroupExtendedBaseFactory')
43 .attrs({
44 'licenseKeyGroupsIds': [],
45 'entitlementPoolsIds': []
46 });
47
48export const FeatureGroupStoreFactory = new Factory()
49 .extend('FeatureGroupExtendedBaseFactory')
50 .extend(IdMixin)
51 .attrs({
52 licenseKeyGroupsIds: [],
53 entitlementPoolsIds: [],
54 referencingLicenseAgreements: []
55 });
56
57export 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
68export const FeatureGroupPostFactory = new Factory()
69 .extend('FeatureGroupExtendedBaseFactory')
70 .attrs({
71 addedLicenseKeyGroupsIds: [],
72 addedEntitlementPoolsIds: []
73 });
74
75export const FeatureGroupPutFactory = new Factory()
76 .extend('FeatureGroupExtendedBaseFactory')
77 .attrs({
78 addedLicenseKeyGroupsIds: [],
79 addedEntitlementPoolsIds: [],
80 removedLicenseKeyGroupsIds: [],
81 removedEntitlementPoolsIds: []
82 });