diff options
author | Ittay Stern <ittay.stern@att.com> | 2020-01-15 09:10:53 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-01-15 09:10:53 +0000 |
commit | fcf4351694aea05d3dd4c1a1158c53de4b629a8a (patch) | |
tree | b21b744d6ebb0ec6b8aa30ab1e85a22d364c9e0e /vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts | |
parent | 3fd462d22e8712d4586f4ce1ff8f63ae355d4c04 (diff) | |
parent | 022efbf54ddd662ede2d000a847ed02ca6d05d97 (diff) |
Merge "fix open modern ui from Create new service instance flow"
Diffstat (limited to 'vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts')
-rw-r--r-- | vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts b/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts index ae60361c2..807a3bcda 100644 --- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts @@ -9,6 +9,7 @@ declare namespace Cypress { initActiveVPNs : typeof initActiveVPNs; initGetAAISubDetails : typeof initGetAAISubDetails; initAAIServices: typeof initAAIServices; + initGetModelByServiceType: typeof initGetModelByServiceType; } } @@ -48,6 +49,19 @@ function initGetAAISubDetails(response? : JSON) : void { }); } +function initGetModelByServiceType(response? : JSON) : void { + cy.readFile('cypress/support/jsonBuilders/mocks/jsons/aaiSubDetails.json').then((res) => { + cy.server() + .route({ + method: 'GET', + status: 200, + url: Cypress.config('baseUrl') + "/aai_get_models_by_service_type/**", + response: response ? response : res + }).as('aai-sub-details') + }); +} + + function initAlaCarteService(response? : JSON) : void { cy.readFile('cypress/support/jsonBuilders/mocks/jsons/a-la-carteService.json').then((res) => { cy.server() @@ -156,6 +170,7 @@ Cypress.Commands.add('initSearchVNFMemebers', initSearchVNFMemebers); Cypress.Commands.add('initActiveNetworks', initActiveNetworks); Cypress.Commands.add('initActiveVPNs', initActiveVPNs); Cypress.Commands.add('initAAIServices', initAAIServices); +Cypress.Commands.add('initGetModelByServiceType', initGetModelByServiceType); |