Skip to content

Consider adding user.mouse and user.keyboard from pptr to user object #170

@calebeby

Description

@calebeby

The user object started out as trying to copy user-event’s API, with the underlying code calling pptr methods. Each function performs additional checks that pptr does not (i.e. user.click won’t click on elements that are hidden, covered, etc.).

user.mouse and user.keyboard aren’t in user-event. I was reluctant to stray from their API. I am not opposed to it but so far we haven’t diverged at all.

If we were to put the user.mouse and user.keyboard methods in Pleasantest, there are several options of how to do it:

  • Call pptr methods directly, no changes
  • Call them with a small wrapper with the forgot-await detection and parameter runtime typechecking
  • Call them with a larger wrapper that also does more types of checks (along the lines of the checks I mentioned for user.click, but I’m not sure what that would look like for page.keyboard and page.mouse)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions