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

Flaky test: view source event toggle #23270

Closed
turt2live opened this issue Sep 13, 2022 · 1 comment
Closed

Flaky test: view source event toggle #23270

turt2live opened this issue Sep 13, 2022 · 1 comment
Labels
A-Testing Testing, code coverage, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Flaky-Test A test is raising false alarms

Comments

@turt2live
Copy link
Member

  1) Timeline
       message displaying
         should click top left of view source event toggle:
     CypressError: `cy.within()` failed because this element is detached from the DOM.

`<span class="mx_ViewSourceEvent mx_EventTile_content">...</span>`

Cypress requires elements be attached in the DOM to interact with them.

The previous command that ran was:

  > `cy.realHover()`

This DOM element likely became detached somewhere between the previous and current command.

Common situations why this happens:
  - Your JS framework re-rendered asynchronously
  - Your app code reacted to an event firing and removed the element

You typically need to re-query for the element or add 'guards' which delay Cypress from running new commands.

All 2 subject validations failed on this subject.

https://on.cypress.io/element-has-detached-from-dom
      at ensureAttached (http://localhost:8080/__cypress/runner/cypress_runner.js:157611:76)
      at validateType (http://localhost:8080/__cypress/runner/cypress_runner.js:157444:11)
      at $Cy.ensureSubjectByType (http://localhost:8080/__cypress/runner/cypress_runner.js:157484:9)
      at $Cy.pushSubject (http://localhost:8080/__cypress/runner/cypress_runner.js:167859:12)
      at wrapped (http://localhost:8080/__cypress/runner/cypress_runner.js:167350:19)
  From Your Spec Code:
      at Context.eval (http://localhost:8080/__cypress/tests?p=cypress/e2e/timeline/timeline.spec.ts:290:85)
@turt2live turt2live added the Z-Flaky-Test A test is raising false alarms label Sep 13, 2022
@SimonBrandner SimonBrandner added S-Minor Impairs non-critical functionality or suitable workarounds exist A-Testing Testing, code coverage, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely T-Defect labels Sep 13, 2022
@weeman1337 weeman1337 assigned weeman1337 and unassigned weeman1337 Sep 16, 2022
@turt2live
Copy link
Member Author

we don't believe this test is flaky enough to have the issue open - if people encounter this flaky test, please open a new issue or reopen this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Testing Testing, code coverage, etc. O-Occasional Affects or can be seen by some users regularly or most users rarely S-Minor Impairs non-critical functionality or suitable workarounds exist T-Defect Z-Flaky-Test A test is raising false alarms
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants