aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2019-12-18 16:11:09 +0200
committerEylon Malin <eylon.malin@intl.att.com>2019-12-19 10:03:20 +0200
commitff6b9bb17545dcd535322bcf0b2fa1c73338cf4b (patch)
treef84c9b5d828c160d0c161e89f4cdcf6fc6eef702
parent2e263cc66539a814502590365cf844b093115942 (diff)
while ng1 view/edit - get aai service if they are not exist yet
Issue-ID: VID-732 Change-Id: I6fd9866fb84eb07be7ea3c0bfc7cdfc0b3ea6084 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com>
-rwxr-xr-xvid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js7
-rw-r--r--vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.test.js3
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts13
-rw-r--r--vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts3
4 files changed, 25 insertions, 1 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
index 110f24ec6..2701e3e9e 100755
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.js
@@ -539,6 +539,12 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
var serviceNetworkVlans = [];
var vnfNetworksAndVlans = [];
+ function fetchServiceIfMissing() {
+ if (_.isEmpty(DataService.getServiceIdList())) {
+ $scope.fetchServices();
+ }
+ }
+
$scope.getComponentList = function (event, request) {
$scope.isSpinnerVisible = true;
@@ -569,6 +575,7 @@ appDS2.controller("aaiSubscriberController", ["COMPONENT", "FIELD", "PARAMETER",
})
.then(resolveModelDataIfMissing)
.then($scope.prepareScopeWithModel)
+ .then(fetchServiceIfMissing)
.then(function () {
return AaiService.getVlansByNetworksMapping($scope.globalCustomerId, $scope.serviceType, $scope.serviceInstanceId, $scope.service.model.service.uuid);
})
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.test.js b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.test.js
index af3c2186a..03a299877 100644
--- a/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.test.js
+++ b/vid-app-common/src/main/webapp/app/vid/scripts/controller/aaiSubscriberController.test.js
@@ -223,6 +223,7 @@ describe('aaiSubscriberController testing', () => {
includes(array, status){
return array.includes(status);
},
+ isEmpty(something) {return true;},
};
let mockedLog = {};
@@ -1502,4 +1503,4 @@ describe('aaiSubscriberController testing', () => {
});
-}); \ No newline at end of file
+});
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts
index 40ba258bd..8421cbd69 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts
@@ -143,6 +143,7 @@ describe('View Edit Page', function () {
});
cy.initVidMock();
cy.mockLatestVersionForService(commonUuid, serviceInvariantId);
+ cy.initAAIServices();
cy.setReduxState();
cy.permissionVidMock();
cy.login();
@@ -166,6 +167,18 @@ describe('View Edit Page', function () {
});
});
+ it(`when using direct url should select elements in productFamily dropdown `, function () {
+ cy.visit('/serviceModels.htm#/instantiate?subscriberId=e433710f-9217-458d-a79d-1c7aff376d89&subscriberName=SILVIA%20ROBBINS&serviceType=TYLER%20SILVIA&serviceInstanceId=3f93c7cb-2fd0-4557-9514-e189b7b04f9d&aaiModelVersionId=6e59c5de-f052-46fa-aa7e-2fca9d674c44&isPermitted=true');
+ cy.wait('@service-complexService');
+ cy.wait('@aai_getPortMirroringConfigsDate - empty response');
+ cy.wait('@initAAIServices');
+ cy.getElementByDataTestsId('addNetworkButton').click();
+ cy.getElementByDataTestsId('addNetworkOption-MULTI_PROVIDER_PORT_GROUP 0').click();
+ cy.getElementByDataTestsId('productFamily').select('WILKINS');
+ });
+
+
+
it(`Check fabric configuration service with some configuration with diff orchStatus`, function () {
cy.visit('/serviceModels.htm#/instantiate?subscriberId=e433710f-9217-458d-a79d-1c7aff376d89&subscriberName=SILVIA%20ROBBINS&serviceType=TYLER%20SILVIA&serviceInstanceId=c187e9fe-40c3-4862-b73e-84ff056205f61234&aaiModelVersionId=6e59c5de-f052-46fa-aa7e-2fca9d671234&isPermitted=true');
cy.wait('@service-FabricConfig');
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts b/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts
index 3e6d5e33f..ae60361c2 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts
@@ -8,6 +8,7 @@ declare namespace Cypress {
initActiveNetworks : typeof initActiveNetworks;
initActiveVPNs : typeof initActiveVPNs;
initGetAAISubDetails : typeof initGetAAISubDetails;
+ initAAIServices: typeof initAAIServices;
}
}
@@ -154,5 +155,7 @@ Cypress.Commands.add('initGetAAISubDetails', initGetAAISubDetails);
Cypress.Commands.add('initSearchVNFMemebers', initSearchVNFMemebers);
Cypress.Commands.add('initActiveNetworks', initActiveNetworks);
Cypress.Commands.add('initActiveVPNs', initActiveVPNs);
+Cypress.Commands.add('initAAIServices', initAAIServices);
+