Cypress Commands adddQuery Error
Describe the bug When going through the examples to setup within Cypress I am seeing the following error when trying to run any tests:
Cypress.Commands.addQuery() is used to create new queries, but findAllByLabelText is an existing Cypress command or query, or is reserved internally by Cypress.
To Reproduce
- Go through installation instructions.
- Use Cypress example for setup: https://github.com/drptbl/synpress-examples/tree/master/cypress/isolated-state
- Run any test.
- See error
**Expected behavior Cypress should run tests without the error.
Screenshots

Desktop (please complete the following information):
- OS: macOS
- Synpress version: 3.5.1
**Note Cypress Version: 12.5.1
Bump, this is also happening to me
Take a look at this https://github.com/testing-library/cypress-testing-library/pull/238#issuecomment-1366904058. This error happened on my side when I was importing e2e.ts file in my tests and we have a query type defined in e2e.ts. So pay attention if you import in your test file rather the type definition or anything from commands.ts, where the query is added
This is happening to me also. https://github.com/testing-library/cypress-testing-library/pull/238#issuecomment-1366904058 this didn't help me unfortunately
@jmitchell-figure have you been able to fix it?
Take a look at this https://github.com/testing-library/cypress-testing-library/pull/238#issuecomment-1366904058.
I had the same error and the fix was also to ensure that the file was "run" only once.
I suggest anyone facing this issue to just add a console.log before adding the commands/queries:
console.log('Adding support commands/queries'); // => If you see this log multiple times, the issue is likely on your end
Cypress.Commands.addQuery('findAllByLabelText', findAllByLabelTextFn);