diff options
author | Amichai Hemli <amichai.hemli@intl.att.com> | 2019-10-29 12:54:14 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-10-29 12:54:14 +0000 |
commit | 6b3717d92d93e756f30c84e89dd5873226907e62 (patch) | |
tree | 9c9cd0ca8a159c74662c15346f60ccd2ecdf16cd /vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts | |
parent | f8acfcf82a1b99eb2d293c03314d5c12b87540d1 (diff) | |
parent | 0b2078ffa780f0e930a98f55f38fa7697ffba84c (diff) |
Merge "Add another vfm-upgrade test"
Diffstat (limited to 'vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts')
-rw-r--r-- | vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts b/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts index 052fb8a4c..6fff0bc2d 100644 --- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts @@ -107,14 +107,13 @@ function initAsyncInstantiation(response? : JSON, delay?: number, status?: numbe }) } -function mockLatestVersionForService(uuidObject :any) { - if(uuidObject && uuidObject.serviceUuid && uuidObject.invariantId){ +function mockLatestVersionForService(serviceUuid: string, invariantId: string) { cy.server().route({ - url: Cypress.config('baseUrl') + '/aai_get_newest_model_version_by_invariant/' + uuidObject.invariantId, + url: Cypress.config('baseUrl') + '/aai_get_newest_model_version_by_invariant/' + invariantId, method: 'GET', status: 200, response: { - "modelVersionId": uuidObject.serviceUuid, + "modelVersionId": serviceUuid, "modelName": "SERVICE_INSTANCE_NAME", "modelVersion": "2.0", "distributionStatus": "DISTRIBUTION_COMPLETE_OK", @@ -122,16 +121,14 @@ function mockLatestVersionForService(uuidObject :any) { "modelDescription": "modelDescription" }, }).as("expectLatestServiceModelUpgradeVersion") - } } -function initVidMock(...args :any): void { +function initVidMock(): void { initGetToMenuInfo(); initCategoryParameter(); initFlags(); initAuditInfoVID(); initAuditInfoMSO(); - mockLatestVersionForService(args[0]); } |