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

Bug: document.body null causes exceptions when testing with cypress #266

Closed
d-led opened this issue Dec 20, 2022 · 7 comments
Closed

Bug: document.body null causes exceptions when testing with cypress #266

d-led opened this issue Dec 20, 2022 · 7 comments
Assignees
Labels
type: bug Something isn't working
Milestone

Comments

@d-led
Copy link

d-led commented Dec 20, 2022

What happened?

Problem

when testing an Angular Ix app with Cypress (e2e) and hovering over the test steps, the cypress-controlled browser throws exceptions in popover.util.ts:L37 or may hang.

Full reproduction step by step in a minimal repo: https://github.com/d-led/angular-ix-cypress#cypress-e2e-documentbody-is-null-in-popoverdestroy-bug-reproduction

Screenshot 2022-12-20 at 16 50 44

What type of frontend frameware are you seeing the problem on?

Angular

Which version of iX do you use?

v1.2.1

Code to produce this issue.

https://github.com/d-led/angular-ix-cypress

@d-led d-led added triage We discuss this topic in our internal weekly type: bug Something isn't working labels Dec 20, 2022
@danielleroux
Copy link
Collaborator

@d-led tested it with your repository, but cannot reproduce it.

Screen.Recording.2023-01-12.at.09.16.55.mov

@danielleroux danielleroux added question Further information is requested and removed type: bug Something isn't working triage We discuss this topic in our internal weekly labels Jan 12, 2023
@github-project-automation github-project-automation bot moved this to Jour Fix in Siemens iX Jan 12, 2023
@danielleroux danielleroux moved this from Jour Fix to Investigation in Siemens iX Jan 12, 2023
@d-led
Copy link
Author

d-led commented Jan 16, 2023

@danielleroux did you hover over the steps? visit, get, click, etc
hover

@danielleroux
Copy link
Collaborator

@d-led i think this issue is more related to cypress ui not to ix.

@d-led
Copy link
Author

d-led commented Jan 16, 2023

as a clarification: cypress mounts a DOM snapshot when hovering over a step.

One can see it as a cypress issue or a robustness issue of ix. Cypress is a major UI automation tool and it's likely that users of ix will use it.

I've looked at the code, and specifically this event listener is set up on the document.body. Others, e.g. are set up on window. A different target or simply a null check would solve the problem in this case.

Other parts of ix seem to work fine with cypress

@d-led
Copy link
Author

d-led commented Jan 16, 2023

see a similar discussion: here & here

cypress runs the tests in an iframe if that helps

Screenshot 2023-01-16 at 10 35 39

@danielleroux danielleroux added type: bug Something isn't working component: core and removed question Further information is requested labels Jan 16, 2023
@danielleroux danielleroux moved this from Investigation to Accepted in Siemens iX Jan 16, 2023
@danielleroux danielleroux added this to the 1.3.0 milestone Jan 16, 2023
@danielleroux
Copy link
Collaborator

@d-led thank you for the detailed preparation 🎉. As discussed with the team we will merge #153 with 1.3.0. In this PR we removed this popover util class entirely.

@danielleroux danielleroux self-assigned this Jan 16, 2023
@d-led
Copy link
Author

d-led commented Jan 16, 2023

@danielleroux superb. glad to hear!

@d-led d-led closed this as completed Jan 16, 2023
@github-project-automation github-project-automation bot moved this from Accepted to Done in Siemens iX Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

2 participants