Skip to content

Flaky test: view source event toggle #23270

@turt2live

Description

@turt2live
  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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-TestingTesting, code coverage, etc.O-OccasionalAffects or can be seen by some users regularly or most users rarelyS-MinorImpairs non-critical functionality or suitable workarounds existT-DefectZ-Flaky-TestA test is raising false alarms

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions