Skip to content

scrollTo target type inconsistent with other test helpers #1362

Open
@nwhittaker

Description

@nwhittaker

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions