AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 1 | /*! |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 2 | * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 3 | * |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 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 |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 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. |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 15 | */ |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 16 | import deepFreeze from 'deep-freeze'; |
| 17 | import mockRest from 'test-utils/MockRest.js'; |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 18 | import {cloneAndSet, buildListFromFactory} from 'test-utils/Util.js'; |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 19 | import {storeCreator} from 'sdc-app/AppStore.js'; |
| 20 | import FeatureGroupsActionHelper from 'sdc-app/onboarding/licenseModel/featureGroups/FeatureGroupsActionHelper.js'; |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 21 | import { FeatureGroupStoreFactory, FeatureGroupPostFactory, FeatureGroupDispatchFactory, FeatureGroupPutFactory } from 'test-utils/factories/licenseModel/FeatureGroupFactories.js'; |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 22 | import VersionFactory from 'test-utils/factories/common/VersionFactory.js'; |
| 23 | import CurrentScreenFactory from 'test-utils/factories/common/CurrentScreenFactory.js'; |
| 24 | import {SyncStates} from 'sdc-app/common/merge/MergeEditorConstants.js'; |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 25 | |
| 26 | |
| 27 | describe('Feature Groups Module Tests', function () { |
| 28 | |
| 29 | const LICENSE_MODEL_ID = '555'; |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 30 | const version = VersionFactory.build(); |
| 31 | const itemPermissionAndProps = CurrentScreenFactory.build({}, {version}); |
| 32 | const returnedVersionFields = {baseId: version.baseId, description: version.description, id: version.id, name: version.name, status: version.status}; |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 33 | |
| 34 | it('Load Feature Groups List', () => { |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 35 | |
| 36 | const featureGroupsList = buildListFromFactory(FeatureGroupStoreFactory); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 37 | deepFreeze(featureGroupsList); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 38 | |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 39 | const store = storeCreator(); |
| 40 | deepFreeze(store.getState()); |
| 41 | |
| 42 | const expectedStore = cloneAndSet(store.getState(), 'licenseModel.featureGroup.featureGroupsList', featureGroupsList); |
| 43 | |
| 44 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 45 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/feature-groups`); |
| 46 | expect(data).toEqual(undefined); |
| 47 | expect(options).toEqual(undefined); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 48 | return {results: featureGroupsList}; |
| 49 | }); |
| 50 | |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 51 | return FeatureGroupsActionHelper.fetchFeatureGroupsList(store.dispatch, {licenseModelId: LICENSE_MODEL_ID, version}).then(() => { |
| 52 | expect(store.getState()).toEqual(expectedStore); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 53 | }); |
| 54 | }); |
| 55 | |
| 56 | it('Delete Feature Group', () => { |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 57 | const featureGroupsList = buildListFromFactory(FeatureGroupStoreFactory, 1); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 58 | deepFreeze(featureGroupsList); |
| 59 | const store = storeCreator({ |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 60 | currentScreen: {...itemPermissionAndProps}, |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 61 | licenseModel: { |
| 62 | featureGroup: { |
| 63 | featureGroupsList |
| 64 | } |
| 65 | } |
| 66 | }); |
| 67 | deepFreeze(store.getState()); |
| 68 | |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 69 | const expectedCurrentScreenProps = { |
| 70 | ...itemPermissionAndProps, |
| 71 | itemPermission: { |
| 72 | ...itemPermissionAndProps.itemPermission, |
| 73 | isDirty: true |
| 74 | } |
| 75 | }; |
| 76 | |
| 77 | let expectedStore = cloneAndSet(store.getState(), 'licenseModel.featureGroup.featureGroupsList', []); |
| 78 | expectedStore = cloneAndSet(expectedStore, 'currentScreen.itemPermission', expectedCurrentScreenProps.itemPermission); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 79 | |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 80 | const idToDelete = featureGroupsList[0].id; |
| 81 | |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 82 | mockRest.addHandler('destroy', ({data, options, baseUrl}) => { |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 83 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/feature-groups/${idToDelete}`); |
| 84 | expect(data).toEqual(undefined); |
| 85 | expect(options).toEqual(undefined); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 86 | return { |
| 87 | results: { |
| 88 | returnCode: 'OK' |
| 89 | } |
| 90 | }; |
| 91 | }); |
| 92 | |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 93 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
| 94 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/items/${LICENSE_MODEL_ID}/versions/${version.id}`); |
| 95 | expect(data).toEqual(undefined); |
| 96 | expect(options).toEqual(undefined); |
| 97 | return {...returnedVersionFields, state: {synchronizationState: SyncStates.UP_TO_DATE, dirty: true}}; |
| 98 | }); |
| 99 | |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 100 | return FeatureGroupsActionHelper.deleteFeatureGroup(store.dispatch, { |
| 101 | licenseModelId: LICENSE_MODEL_ID, |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 102 | version, |
| 103 | featureGroupId: idToDelete |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 104 | }).then(() => { |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 105 | expect(store.getState()).toEqual(expectedStore); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 106 | }); |
| 107 | }); |
| 108 | |
| 109 | it('Add Feature Group', () => { |
| 110 | |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 111 | const store = storeCreator({ |
| 112 | currentScreen: {...itemPermissionAndProps}, |
| 113 | licenseModel: { |
| 114 | featureGroup: { |
| 115 | featureGroupsList: [] |
| 116 | } |
| 117 | } |
| 118 | }); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 119 | deepFreeze(store.getState()); |
| 120 | |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 121 | const FeatureGroupPostRequest = FeatureGroupPostFactory.build({ |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 122 | addedLicenseKeyGroupsIds: [1], |
| 123 | addedEntitlementPoolsIds: [1] |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 124 | }); |
| 125 | const featureGroupToAdd = FeatureGroupDispatchFactory.build({ |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 126 | licenseKeyGroupsIds: [1], |
| 127 | entitlementPoolsIds: [1] |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 128 | }); |
| 129 | |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 130 | const featureGroupIdFromResponse = 'ADDED_ID'; |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 131 | const featureGroupAfterAdd = FeatureGroupStoreFactory.build({ |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 132 | ...featureGroupToAdd, |
| 133 | id: featureGroupIdFromResponse |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 134 | }); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 135 | |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 136 | const expectedCurrentScreenProps = { |
| 137 | ...itemPermissionAndProps, |
| 138 | itemPermission: { |
| 139 | ...itemPermissionAndProps.itemPermission, |
| 140 | isDirty: true |
| 141 | } |
| 142 | }; |
| 143 | |
| 144 | let expectedStore = cloneAndSet(store.getState(), 'licenseModel.featureGroup.featureGroupsList', [featureGroupAfterAdd]); |
| 145 | expectedStore = cloneAndSet(expectedStore, 'currentScreen.itemPermission', expectedCurrentScreenProps.itemPermission); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 146 | |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 147 | mockRest.addHandler('post', ({data, options, baseUrl}) => { |
| 148 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/feature-groups`); |
| 149 | expect(data).toEqual(FeatureGroupPostRequest); |
| 150 | expect(options).toEqual(undefined); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 151 | return { |
| 152 | returnCode: 'OK', |
| 153 | value: featureGroupIdFromResponse |
| 154 | }; |
| 155 | }); |
| 156 | |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 157 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
| 158 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/entitlement-pools`); |
| 159 | expect(data).toEqual(undefined); |
| 160 | expect(options).toEqual(undefined); |
| 161 | return {results: []}; |
| 162 | }); |
| 163 | |
| 164 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
| 165 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/license-key-groups`); |
| 166 | expect(data).toEqual(undefined); |
| 167 | expect(options).toEqual(undefined); |
| 168 | return {results: []}; |
| 169 | }); |
| 170 | |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 171 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
| 172 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/items/${LICENSE_MODEL_ID}/versions/${version.id}`); |
| 173 | expect(data).toEqual(undefined); |
| 174 | expect(options).toEqual(undefined); |
| 175 | return {...returnedVersionFields, state: {synchronizationState: SyncStates.UP_TO_DATE, dirty: true}}; |
| 176 | }); |
| 177 | |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 178 | |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 179 | return FeatureGroupsActionHelper.saveFeatureGroup(store.dispatch, { |
| 180 | licenseModelId: LICENSE_MODEL_ID, |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 181 | version, |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 182 | featureGroup: featureGroupToAdd |
| 183 | }).then(() => { |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 184 | expect(store.getState()).toEqual(expectedStore); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 185 | }); |
| 186 | }); |
| 187 | |
| 188 | it('Update Feature Group', () => { |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 189 | const featureGroupsList = buildListFromFactory(FeatureGroupStoreFactory, 1, { |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 190 | licenseKeyGroupsIds: [1], |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 191 | entitlementPoolsIds: [1] |
| 192 | }); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 193 | deepFreeze(featureGroupsList); |
| 194 | |
| 195 | const store = storeCreator({ |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 196 | currentScreen: {...itemPermissionAndProps}, |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 197 | licenseModel: { |
| 198 | featureGroup: { |
| 199 | featureGroupsList |
| 200 | } |
| 201 | } |
| 202 | }); |
| 203 | deepFreeze(store.getState()); |
| 204 | |
| 205 | const toBeUpdatedFeatureGroupId = featureGroupsList[0].id; |
| 206 | const previousFeatureGroupData = featureGroupsList[0]; |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 207 | |
| 208 | const featureGroupUpdateData = FeatureGroupStoreFactory.build({ |
| 209 | ...previousFeatureGroupData, |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 210 | licenseKeyGroupsIds: [7], |
| 211 | entitlementPoolsIds: [7] |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 212 | }); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 213 | deepFreeze(featureGroupUpdateData); |
| 214 | |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 215 | const FeatureGroupPutFactoryRequest = FeatureGroupPutFactory.build({ |
| 216 | name: featureGroupUpdateData.name, |
| 217 | description: featureGroupUpdateData.description, |
| 218 | partNumber: featureGroupUpdateData.partNumber, |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 219 | addedLicenseKeyGroupsIds: [7], |
| 220 | addedEntitlementPoolsIds: [7], |
| 221 | removedLicenseKeyGroupsIds: [1], |
| 222 | removedEntitlementPoolsIds: [1] |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 223 | }); |
| 224 | deepFreeze(FeatureGroupPutFactoryRequest); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 225 | |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 226 | const expectedCurrentScreenProps = { |
| 227 | ...itemPermissionAndProps, |
| 228 | itemPermission: { |
| 229 | ...itemPermissionAndProps.itemPermission, |
| 230 | isDirty: true |
| 231 | } |
| 232 | }; |
| 233 | |
| 234 | let expectedStore = cloneAndSet(store.getState(), 'licenseModel.featureGroup.featureGroupsList', [featureGroupUpdateData]); |
| 235 | expectedStore = cloneAndSet(expectedStore, 'currentScreen.itemPermission', expectedCurrentScreenProps.itemPermission); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 236 | |
| 237 | |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 238 | mockRest.addHandler('put', ({data, options, baseUrl}) => { |
| 239 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/feature-groups/${toBeUpdatedFeatureGroupId}`); |
| 240 | expect(data).toEqual(FeatureGroupPutFactoryRequest); |
| 241 | expect(options).toEqual(undefined); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 242 | return {returnCode: 'OK'}; |
| 243 | }); |
| 244 | |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 245 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
| 246 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/entitlement-pools`); |
| 247 | expect(data).toEqual(undefined); |
| 248 | expect(options).toEqual(undefined); |
| 249 | return {results: []}; |
| 250 | }); |
| 251 | |
| 252 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
| 253 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/license-key-groups`); |
| 254 | expect(data).toEqual(undefined); |
| 255 | expect(options).toEqual(undefined); |
| 256 | return {results: []}; |
| 257 | }); |
| 258 | |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 259 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
| 260 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/items/${LICENSE_MODEL_ID}/versions/${version.id}`); |
| 261 | expect(data).toEqual(undefined); |
| 262 | expect(options).toEqual(undefined); |
| 263 | return {...returnedVersionFields, state: {synchronizationState: SyncStates.UP_TO_DATE, dirty: true}}; |
| 264 | }); |
| 265 | |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 266 | return FeatureGroupsActionHelper.saveFeatureGroup(store.dispatch, { |
| 267 | licenseModelId: LICENSE_MODEL_ID, |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 268 | version, |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 269 | previousFeatureGroup: previousFeatureGroupData, |
| 270 | featureGroup: featureGroupUpdateData |
| 271 | }).then(() => { |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 272 | expect(store.getState()).toEqual(expectedStore); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 273 | }); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 274 | |
| 275 | }); |
| 276 | |
| 277 | it('Open Editor', () => { |
| 278 | |
| 279 | const store = storeCreator(); |
| 280 | deepFreeze(store.getState()); |
| 281 | |
| 282 | const editorData = FeatureGroupStoreFactory.build(); |
| 283 | deepFreeze(editorData); |
AviZi | 280f801 | 2017-06-09 02:39:56 +0300 | [diff] [blame] | 284 | const LICENSE_MODEL_ID = '123'; |
| 285 | |
| 286 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
| 287 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/entitlement-pools`); |
| 288 | expect(data).toEqual(undefined); |
| 289 | expect(options).toEqual(undefined); |
| 290 | return {results: []}; |
| 291 | }); |
| 292 | |
| 293 | mockRest.addHandler('fetch', ({data, options, baseUrl}) => { |
| 294 | expect(baseUrl).toEqual(`/onboarding-api/v1.0/vendor-license-models/${LICENSE_MODEL_ID}/versions/${version.id}/license-key-groups`); |
| 295 | expect(data).toEqual(undefined); |
| 296 | expect(options).toEqual(undefined); |
| 297 | return {results: []}; |
| 298 | }); |
| 299 | |
| 300 | |
talig | 8e9c065 | 2017-12-20 14:30:43 +0200 | [diff] [blame^] | 301 | return FeatureGroupsActionHelper.openFeatureGroupsEditor(store.dispatch, {featureGroup: editorData, licenseModelId: '123', version}).then(() => { |
| 302 | expect(store.getState().licenseModel.featureGroup.featureGroupEditor.data).toEqual(editorData); |
| 303 | }); |
Michael Lando | efa037d | 2017-02-19 12:57:33 +0200 | [diff] [blame] | 304 | }); |
| 305 | |
| 306 | }); |