thefrontside / thefrontside/interactors

with-cypress doesn't work with Cypress 10

Open
#207 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
36
Forks
2
Avg merge
4m
Merged PRs (30d)
2

Description

After upgrading from Cypress 8 to 10, we started getting this CypressError using @interactors/with-cypress@1.0.0-rc1.1:

Cypress.Commands.add() cannot create a new command named expect because that name is reserved internally by Cypress.

node_modules/.pnpm/@interactors+with-cypress@1.0.0-rc1.1_cypress@10.2.0/node_modules/@interactors/with-cypress/dist/cypress.js:34:1:

  33 |     // NOTE: Add interaction assertion function, Cypress also overrides `expect` method to a wrapper function
> 34 |     Cypress.Commands.add('expect', (interaction) => interact([].concat(interaction), 'expect'));
     | ^

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the failing entry point in node_modules/@interactors/with-cypress/dist/cypress.js and reproduce the error with Cypress 10.2.0. Check the package's Cypress command registration against Cypress 10 behavior. Done means @interactors/with-cypress loads without the reserved-name error and the affected behavior has a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
cypress, typescript
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.