Skip to content

add waitForElement support #3

@patrickhulce

Description

@patrickhulce

Puppeteer has its own set of waitForSelector methods so this requires some thought. My inclination is to just better document how to do the same thing with puppeteer than match exact API

Proposals

// Use puppeteer but expose dom-testing-library globally
await state.page.waitFor(() => __dom_testing_library__.queryByTestId('foo'), {polling: 'mutation'})

// Tell people to stick with `wait`
const {queries, wait} = require('pptr-testing-library')
await wait(() => queries.getByTestId($document, 'foo'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions