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

React 18 highlight element test has right element, but stale styles #30526

Open
AtofStryker opened this issue Nov 4, 2024 · 0 comments
Open
Labels
type: chore Work is required w/ no deliverable to end user

Comments

@AtofStryker
Copy link
Contributor

AtofStryker commented Nov 4, 2024

Current behavior

We are currently skipping the element comparison on the highlight in the dom_hitbox tests after upgrading to React 18 in #30511. What looks to be occurring, is that the DOM reference fetched in elementFromPoint is a stale detached DOM reference of the highlight container over the button. In React 17, the "elementFromPoint" and "div[data-layer=Content]" share the same reference. Since updating the Reporter to React 18, this is no longer the case. The element looks to be rerendered and the previous reference detached. We will need to come up with a different way to test this.

Desired behavior

the element retrieved from elementFromPoint should be the same from the queried DOM

Test code to reproduce

see correct target position during click in dom_hitbox cypress test inside @packages/driver

Cypress Version

N/A

Node version

N/A

Operating System

N/A

Debug Logs

No response

Other

No response

@AtofStryker AtofStryker changed the title React 18 highlight element test has right element, but stale coordinates React 18 highlight element test has right element, but stale styles Nov 4, 2024
@jennifer-shehane jennifer-shehane added type: chore Work is required w/ no deliverable to end user Cypress 14 Issues scoped for Cypress 14 labels Nov 4, 2024
@jennifer-shehane jennifer-shehane removed the Cypress 14 Issues scoped for Cypress 14 label Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: chore Work is required w/ no deliverable to end user
Projects
None yet
Development

No branches or pull requests

2 participants