Changing VNF platform to multiselect + cypress + API
[vid.git] / vid-webpack-master / cypress / support / steps / genericForm / genericFormAction.steps.ts
1 declare namespace Cypress {
2   interface Chainable {
3     genericFormSubmitForm: typeof genericFormSubmitForm
4     selectPlatformValue: typeof selectPlatformValue
5   }
6 }
7
8
9 function selectPlatformValue(selectOption: string) {
10       cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true});
11       cy.getElementByDataTestsId(`multi-selectPlatform-${selectOption}`).click();
12       cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true});
13 }
14
15
16 function genericFormSubmitForm(): Chainable<any> {
17   return cy.getElementByDataTestsId('form-set').click({force: true});
18 }
19
20
21 Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm);
22 Cypress.Commands.add('selectPlatformValue', selectPlatformValue);