Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for/compatibility with cy.origins #301

Open
norbertvannobelen opened this issue Sep 16, 2022 · 4 comments
Open

Support for/compatibility with cy.origins #301

norbertvannobelen opened this issue Sep 16, 2022 · 4 comments
Labels
bug Something isn't working

Comments

@norbertvannobelen
Copy link

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.

@dmtrKovalenko
Copy link
Owner

Thats unfortunate. Need to find some time to debug it.

@dmtrKovalenko dmtrKovalenko added the bug Something isn't working label Oct 9, 2022
@jbshu4546
Copy link

Hi @dmtrKovalenko is there any update on this issue?

@dmtrKovalenko
Copy link
Owner

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.

@jbshu4546
Copy link

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,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants