diff --git a/cli/types/index.d.ts b/cli/types/index.d.ts index 09f93c1c22b..c87c5578112 100644 --- a/cli/types/index.d.ts +++ b/cli/types/index.d.ts @@ -620,13 +620,60 @@ declare namespace Cypress { * @see https://on.cypress.io/dblclick */ dblclick(options?: Partial): Chainable - + /** + * Double-click a DOM element at specific corner / side. + * + * @param {String} position - The position where the click should be issued. + * The `center` position is the default position. + * @see https://on.cypress.io/dblclick + * @example + * cy.get('button').dblclick('topRight') + */ + dblclick(position: string, options?: Partial): Chainable + /** + * Double-click a DOM element at specific coordinates + * + * @param {number} x The distance in pixels from the element’s left to issue the click. + * @param {number} y The distance in pixels from the element’s top to issue the click. + * @see https://on.cypress.io/dblclick + * @example + ``` + // The click below will be issued inside of the element + // (15px from the left and 40px from the top). + cy.get('button').dblclick(15, 40) + ``` + */ + dblclick(x: number, y: number, options?: Partial): Chainable /** * Right-click a DOM element. * * @see https://on.cypress.io/rightclick */ rightclick(options?: Partial): Chainable + /** + * Right-click a DOM element at specific corner / side. + * + * @param {String} position - The position where the click should be issued. + * The `center` position is the default position. + * @see https://on.cypress.io/click + * @example + * cy.get('button').rightclick('topRight') + */ + rightclick(position: string, options?: Partial): Chainable + /** + * Right-click a DOM element at specific coordinates + * + * @param {number} x The distance in pixels from the element’s left to issue the click. + * @param {number} y The distance in pixels from the element’s top to issue the click. + * @see https://on.cypress.io/rightclick + * @example + ``` + // The click below will be issued inside of the element + // (15px from the left and 40px from the top). + cy.get('button').rightclick(15, 40) + ``` + */ + rightclick(x: number, y: number, options?: Partial): Chainable /** * Set a debugger and log what the previous command yields.