From 091343aa4bbf1bd6b882e08113d90685c1c84ffe Mon Sep 17 00:00:00 2001 From: Yoav Schneiderman Date: Wed, 20 Nov 2019 16:50:45 +0200 Subject: Allow platform multi-selection for VNF in modern UI Issue-ID: VID-722 Change-Id: Id87f59fff128e277d9158b83f3908754375c8b01 Signed-off-by: Yoav Schneiderman Signed-off-by: Einat Vinouze --- .../jsonBuilders/mocks/jsons/flags.cypress.json | 2 ++ .../steps/genericForm/genericFormAction.steps.ts | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 2 deletions(-) (limited to 'vid-webpack-master/cypress/support') 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 d9561f168..53038ed4e 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,5 +19,7 @@ "FLAG_FLASH_REPLACE_VF_MODULE": true, "FLAG_FLASH_MORE_ACTIONS_BUTTON_IN_OLD_VIEW_EDIT": true, "FLAG_1911_INSTANTIATION_ORDER_IN_ASYNC_ALACARTE": false, + "FLAG_1911_INSTANTIATION_ORDER_BUTTON_IN_ASYNC_ALACARTE": false, + "FLAG_2002_VNF_PLATFORM_MULTI_SELECT" : false, "FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS": true } diff --git a/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts b/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts index 9786369cf..41784daff 100644 --- a/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts +++ b/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts @@ -1,12 +1,29 @@ declare namespace Cypress { interface Chainable { genericFormSubmitForm: typeof genericFormSubmitForm + selelctPlatformValue: typeof selelctPlatformValue } } -function genericFormSubmitForm() : Chainable { - return cy.getElementByDataTestsId('form-set').click({force: true}); + + + +function selelctPlatformValue(isDropdown: boolean, selectOption: string){ + if (isDropdown) { + cy.selectDropdownOptionByText('platform', selectOption); + } else { + cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true}) + .getElementByDataTestsId(`multi-selectPlatform-${selectOption}`).click() + .getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true}); + + } +} + + +function genericFormSubmitForm(): Chainable { + return cy.getElementByDataTestsId('form-set').click({force: true}); } Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm); +Cypress.Commands.add('selelctPlatformValue', selelctPlatformValue); -- cgit 1.2.3-korg