aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/test
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-ui/test')
-rw-r--r--openecomp-ui/test/softwareProduct/creation/SoftwareProductCreation.test.js42
-rw-r--r--openecomp-ui/test/softwareProduct/details/test.js8
2 files changed, 40 insertions, 10 deletions
diff --git a/openecomp-ui/test/softwareProduct/creation/SoftwareProductCreation.test.js b/openecomp-ui/test/softwareProduct/creation/SoftwareProductCreation.test.js
index 20ca17d3d0..2758e28f77 100644
--- a/openecomp-ui/test/softwareProduct/creation/SoftwareProductCreation.test.js
+++ b/openecomp-ui/test/softwareProduct/creation/SoftwareProductCreation.test.js
@@ -1,17 +1,23 @@
/*
- * Copyright © 2016-2018 European Support Limited
+ * -
+ * ============LICENSE_START=======================================================
+ * Copyright © 2016-2018 European Support Limited
+ * Modifications Copyright (C) 2021 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
*
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
*/
import React from 'react';
@@ -71,6 +77,22 @@ describe('Software Product Creation Module Tests', function() {
expect(props.VSPNames).toEqual({vsp1: 'vsp1_id', vsp2: 'vsp2_id'});
});
+ it ('should return model list', () => {
+ const modelList = ["model1", "model2", "model3"];
+ let state = {
+ finalizedSoftwareProductList: [],
+ archivedSoftwareProductList: [],
+ softwareProductList: [],
+ softwareProduct: {
+ modelList: modelList,
+ softwareProductCreation: {}
+ },
+ users: {}
+ };
+ let props = mapStateToProps(state);
+ expect(props.modelList).toEqual(modelList);
+ });
+
it('simple jsx test', () => {
const store = storeCreator();
let dispatch = store.dispatch;
diff --git a/openecomp-ui/test/softwareProduct/details/test.js b/openecomp-ui/test/softwareProduct/details/test.js
index 92390f61ef..0e0c9ecafd 100644
--- a/openecomp-ui/test/softwareProduct/details/test.js
+++ b/openecomp-ui/test/softwareProduct/details/test.js
@@ -1,5 +1,6 @@
/*
* Copyright © 2016-2018 European Support Limited
+ * Modifications Copyright (C) 2021 Nordix Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -217,6 +218,13 @@ describe('Software Product Details Module Tests', function () {
});
mockRest.addHandler('fetch', ({options, data, baseUrl}) => {
+ expect(baseUrl).toEqual('/sdc1/feProxy/rest/v1/catalog/model/');
+ expect(data).toEqual(undefined);
+ expect(options).toEqual(undefined);
+ return [];
+ });
+
+ mockRest.addHandler('fetch', ({options, data, baseUrl}) => {
expect(baseUrl).toEqual('/onboarding-api/v1.0/vendor-license-models/?versionFilter=Certified');
expect(data).toEqual(undefined);
expect(options).toEqual(undefined);