Skip to content

Jira application breaking when visited with cy.visit() command. #1436

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

Closed
denizoguz opened this issue Mar 8, 2018 · 4 comments
Closed

Jira application breaking when visited with cy.visit() command. #1436

denizoguz opened this issue Mar 8, 2018 · 4 comments
Milestone

Comments

@denizoguz
Copy link

I want to use cypress to test Jira plugins. In order to do that, I should able to browse to Jira pages using cy.visit(). But Cypress can't load even a basic page of Jira. You can reproduce the problem easily by trying to visit any page of Jira.

Test code:

cy.visit('https://jira.atlassian.com/secure/BrowseProjects.jspa?selectedCategory=all&selectedProjectType=all');
  • Operating System: MacOS High Sierra
  • Cypress Version: 2.1.0
  • Browser Version: Chrome 64

Is this a Feature or Bug?

This is a bug.

Current behavior:

cypress gives 'Uncaught TypeError: Cannot read property 'fn' of undefined' error. Cypress telling that this is not a Cypress problem, this is an application problem. But this page loads without any problem if you try to visit url directly in the Chrome 64. Somehow behavior of the page is changing under Cypress.

Desired behavior:

Requested page should be loaded without any error.

@jennifer-shehane jennifer-shehane added type: bug stage: ready for work The issue is reproducible and in scope labels Mar 9, 2018
@brian-mann
Copy link
Member

@jennifer-shehane did the legwork here and discovered the root cause.

It's this function right here:

https://gist.github.com/jennifer-shehane/75759abaa79883097ee4922e3c8f1998#file-unframed-js-L87

That function is returning a different window in Cypress than in Jira.

I'll have to dissect the logic to implement a workaround. Although its kind of a rabbit hole to fix 3rd party code - I don't see another option. Because Cypress iframes the application under test, it's possible code behaves slightly differently - in this case it returns the Cypress window - instead of the Jira window.

@brian-mann brian-mann mentioned this issue Mar 9, 2018
@brian-mann
Copy link
Member

PR is here: #1437

This will go out in the next release.

@brian-mann brian-mann added this to the 3.0.0 milestone Mar 9, 2018
@jennifer-shehane jennifer-shehane added stage: pending release and removed stage: pending release stage: investigating Someone from Cypress is looking into this stage: needs investigating Someone from Cypress needs to look at this stage: ready for work The issue is reproducible and in scope labels May 24, 2018
@brian-mann
Copy link
Member

Released in 3.0.0.

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Mar 16, 2020

Released in 4.2.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v4.2.0, please open a new issue.

@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Mar 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants