From ef5e3b283ed1825e2409db2d89fefed8b606abe6 Mon Sep 17 00:00:00 2001 From: Sara Weiss Date: Thu, 5 Dec 2019 13:23:13 +0200 Subject: Show previous instantiations button in new service modal Issue-ID: VID-724 Signed-off-by: Sara Weiss Change-Id: I18633adbabbc22c68f9bcd712427033deaffd33c --- .../integration/iFrames/service.popup.e2e.ts | 8 +++++++ .../jsonBuilders/mocks/jsons/flags.cypress.json | 1 + .../generic-form-popup.component.html | 7 ++++++ .../generic-form-popup.component.ts | 5 ++++ .../service/service.popup.service.spec.ts | 27 ++++++++++++++++++++++ .../service/service.popup.service.ts | 26 +++++++++++++++++---- .../instantiation.templates.modal.component.scss | 2 +- .../formControlModels/formPopupDetails.model.ts | 6 ++++- .../services/featureFlag/feature-flags.service.ts | 1 + 9 files changed, 76 insertions(+), 7 deletions(-) (limited to 'vid-webpack-master') diff --git a/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts index d1d41d0d9..7d1a1829d 100644 --- a/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts +++ b/vid-webpack-master/cypress/integration/iFrames/service.popup.e2e.ts @@ -82,6 +82,14 @@ describe('Service popup', function () { cy.get('form-general-error').contains('Page contains errors. Please see details next to the relevant fields.'); }); }); + + it('when open service popup should show showPrevious button', () => { + cy.openIframe('/app/ui/#/servicePopup?serviceModelId=2f80c596-27e5-4ca9-b5bb-e03a7fd4c0fd&isCreate=true'); + cy.getElementByDataTestsId('ShowPreviousInstancesButton').contains('Previous Instantiation').click(); + + }) + + }); }); diff --git a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json index 0f5e15298..9afc1723f 100644 --- a/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json +++ b/vid-webpack-master/cypress/support/jsonBuilders/mocks/jsons/flags.cypress.json @@ -19,6 +19,7 @@ "FLAG_1911_INSTANTIATION_ORDER_BUTTON_IN_ASYNC_ALACARTE": false, "FLAG_2002_VNF_PLATFORM_MULTI_SELECT" : false, "FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS": true, + "FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER": true, "FLAG_2004_INSTANTIATION_STATUS_FILTER": true, "FLAG_2004_INSTANTIATION_TEMPLATES_POPUP" : false } diff --git a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html index 5b8dfa9c9..f9da42607 100644 --- a/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html +++ b/vid-webpack-master/src/app/shared/components/genericFormPopup/generic-form-popup.component.html @@ -60,6 +60,13 @@ type="button" class="btn btn-success submit" (click)="openTemplateModal()" >Template +