Skip to content

Incorrect typing of the toBeDisplayed() assertion #1955

@LesYeuxNoirz

Description

@LesYeuxNoirz

The shipped type for the toBeDisplayed() assertion is not correct. At the moment, the assertion is declared like this:

toBeDisplayed(options?: ExpectWebdriverIO.CommandOptions): R

However, the actual implementation accepts up to 3 parameters and the second parameter is actually not command options:

Image As a result, when calling the assertion in accordance with the current typings and providing command options, they're just ignored. For example, the `wait` option is not really applied:
expect(driver.$(selector)).toBeDisplayed({ wait: 10_000 });

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions