diff options
Diffstat (limited to 'vid-webpack-master/cypress/support/steps/genericForm/checkPopover.step.ts')
-rw-r--r-- | vid-webpack-master/cypress/support/steps/genericForm/checkPopover.step.ts | 14 |
1 files changed, 14 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); |