aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts
diff options
context:
space:
mode:
authorIttay Stern <ittay.stern@att.com>2019-10-23 17:47:34 +0300
committerIttay Stern <ittay.stern@att.com>2019-10-28 15:27:32 +0200
commit0b2078ffa780f0e930a98f55f38fa7697ffba84c (patch)
tree496b9ddc5a4e17f2384acc188e1cfb18ac3b51a9 /vid-webpack-master/cypress/support/jsonBuilders/mocks/vid.mock.ts
parente63fe3aa29fc637d57f5dbf92dda200685be790b (diff)
Add another vfm-upgrade test
Issue-ID: VID-603 Change-Id: I4690906d3bc660984a0c2269d7151f6151b89940 Signed-off-by: Ittay Stern <ittay.stern@att.com>
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.ts11
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]);
}