summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/support/steps/genericForm
diff options
context:
space:
mode:
authorYoav Schneiderman <yoav.schneiderman@intl.att.com>2019-11-20 16:50:45 +0200
committerEinat Vinouze <einat.vinouze@intl.att.com>2019-11-26 12:41:29 +0200
commit091343aa4bbf1bd6b882e08113d90685c1c84ffe (patch)
treefbef4bda9987a59dff5109cf5cc401f95eb05068 /vid-webpack-master/cypress/support/steps/genericForm
parentee6c513301200be38c3602a4c3084c2ff3bde10c (diff)
Allow platform multi-selection for VNF in modern UI
Issue-ID: VID-722 Change-Id: Id87f59fff128e277d9158b83f3908754375c8b01 Signed-off-by: Yoav Schneiderman <yoav.schneiderman@intl.att.com> Signed-off-by: Einat Vinouze <einat.vinouze@intl.att.com>
Diffstat (limited to 'vid-webpack-master/cypress/support/steps/genericForm')
-rw-r--r--vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts21
1 files changed, 19 insertions, 2 deletions
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<any> {
- 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<any> {
+ return cy.getElementByDataTestsId('form-set').click({force: true});
}
Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm);
+Cypress.Commands.add('selelctPlatformValue', selelctPlatformValue);