cypress-real-events
cypress-real-events copied to clipboard
Support for/compatibility with cy.origins
The real* commands stop working with the experimental feature experimentalSessionAndOrigin: true
, which is required to pass some parameters from one website to another in a scenario I am creating.
The code:
cy.origin('https://123.abc', { args: { someParm } }, ({someParm}) => {
cy.visit('https://123.abc')
cy.contains('someText', {matchCase: false}).realClick({force: true})
})
fails on realClick or on any other part of the real-events package.
Now we have to miss out of the way more practical real events package.
Thats unfortunate. Need to find some time to debug it.
Hi @dmtrKovalenko is there any update on this issue?
No updates yet, if you have any issues, the list of problems, or ideas on how to fix them please mention here. Also, PRs are welcome.
This may be by design in Cypress, see: https://docs.cypress.io/api/cypress-api/require
Example code with issue remediated:
cy.origin('test.com', { args: { testArg } }, (
{ testArg }
) => {
Cypress.require('cypress-real-events');
cy.realPress('Tab')
})
Make sure to add the following in cypress.config.js
e2e: {
experimentalOriginDependencies: true,