aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames/serviceWithNetwork.e2e.ts
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2018-08-29 17:01:32 +0300
committerIttay Stern <ittay.stern@att.com>2019-02-18 18:35:30 +0200
commit6f900cc45d7dd7f97430812b86b5c1d1693c8ae3 (patch)
tree936005c364dc5a7264d6304d4777c3d83494db22 /vid-webpack-master/cypress/integration/iFrames/serviceWithNetwork.e2e.ts
parent67d99f816cc583643c35193197594cf78d8ce60a (diff)
merge from ecomp a88f0072 - Modern UI
Issue-ID: VID-378 Change-Id: Ibcb23dd27f550cf32ce2fe0239f0f496ae014ff6 Signed-off-by: Ittay Stern <ittay.stern@att.com>
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames/serviceWithNetwork.e2e.ts')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/serviceWithNetwork.e2e.ts105
1 files changed, 105 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/serviceWithNetwork.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/serviceWithNetwork.e2e.ts
new file mode 100644
index 000000000..678609c5c
--- /dev/null
+++ b/vid-webpack-master/cypress/integration/iFrames/serviceWithNetwork.e2e.ts
@@ -0,0 +1,105 @@
+///<reference path="../../../node_modules/cypress/types/index.d.ts"/> / <reference types="Cypress" />
+import {JsonBuilder} from '../../support/jsonBuilders/jsonBuilder';
+import {PnfModel} from '../../support/jsonBuilders/models/pnf.model';
+import {ServiceModel} from '../../support/jsonBuilders/models/service.model';
+import {AaiServiceInstancesModel} from '../../support/jsonBuilders/models/serviceInstances.model';
+import {AAISubDetailsModel} from '../../support/jsonBuilders/models/aaiSubDetails.model';
+import {AAISubViewEditModel} from '../../support/jsonBuilders/models/aaiSubViewEdit.model';
+
+describe('View Edit Page', function () {
+ describe('test view service with network', () => {
+ var jsonBuilderAAIService : JsonBuilder<ServiceModel> = new JsonBuilder<ServiceModel>();
+ const presetsPrefix : string = '/cypress/support/jsonBuilders/mocks/jsons/';
+
+ var jsonBuilderAAISubViewEditModel: JsonBuilder<AAISubViewEditModel> = new JsonBuilder<AAISubViewEditModel>();
+ var jsonBuilderAAISubDetailsModel: JsonBuilder<AAISubDetailsModel> = new JsonBuilder<AAISubDetailsModel>();
+ var jsonBuilderPNF: JsonBuilder<PnfModel> = new JsonBuilder<PnfModel>();
+ var jsonBuilderAaiServiceInstances: JsonBuilder<AaiServiceInstancesModel> = new JsonBuilder<AaiServiceInstancesModel>();
+ var jsonBuilderEmpty: JsonBuilder<Object> = new JsonBuilder<Object>();
+ beforeEach(() => {
+ cy.readFile(presetsPrefix + 'serviceWithNetwork/serviceWithNetwork.json').then((res) => {
+ jsonBuilderAAIService.basicJson(
+ res,
+ Cypress.config('baseUrl') + "/rest/models/services/5a3ad576-c01d-4bed-8194-0e72b4a3d020",
+ 200, 0,
+ "service-complexService")
+ });
+ cy.readFile(presetsPrefix + 'serviceWithNetwork/aaiSubViewEditForServiceWithNetwork.json').then((res) => {
+ jsonBuilderAAISubViewEditModel.basicJson(
+ res,
+ Cypress.config('baseUrl') + "/aai_sub_viewedit/**",
+ 200,
+ 0,
+ "aai-sub-view-edit")
+ });
+ cy.readFile(presetsPrefix + 'serviceWithNetwork/aaiSubDetailsForServiceWithNetwork.json').then((res) => {
+ jsonBuilderAAISubDetailsModel.basicJson(
+ res,
+ Cypress.config('baseUrl') + "/aai_sub_details/**",
+ 200,
+ 0,
+ "aai-sub-details")
+ });
+ cy.readFile(presetsPrefix + 'aaiServiceInstancePnfs.json').then((res) => {
+ jsonBuilderPNF.basicJson(
+ res,
+ Cypress.config('baseUrl') + "/aai_get_service_instance_pnfs/**",
+ 200,
+ 0,
+ "aai-get-service-instance-pnfs")
+ });
+ cy.readFile(presetsPrefix + 'serviceWithNetwork/aaiServiceInstances.json').then((res) => {
+ jsonBuilderAaiServiceInstances.basicJson(
+ res,
+ Cypress.config('baseUrl') + "/search_service_instances**",
+ 200,
+ 0,
+ "aai-get-service-instances")
+ });
+ cy.readFile(presetsPrefix + 'emptyObjectResponse.json').then((res) => {
+ jsonBuilderEmpty.basicJson(
+ res,
+ Cypress.config('baseUrl') + "/aai_getPortMirroringConfigsData**",
+ 200,
+ 0,
+ "aai_getPortMirroringConfigsDate - empty response")
+ });
+ cy.readFile(presetsPrefix + 'emptyObjectResponse.json').then((res) => {
+ jsonBuilderEmpty.basicJson(
+ res,
+ Cypress.config('baseUrl') + "/aai_getPortMirroringSourcePorts**",
+ 200,
+ 0,
+ "aai_getPortMirroringSourcePorts - empty response")
+ });
+ cy.readFile('../vid-automation/src/test/resources/serviceWithNetwork/aaiGetNetworksToVlansByServiceInstance.json').then((res) => {
+ jsonBuilderAAIService.basicJson(
+ res,
+ Cypress.config('baseUrl') + '/aai/standardQuery/vlansByNetworks?' +
+ 'globalCustomerId=a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb' +
+ '&serviceType=vMOG' +
+ '&serviceInstanceId=9cdd1b2a-43a7-47bc-a88e-759ba2399f0b' +
+ '&sdcModelUuid=5a3ad576-c01d-4bed-8194-0e72b4a3d020',
+ 200,
+ 0,
+ "aai-aaiGetNetworksToVlans-By-Service-Instance")
+ });
+
+ cy.initVidMock(); // just for subsequent "initFlags()"
+ cy.login();
+ });
+
+ afterEach(() => {
+ cy.screenshot();
+ });
+
+ it(`should allow delete network on view edit`, function () {
+ cy.visit('/serviceModels.htm#/instantiate?subscriberId=a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb&subscriberName=Mobility&serviceType=vMOG&serviceInstanceId=9cdd1b2a-43a7-47bc-a88e-759ba2399f0b&aaiModelVersionId=5a3ad576-c01d-4bed-8194-0e72b4a3d020&isPermitted=true');
+ cy.wait('@aai_getPortMirroringSourcePorts - empty response');
+ cy.getElementByDataTestsId("deleteNetworkButton").should('not.have.attr', 'disabled');
+ cy.get(".vlansTreeNode").should('have.length', 2);
+ });
+ });
+
+});
+