Attribute $route undefined when upgrading from 12.11.0 to 12.12.0 or higher #29001
Labels
CT
Issue related to component testing
stage: needs investigating
Someone from Cypress needs to look at this
type: typings
Issue related to Cypress types (for TypeScript)
v12.12.0 🐛
Current behavior
With Cypress 12.11.0 this type of test used to work:
When upgrading to Cypress 12.12.0 or any other later version it breaks because
mounted.component.$route
is undefined. Adding aconsole.log(mounted.component.$route);
indeed confirms that it is set under 12.11.0 but undefined in 12.12.0. All component tests involving $route break in the same way.Desired behavior
The $route attribute should be available.
Test code to reproduce
The minimalistic
component.ts
(changed to be as close to the documentation example) is:The packages in the package.json look like this:
Cypress Version
12.12.0
Node version
20.11.1
Operating System
Microsoft Windows 10 Enterprise 10.0.19045 Build 19045
Debug Logs
No response
Other
Downgrading vite to a 4.X version does not change the behaviour.
The text was updated successfully, but these errors were encountered: