X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=vid-webpack-master%2Fcypress%2Fsupport%2FjsonBuilders%2Fmocks%2Faai.mock.ts;h=807a3bcdaa3803d873250435789163fd8d5869f0;hb=e8d84989d4ff3489901934825279b73c453cbeb5;hp=3e6d5e33ff7911dcc0dc517a7fc9843b0157f3eb;hpb=567c937f57ec575a7c25b7912016970ef138fccd;p=vid.git 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 3e6d5e33f..807a3bcda 100644 --- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/aai.mock.ts @@ -8,6 +8,8 @@ declare namespace Cypress { initActiveNetworks : typeof initActiveNetworks; initActiveVPNs : typeof initActiveVPNs; initGetAAISubDetails : typeof initGetAAISubDetails; + initAAIServices: typeof initAAIServices; + initGetModelByServiceType: typeof initGetModelByServiceType; } } @@ -47,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() @@ -154,5 +169,8 @@ Cypress.Commands.add('initGetAAISubDetails', initGetAAISubDetails); 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); +