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

scrollTo target type inconsistent with other test helpers #1362

Open
nwhittaker opened this issue Mar 28, 2023 · 0 comments
Open

scrollTo target type inconsistent with other test helpers #1362

nwhittaker opened this issue Mar 28, 2023 · 0 comments

Comments

@nwhittaker
Copy link

The scrollTo helper accepts a target of type string | HTMLElement. Most other helpers accept a target of string | Element. By requiring an HTMLElement, the API is inconsistent and introduces type friction between test helpers:

const container = find('div');

scrollTo(container, , )  // Argument of type 'Element' is not assignable to parameter of type 'string | HTMLElement'.

Any problems or objections to having scrollTo require a string | Element instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant