emberjs / emberjs/ember-test-helpers

`scrollTo` target type inconsistent with other test helpers

Open
#1,362 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
188
Forks
254
PR merge metrics
No merged PRs in 30d

Description

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:

```ts
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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.