cloudfour / cloudfour/pleasantest

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

Open
#170 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
TypeScript
Stars
175
Forks
2
Avg merge
1m
Merged PRs (30d)
1

Description

The user object started out as trying to copy [user-event](https://testing-library.com/docs/ecosystem-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)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.