Skip to content

expect() matchers ignore a locator's own WaitOptions #84

Description

@BenSheridanEdwards

src/expect.ts LocatorExpectation.check builds options from the call site only, while Locator.waitFor/tap/setChecked merge this.options. A locator created with locator(driver, sel, { timeout: 60_000 }) gets 60s waits from interactions but 10s defaults from every expect(...) matcher; Locator.options is private so expect can't reach it. Expose the options (or a merged-wait helper) and use them in check(). Found during adversarial review (2026-07-02).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions