From 88b50cd76e6b8ddf6993e3dc56cd64b53cf05b45 Mon Sep 17 00:00:00 2001 From: Nicolas Ramz Date: Thu, 7 Nov 2019 01:11:35 +0100 Subject: [PATCH 1/3] ADDED: missing call signatures for right/dblclick These two call signatures where missing for rightclick and dblclick: only the `rightclick(options?: Partial): Chainable ` one was present. See #5617 --- cli/types/index.d.ts | 50 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/cli/types/index.d.ts b/cli/types/index.d.ts index 09f93c1c22b..31c2c3a751e 100644 --- a/cli/types/index.d.ts +++ b/cli/types/index.d.ts @@ -620,13 +620,61 @@ 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) + ``` + */ + rightclick(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. From c97af547c7e3be8cfe36e6df76e73e6bb8baac62 Mon Sep 17 00:00:00 2001 From: Nicolas Ramz Date: Thu, 7 Nov 2019 01:15:47 +0100 Subject: [PATCH 2/3] FIXED: typo --- cli/types/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/types/index.d.ts b/cli/types/index.d.ts index 31c2c3a751e..8ede8beab8e 100644 --- a/cli/types/index.d.ts +++ b/cli/types/index.d.ts @@ -643,7 +643,7 @@ declare namespace Cypress { cy.get('button').dblclick(15, 40) ``` */ - rightclick(x: number, y: number, options?: Partial): Chainable + dblclick(x: number, y: number, options?: Partial): Chainable /** * Right-click a DOM element. * From 36a39920e092542af7f73538321dca98bebfd830 Mon Sep 17 00:00:00 2001 From: warpdesign Date: Thu, 7 Nov 2019 02:30:49 +0100 Subject: [PATCH 3/3] FIXED: dtslint errors --- cli/types/index.d.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/cli/types/index.d.ts b/cli/types/index.d.ts index 8ede8beab8e..c87c5578112 100644 --- a/cli/types/index.d.ts +++ b/cli/types/index.d.ts @@ -674,7 +674,6 @@ declare namespace Cypress { ``` */ rightclick(x: number, y: number, options?: Partial): Chainable - /** * Set a debugger and log what the previous command yields.