Description
Current behavior
Since Cypress 10.0 there was been introduced #18587 change with throwing an error if user is trying to overwrite existing built-in command by using Cypress.Commands.add()
. So the PR says that we should use overwrite
method instead if we'd like to overwrite existing commands. But the problem is it doesn't work and if we use Cypress.Commands.overwrite()
we will get another error
Cannot overwite command for:
expect
. An existing command does not exist by that name.
So currently there is no legal way to overwrite expect
command and I couldn't find any info that expect
is restricted and can't be overwritten.
Desired behavior
There are should be possible to overwrite built-in commands as expect
by using Cypress.Commands.overwrite()
without any errors
Test code to reproduce
No test code
Cypress Version
10.3.0
Other
No response