AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 1 | /*! |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 2 | * Copyright © 2016-2018 European Support Limited |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 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'; |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 17 | import { overviewEditorHeaders } from 'sdc-app/onboarding/licenseModel/overview/LicenseModelOverviewConstants.js'; |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 18 | import IdMixin from 'test-utils/factories/mixins/IdMixin.js'; |
| 19 | |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 20 | Factory.define('FeatureGroupBaseFactory').attrs({ |
| 21 | name: 'featureGroup', |
| 22 | description: 'description' |
| 23 | }); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 24 | |
| 25 | Factory.define('FeatureGroupExtendedBaseFactory') |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 26 | .extend('FeatureGroupBaseFactory') |
| 27 | .attrs({ |
| 28 | partNumber: '1212' |
| 29 | }); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 30 | |
| 31 | export const FeatureGroupListItemFactory = new Factory() |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 32 | .extend('FeatureGroupBaseFactory') |
| 33 | .extend(IdMixin) |
| 34 | .attrs({ |
| 35 | children: [], |
| 36 | isCollapsed: true, |
| 37 | itemType: overviewEditorHeaders.FEATURE_GROUP |
| 38 | }); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 39 | |
| 40 | export const FeatureGroupDispatchFactory = new Factory() |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 41 | .extend('FeatureGroupExtendedBaseFactory') |
| 42 | .attrs({ |
| 43 | licenseKeyGroupsIds: [], |
| 44 | entitlementPoolsIds: [] |
| 45 | }); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 46 | |
| 47 | export const FeatureGroupStoreFactory = new Factory() |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 48 | .extend('FeatureGroupExtendedBaseFactory') |
| 49 | .extend(IdMixin) |
| 50 | .attrs({ |
| 51 | licenseKeyGroupsIds: [], |
| 52 | entitlementPoolsIds: [], |
| 53 | referencingLicenseAgreements: [] |
| 54 | }); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 55 | |
| 56 | export const FeatureGroupDataListFactory = new Factory() |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 57 | .extend('FeatureGroupExtendedBaseFactory') |
| 58 | .extend(IdMixin) |
| 59 | .attrs({ |
| 60 | licenseKeyGroupsIds: [], |
| 61 | entitlementPoolsIds: [], |
| 62 | referencingLicenseAgreements: [], |
| 63 | children: [], |
| 64 | itemType: overviewEditorHeaders.FEATURE_GROUP |
| 65 | }); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 66 | |
| 67 | export const FeatureGroupPostFactory = new Factory() |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 68 | .extend('FeatureGroupExtendedBaseFactory') |
| 69 | .attrs({ |
| 70 | addedLicenseKeyGroupsIds: [], |
| 71 | addedEntitlementPoolsIds: [] |
| 72 | }); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 73 | |
| 74 | export const FeatureGroupPutFactory = new Factory() |
svishnev | 8f13330 | 2018-08-06 23:08:39 +0300 | [diff] [blame] | 75 | .extend('FeatureGroupExtendedBaseFactory') |
| 76 | .attrs({ |
| 77 | addedLicenseKeyGroupsIds: [], |
| 78 | addedEntitlementPoolsIds: [], |
| 79 | removedLicenseKeyGroupsIds: [], |
| 80 | removedEntitlementPoolsIds: [] |
| 81 | }); |