summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support
diff options
context:
space:
mode:
authorEylon Malin <eylon.malin@intl.att.com>2020-01-12 14:35:39 +0200
committerYoav Schneiderman <yoav.schneiderman@intl.att.com>2020-01-15 10:25:35 +0200
commit022efbf54ddd662ede2d000a847ed02ca6d05d97 (patch)
tree9cb73f42b8bd40728586df0abadc4d833be9d886 /vid-webpack-master/cypress/support
parent6876eba3d0b43b01eb303a0d530fe45712f33d74 (diff)
fix open modern ui from Create new service instance flow
Issue-ID: VID-724 Change-Id: I804aadce8fcdf888ef4364e474e8cc229b158920 Signed-off-by: Eylon Malin <eylon.malin@intl.att.com> Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Diffstat (limited to 'vid-webpack-master/cypress/support')
-rw-r--r--vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts15
-rw-r--r--vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/aaiGetModelsByServiceType.json58
2 files changed, 73 insertions, 0 deletions
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 ae60361c2..807a3bcda 100644
--- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts
@@ -9,6 +9,7 @@ declare namespace Cypress {
initActiveVPNs : typeof initActiveVPNs;
initGetAAISubDetails : typeof initGetAAISubDetails;
initAAIServices: typeof initAAIServices;
+ initGetModelByServiceType: typeof initGetModelByServiceType;
}
}
@@ -48,6 +49,19 @@ function initGetAAISubDetails(response? : JSON) : void {
});
}
+function initGetModelByServiceType(response? : JSON) : void {
+ cy.readFile('cypress/support/jsonBuilders/mocks/jsons/aaiSubDetails.json').then((res) => {
+ cy.server()
+ .route({
+ method: 'GET',
+ status: 200,
+ url: Cypress.config('baseUrl') + "/aai_get_models_by_service_type/**",
+ response: response ? response : res
+ }).as('aai-sub-details')
+ });
+}
+
+
function initAlaCarteService(response? : JSON) : void {
cy.readFile('cypress/support/jsonBuilders/mocks/jsons/a-la-carteService.json').then((res) => {
cy.server()
@@ -156,6 +170,7 @@ Cypress.Commands.add('initSearchVNFMemebers', initSearchVNFMemebers);
Cypress.Commands.add('initActiveNetworks', initActiveNetworks);
Cypress.Commands.add('initActiveVPNs', initActiveVPNs);
Cypress.Commands.add('initAAIServices', initAAIServices);
+Cypress.Commands.add('initGetModelByServiceType', initGetModelByServiceType);
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/aaiGetModelsByServiceType.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/aaiGetModelsByServiceType.json
new file mode 100644
index 000000000..2540650ce
--- /dev/null
+++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/aaiGetModelsByServiceType.json
@@ -0,0 +1,58 @@
+{
+ "inventory-response-item": [
+ {
+ "service-subscription": {
+ "service-type": "TYLER SILVIA",
+ "resource-version": "1494001841964"
+ },
+ "extra-properties": {},
+ "inventory-response-items": {
+ "inventory-response-item":[
+ {
+ "model-name": "RG_11-18_vccf_srvc",
+ "service-instance": {
+ "service-instance-id": "b9769e8f-70aa-4b05-8988-64044aa63498",
+ "service-instance-name": "TestCharlie",
+ "model-invariant-id": "4af418a9-c2f5-4fae-a577-b69d6341eee8",
+ "model-version-id": "745d1bf1-9ed1-413f-8111-f1e984ad63fb",
+ "resource-version": "1494002070115"
+ },
+ "extra-properties": {
+ "extra-property": [
+ {
+ "property-name": "model-ver.model-description",
+ "property-value": "Service for vccf"
+ },
+ {
+ "property-name": "model-ver.model-version-id",
+ "property-value": "745d1bf1-9ed1-413f-8111-f1e984ad63fb"
+ },
+ {
+ "property-name": "model-ver.model-name",
+ "property-value": "RG_11-18_vccf_srvc"
+ },
+ {
+ "property-name": "model.model-type",
+ "property-value": "service"
+ },
+ {
+ "property-name": "model.model-invariant-id",
+ "property-value": "4af418a9-c2f5-4fae-a577-b69d6341eee8"
+ },
+ {
+ "property-name": "model.model-description"
+ },
+ {
+ "property-name": "model-ver.model-version",
+ "property-value": "1.0"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+}
+
+