diff options
author | Alexey Sandler <alexey.sandler@intl.att.com> | 2019-12-05 17:04:45 +0200 |
---|---|---|
committer | Yoav Schneiderman <yoav.schneiderman@intl.att.com> | 2019-12-08 14:20:44 +0200 |
commit | 77dd486269bb11f1e206114b87033a7dcc58c012 (patch) | |
tree | 8df5710c6f184a2f58837b48df94009f2db39248 /vid-webpack-master/cypress/support | |
parent | ad530ef6478ed2c8d3d153738ed735130b4019e7 (diff) |
Changing VNF platform to multiselect + cypress + API
Issue-ID: VID-724
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Change-Id: Ie8c720974da3419e26ce7e8675622f75780581b9
Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com>
Diffstat (limited to 'vid-webpack-master/cypress/support')
3 files changed, 11 insertions, 16 deletions
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 9afc1723f..c7412edfb 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 @@ -17,7 +17,7 @@ "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_VNF_PLATFORM_MULTI_SELECT" : true, "FLAG_2002_VFM_UPGRADE_ADDITIONAL_OPTIONS": true, "FLAG_2004_TEMP_BUTTON_TO_INSTANTIATION_STATUS_FILTER": true, "FLAG_2004_INSTANTIATION_STATUS_FILTER": true, diff --git a/vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts b/vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts index a5319b80f..3e91f7719 100644 --- a/vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts +++ b/vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts @@ -7,12 +7,14 @@ declare namespace Cypress { duplicateVnf: typeof DuplicateVnf, } } -function FillVnfPopup(): Chainable<any> { +function FillVnfPopup(changePlatformValue?: boolean): Chainable<any> { cy.selectDropdownOptionByText('productFamily', 'Emanuel'); cy.selectDropdownOptionByText('lcpRegion', 'hvf6'); cy.selectDropdownOptionByText('tenant', 'AIN Web Tool-15-D-STTest2'); cy.selectDropdownOptionByText('lineOfBusiness', 'zzz1'); - cy.selectDropdownOptionByText('platform', 'xxx1'); + if(changePlatformValue === true){ + cy.selectPlatformValue('xxx1') + } return cy.getElementByDataTestsId('form-set').click({force : true}).then((done)=>{ return done; }); 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 41784daff..00a945711 100644 --- a/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts +++ b/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts @@ -1,22 +1,15 @@ declare namespace Cypress { interface Chainable { genericFormSubmitForm: typeof genericFormSubmitForm - selelctPlatformValue: typeof selelctPlatformValue + selectPlatformValue: typeof selectPlatformValue } } - - -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 selectPlatformValue(selectOption: string) { + cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true}); + cy.getElementByDataTestsId(`multi-selectPlatform-${selectOption}`).click(); + cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true}); } @@ -26,4 +19,4 @@ function genericFormSubmitForm(): Chainable<any> { Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm); -Cypress.Commands.add('selelctPlatformValue', selelctPlatformValue); +Cypress.Commands.add('selectPlatformValue', selectPlatformValue); |