AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 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('LicenseAgreementBaseFactory') |
| 21 | .attrs({ |
| 22 | name: 'License Agreement', |
| 23 | description: 'sdsd', |
| 24 | licenseTerm: { |
| 25 | choice: 'Fixed_Term' |
| 26 | } |
| 27 | }); |
| 28 | |
| 29 | Factory.define('LicenseAgreementExtendedBaseFactory') |
| 30 | .extend('LicenseAgreementBaseFactory') |
| 31 | .attrs({ |
| 32 | requirementsAndConstrains: 'req_and_constraints_ADDED_LA' |
| 33 | }); |
| 34 | |
| 35 | export const LicenseAgreementListItemFactory = new Factory() |
| 36 | .extend('LicenseAgreementExtendedBaseFactory') |
| 37 | .extend(IdMixin) |
| 38 | .attrs({ |
| 39 | children: [], |
| 40 | isCollapsed: true, |
| 41 | itemType: overviewEditorHeaders.LICENSE_AGREEMENT |
| 42 | }); |
| 43 | |
| 44 | export const LicenseAgreementDispatchFactory = new Factory() |
| 45 | .extend('LicenseAgreementExtendedBaseFactory') |
| 46 | .attrs({ |
| 47 | featureGroupsIds: [] |
| 48 | }); |
| 49 | |
| 50 | export const LicenseAgreementStoreFactory = new Factory() |
| 51 | .extend('LicenseAgreementExtendedBaseFactory') |
| 52 | .extend(IdMixin) |
| 53 | .attrs({ |
| 54 | featureGroupsIds: [] |
| 55 | }); |
| 56 | |
| 57 | export const LicenseAgreementDataListFactory = new Factory() |
| 58 | .extend('LicenseAgreementExtendedBaseFactory') |
| 59 | .extend(IdMixin) |
| 60 | .attrs({ |
| 61 | featureGroupsIds: [], |
| 62 | children:[], |
| 63 | itemType: overviewEditorHeaders.LICENSE_AGREEMENT |
| 64 | }); |
| 65 | |
| 66 | export const LicenseAgreementPostFactory = new Factory() |
| 67 | .extend('LicenseAgreementExtendedBaseFactory') |
| 68 | .attrs({ |
| 69 | addedFeatureGroupsIds: [] |
| 70 | }); |
| 71 | |
| 72 | export const LicenseAgreementPutFactory = new Factory() |
| 73 | .extend('LicenseAgreementExtendedBaseFactory') |
| 74 | .attrs({ |
| 75 | addedFeatureGroupsIds: [], |
| 76 | removedFeatureGroupsIds: [] |
| 77 | }); |