diff options
author | Kruthi Bhat <krutbhat@att.com> | 2020-11-23 23:31:56 +0530 |
---|---|---|
committer | Ikram Ikramullah <ikram@research.att.com> | 2020-11-25 22:40:59 +0000 |
commit | 3e558222d300ff70ff490914cc2245cf2a59e72a (patch) | |
tree | bd95cf9eebb9dc28ac64a4d31066f2e212265244 /vid-webpack-master/cypress/integration | |
parent | e139ae6a162a7882d6d40203287a3e906a42564c (diff) |
Prevent upgrade for base vf module with add on
Change-Id: Ie8139056ae560f734f2ae70d6a2ddb97f4c2dfaa
Issue-ID: VID-925
Signed-off-by: krutbhat@att.com
Diffstat (limited to 'vid-webpack-master/cypress/integration')
-rw-r--r-- | vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts index 7f469d889..9de94161f 100644 --- a/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/viewEditUpgradeVfModule.e2e.ts @@ -281,6 +281,45 @@ describe('View Edit Page: Upgrade VFModule', function () { }); }); }); + + it(`Upgrade a VFModule: Upgrade option should not be visible for the base module with add on`, function () { + + const serviceType = 'Emanuel'; + const subscriberId = 'a9a77d5a-123e-4ca2-9eb9-0b015d2ee0fb'; + const serviceModelId = 'a243da28-c11e-45a8-9f26-0284a9a789bc'; + const serviceInstanceId = 'b153e8ce-2d00-4466-adc0-14bad70f150c'; + const serviceInvariantUuid = "dd5a69b7-c50c-4dde-adc2-966b79bb8fd6"; + + cy.initDrawingBoardUserPermission(); + + cy.route(`**/rest/models/services/${serviceModelId}`, + 'fixture:../support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_when_service_vnf_and_brother_vfmodule_alredy_upgraded_e2e__service_model.json') + .as('serviceModel2'); + + cy.route(`**/aai_get_service_instance_topology/${subscriberId}/${serviceType}/${serviceInstanceId}`, + 'fixture:../support/jsonBuilders/mocks/jsons/upgradeVfModule/upgrade_vfmodule_when_service_vnf_and_brother_vfmodule_alredy_upgraded_e2e__service_instance.json') + .as('serviceInstance2'); + + cy.route(`**/aai_get_newest_model_version_by_invariant/${serviceInvariantUuid}`, { + "modelVersionId": "a243da28-c11e-45a8-9f26-0284a9a789bc", + "modelName": "CHARLOTTE 01222020 Svc", + "modelVersion": "3.0", + "distributionStatus": "DISTRIBUTION_COMPLETE_OK", + "resourceVersion": "1580246673596", + "modelDescription": "test model for VF module replacement", + "orchestrationType": null + } + ).as("newestModelVersion2"); + + cy.openIframe(`app/ui/#/servicePlanning/EDIT?serviceModelId=${serviceModelId}&subscriberId=${subscriberId}&serviceType=${serviceType}&serviceInstanceId=${serviceInstanceId}`); + + cy.wait('@newestModelVersion2'); + cy.getElementByDataTestsId('node-803fdb3e-b4c9-451c-a020-f15cd1fda041-CHARLOTTE 01222020 0-menu-btn').click({force: true}).then(() => { + cy.getElementByDataTestsId('context-menu-upgrade').should('not.exist'); + + }); + + }); }); |