diff --git a/cli/types/cypress.d.ts b/cli/types/cypress.d.ts index a4705a530c1b..91d80c342334 100644 --- a/cli/types/cypress.d.ts +++ b/cli/types/cypress.d.ts @@ -362,7 +362,7 @@ declare namespace Cypress { /** * Utility functions for ensuring various properties about a subject. - * @see https://on.cypress.io/custom-queries + * @see https://on.cypress.io/api/custom-queries */ ensure: Ensure @@ -1613,7 +1613,7 @@ declare namespace Cypress { /** * Invoke a command synchronously, without using the command queue. * - * @see https://on.cypress.io/custom-queries + * @see https://on.cypress.io/api/custom-queries */ now(name: string, ...args: any[]): Promise | ((subject: any) => any) diff --git a/packages/driver/cypress/e2e/commands/commands.cy.js b/packages/driver/cypress/e2e/commands/commands.cy.js index 00c9c21deb16..e1fd6147814b 100644 --- a/packages/driver/cypress/e2e/commands/commands.cy.js +++ b/packages/driver/cypress/e2e/commands/commands.cy.js @@ -91,7 +91,7 @@ describe('src/cy/commands/commands', () => { it('throws when attempting to add an existing query', (done) => { cy.on('fail', (err) => { expect(err.message).to.eq('`Cypress.Commands.addQuery()` is used to create new queries, but `get` is an existing Cypress command or query, or is reserved internally by Cypress.\n\n If you want to override an existing command or query, use `Cypress.Commands.overrideQuery()` instead.') - expect(err.docsUrl).to.eq('https://on.cypress.io/custom-queries') + expect(err.docsUrl).to.eq('https://on.cypress.io/api/custom-queries') done() }) @@ -139,7 +139,7 @@ describe('src/cy/commands/commands', () => { it('throws when attempting to add a query with the same name as an internal function', (done) => { cy.on('fail', (err) => { expect(err.message).to.eq('`Cypress.Commands.addQuery()` cannot create a new query named `addCommand` because that name is reserved internally by Cypress.') - expect(err.docsUrl).to.eq('https://on.cypress.io/custom-queries') + expect(err.docsUrl).to.eq('https://on.cypress.io/api/custom-queries') done() }) diff --git a/packages/driver/src/cypress/error_messages.ts b/packages/driver/src/cypress/error_messages.ts index bf25609772bb..dfb61ace1c9c 100644 --- a/packages/driver/src/cypress/error_messages.ts +++ b/packages/driver/src/cypress/error_messages.ts @@ -853,11 +853,11 @@ export default { }, invalid_new_query: { message: '`Cypress.Commands.addQuery()` is used to create new queries, but `{{name}}` is an existing Cypress command or query, or is reserved internally by Cypress.\n\n If you want to override an existing command or query, use `Cypress.Commands.overrideQuery()` instead.', - docsUrl: 'https://on.cypress.io/custom-queries', + docsUrl: 'https://on.cypress.io/api/custom-queries', }, reserved_command_query: { message: '`Cypress.Commands.addQuery()` cannot create a new query named `{{name}}` because that name is reserved internally by Cypress.', - docsUrl: 'https://on.cypress.io/custom-queries', + docsUrl: 'https://on.cypress.io/api/custom-queries', }, invalid_overwrite: { message: 'Cannot overwite command for: `{{name}}`. An existing command does not exist by that name.',