diff options
author | Amichai Hemli <amichai.hemli@intl.att.com> | 2019-12-08 13:23:42 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-12-08 13:23:42 +0000 |
commit | 6d937099efa1cb30eb16470005c7e05c1f29f729 (patch) | |
tree | 05355028be9f8ef1c69e58fc639fb9c9a6cae923 /vid-webpack-master/cypress/support/steps | |
parent | 408aad3b88e1eb11ec17243f2750ed0563262cb1 (diff) | |
parent | 77dd486269bb11f1e206114b87033a7dcc58c012 (diff) |
Merge "Changing VNF platform to multiselect + cypress + API"
Diffstat (limited to 'vid-webpack-master/cypress/support/steps')
-rw-r--r-- | vid-webpack-master/cypress/support/steps/fill.vnf.popup.step.ts | 6 | ||||
-rw-r--r-- | vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts | 19 |
2 files changed, 10 insertions, 15 deletions
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); |