merge from ecomp a88f0072 - Modern UI
[vid.git] / vid-webpack-master / cypress / support / steps / general / clickOutside.step.ts
1 declare namespace Cypress {
2   interface Chainable {
3     clickOutside: typeof clickOutside,
4   }
5 }
6
7 function clickOutside(testByIdClickElement : string, testBeforeClickOutside : Function, testAfterClickOutside : Function) {
8   testBeforeClickOutside();
9   cy.getElementByDataTestsId(testByIdClickElement).click({force: true}).then(()=>{
10     testAfterClickOutside();
11   });
12 }
13
14 Cypress.Commands.add('clickOutside', clickOutside);