summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts3
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts3
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts72
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts3
4 files changed, 73 insertions, 8 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
index 790fcfc67..5c6d28e3a 100644
--- a/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/ala-carte.e2e.ts
@@ -19,7 +19,8 @@ describe('A la carte', function () {
cy.setReduxState();
cy.preventErrorsOnLoading();
cy.initAAIMock();
- cy.initVidMock({serviceUuid:SERVICE_ID, invariantId: SERVICE_INVARIANT_ID});
+ cy.initVidMock();
+ cy.mockLatestVersionForService(SERVICE_ID, SERVICE_INVARIANT_ID);
cy.initAlaCarteService();
cy.initZones();
cy.login();
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts
index 0fef7ae78..79f6a8d13 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewEdit.e2e.ts
@@ -143,7 +143,8 @@ describe('View Edit Page', function () {
0,
"aai_getPortMirroringSourcePorts - empty response")
});
- cy.initVidMock({serviceUuid: commonUuid, invariantId: serviceInvariantId});
+ cy.initVidMock();
+ cy.mockLatestVersionForService(commonUuid, serviceInvariantId);
cy.setReduxState();
cy.permissionVidMock();
cy.login();
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
index bea31fcf8..0d94e600c 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts
@@ -79,7 +79,8 @@ describe('View Edit Page: Upgrade VFModule', function () {
mockAsyncBulkResponse();
cy.initGetAAISubDetails();
- cy.initVidMock({serviceUuid: serviceUuid, invariantId: serviceInvariantId});
+ cy.initVidMock();
+ cy.mockLatestVersionForService(serviceUuid, serviceInvariantId);
cy.setReduxState();
cy.permissionVidMock();
cy.login();
@@ -91,8 +92,8 @@ describe('View Edit Page: Upgrade VFModule', function () {
it(`should display the more actions button if user is permitted`, function () {
let SERVICE_INSTANCE_ID="3f93c7cb-2fd0-4557-9514-e189b7b04f9d";
- let SERVICE_TYPE="VIRTUAL%20USP";
- cy.visit(`/serviceModels.htm#/instantiate?subscriberId=${SUBSCRIBER_ID}&subscriberName=USP%20VOICE&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}&aaiModelVersionId=${serviceUuid}&isPermitted=true`);
+ let SERVICE_TYPE="TYLER%20SILVIA";
+ cy.visit(`/serviceModels.htm#/instantiate?subscriberId=${SUBSCRIBER_ID}&subscriberName=SILVIA%20ROBBINS&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}&aaiModelVersionId=${serviceUuid}&isPermitted=true`);
cy.get("[data-tests-id='service-instanceId-th-id']").should('contain', SERVICE_INSTANCE_ID);
cy.getElementByDataTestsId("show-new-screen").should('be.visible').should('have.text', 'More actions').click();
@@ -126,6 +127,67 @@ describe('View Edit Page: Upgrade VFModule', function () {
});
+ describe('More UI tests', () => {
+
+ beforeEach(() => {
+ cy.window().then((win) => {win.sessionStorage.clear();});
+ cy.setTestApiParamToVNF();
+ cy.initVidMock();
+ cy.login();
+ });
+
+ afterEach(() => {
+ cy.screenshot();
+ });
+
+ it(`Upgrade a VFModule: another case e2e`, function () {
+
+ const serviceType = 'Emanuel';
+ const subscriberId = 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb';
+ const serviceModelId = '06c415d8-afc2-4bcb-a131-e4db4b8e96ce';
+ const serviceInstanceId = '6196ab1f-2349-4b32-9b6c-cffeb0ccc79c';
+ const serviceInvariantUuid = "b3a1a119-dede-4ed0-b077-2a617fa519a3";
+
+ cy.initDrawingBoardUserPermission();
+
+ cy.route(`**/rest/models/services/${serviceModelId}`,
+ 'fixture:../support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_e2e__service_model.json')
+ .as('serviceModel2');
+
+ cy.route(`**/aai_get_service_instance_topology/${subscriberId}/${serviceType}/${serviceInstanceId}`,
+ 'fixture:../support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_e2e__service_instance.json')
+ .as('serviceInstance2');
+
+ cy.route(`**/aai_get_newest_model_version_by_invariant/${serviceInvariantUuid}`,
+ {
+ "modelVersionId": "d9a5b318-187e-476d-97f7-a15687a927a9",
+ "modelName": "xbi test module replace",
+ "modelVersion": "2.0",
+ "distributionStatus": "DISTRIBUTION_COMPLETE_OK",
+ "resourceVersion": "1571769586156",
+ "modelDescription": "test module replacement feature",
+ "orchestrationType": null
+ }
+ ).as("newestModelVersion2");
+
+ cy.openIframe(`app/ui/#/servicePlanning/EDIT?serviceModelId=${serviceModelId}&subscriberId=${subscriberId}&serviceType=${serviceType}&serviceInstanceId=${serviceInstanceId}`);
+
+ upgradeTheVFM('node-04b21d26-9780-4956-8329-b22b049329f4-xbitestmodulereplace0..XbiTestModuleReplace..base_ocg..module-0');
+
+ mockAsyncBulkResponse();
+ cy.getDrawingBoardDeployBtn().click();
+
+ cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
+ cy.readFile('../vid-app-common/src/test/resources/payload_jsons/vfmodule/upgrade_vfmodule_e2e__fe_input_cypress.json').then((expectedResult) => {
+ cy.deepCompare(xhr.request.body, expectedResult);
+ });
+ });
+
+ });
+
+ });
+
+
function mockAsyncBulkResponse() {
cy.server().route({
url: Cypress.config('baseUrl') + '/asyncInstantiation/bulk',
@@ -149,8 +211,8 @@ describe('View Edit Page: Upgrade VFModule', function () {
}).as("expectLatestServiceModelUpgradeVersion")
}
- function upgradeTheVFM(): Chainable<any> {
- return cy.getElementByDataTestsId('node-undefined-dc229cd8-c132-4455-8517-5c1787c18b14-menu-btn').click()
+ function upgradeTheVFM(treeNodeId = 'node-undefined-dc229cd8-c132-4455-8517-5c1787c18b14'): Chainable<any> {
+ return cy.getElementByDataTestsId(`${treeNodeId}-menu-btn`).click()
.drawingBoardTreeClickOnContextMenuOptionByName("Upgrade");
}
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
index e5be3fb98..26d206df3 100644
--- a/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
+++ b/vid-webpack-master/cypress/integration/iFrames/viewOnlyDrawingBoard.e2e.ts
@@ -46,7 +46,8 @@ describe('View only drawing board', function () {
win.sessionStorage.clear();
cy.preventErrorsOnLoading();
cy.initAAIMock();
- cy.initVidMock({serviceUuid:SERVICE_MODEL_ID, invariantId: SERVICE_INVARIANT_ID});
+ cy.initVidMock();
+ cy.mockLatestVersionForService(SERVICE_MODEL_ID, SERVICE_INVARIANT_ID);
cy.initZones();
cy.permissionVidMock();
cy.login();