Allow edit service button to be shown on service context menu in recreate mode.
[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     checkPlatformValue: typeof checkPlatformValue
6   }
7 }
8
9
10 function selectPlatformValue(selectOption: string) {
11       cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true});
12       cy.getElementByDataTestsId(`multi-selectPlatform-${selectOption}`).click();
13       cy.getElementByDataTestsId("multi-selectPlatform").get('.c-btn').click({force: true});
14 }
15
16 function checkPlatformValue(value: string){
17   return cy.getElementByDataTestsId("multi-selectPlatform").should("contain", value)
18 }
19
20 function genericFormSubmitForm(): Chainable<any> {
21   return cy.getElementByDataTestsId('form-set').click({force: true});
22 }
23
24
25 Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm);
26 Cypress.Commands.add('selectPlatformValue', selectPlatformValue);
27 Cypress.Commands.add('checkPlatformValue', checkPlatformValue);