Skip to content

14.4: pageX and pageY coords are not passed to MouseEvent from pointer() call #1037

Closed
@sf-kialo

Description

@sf-kialo

Reproduction example

https://codesandbox.io/s/heuristic-lake-3rk90q?file=/src/App.js

Prerequisites

  1. Set up any page that listens to MouseEvent and log the pageX and pageY properties of the event (as specified in the docs)
  2. Simulate a user.pointer event with additional pageX and pageY coords passed like await user.pointer({target: anyTarget, coords: { pageX: 100, pageY: 100 }})
  3. Expect the logs to contain the previously defined values for pageX and pageY.

Expected behavior

The properties are properly passed to the mouse event and get logged correctly.

Works correctly in 14.3.

Actual behavior

The value of these properties is undefined.

Broken as of 14.4.0.

User-event version

14.4.3

Environment

See sandbox

Additional context

When the assignProps was changed in this commit, those two properties were omitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingreleased

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions