diff options
Diffstat (limited to 'vid-webpack-master/cypress/support/steps/genericForm')
-rw-r--r-- | vid-webpack-master/cypress/support/steps/genericForm/checkPopover.step.ts | 14 | ||||
-rw-r--r-- | vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts | 12 |
2 files changed, 26 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/support/steps/genericForm/checkPopover.step.ts b/vid-webpack-master/cypress/support/steps/genericForm/checkPopover.step.ts new file mode 100644 index 000000000..085410ece --- /dev/null +++ b/vid-webpack-master/cypress/support/steps/genericForm/checkPopover.step.ts @@ -0,0 +1,14 @@ +declare namespace Cypress { + interface Chainable { + checkPopoverContentOnMouseEvent: typeof checkPopoverContentOnMouseEvent + } +} + +function checkPopoverContentOnMouseEvent(dataTestId: string, klass: string, mouseEvent: string, index: number) : Chainable<any> { + index = index || 0; + let element = cy.getElementByDataTestsId(dataTestId).eq(index); + element.trigger(mouseEvent).click().get(klass); + return element; +} + +Cypress.Commands.add('checkPopoverContentOnMouseEvent', checkPopoverContentOnMouseEvent); diff --git a/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts b/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts new file mode 100644 index 000000000..9786369cf --- /dev/null +++ b/vid-webpack-master/cypress/support/steps/genericForm/genericFormAction.steps.ts @@ -0,0 +1,12 @@ +declare namespace Cypress { + interface Chainable { + genericFormSubmitForm: typeof genericFormSubmitForm + } +} + +function genericFormSubmitForm() : Chainable<any> { + return cy.getElementByDataTestsId('form-set').click({force: true}); +} + + +Cypress.Commands.add('genericFormSubmitForm', genericFormSubmitForm); |