Changing VNF platform to multiselect + cypress + API
[vid.git] / vid-webpack-master / cypress / support / steps / genericForm / genericFormAction.steps.ts
index 41784da..00a9457 100644 (file)
@@ -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);