Tags: testing-library/playwright-testing-library
Tags
feat(fixture): support `Page` in `within` fixture (returns `Screen`) Support `Page` in addition to `Locator` in `within()` fixture. When a `Page` instance is passed to `within()`, a `Screen` instance will be returned which includes the entire `Page` API in addition to the query methods. ```ts test('within page', async ({ page }) => { // Passing `page` to `within` returns a `Screen` instance const screen = within(page) await screen.goto(/* ... */) const form = screen.queryByRole('form', {name: 'User'}) // Passing a `Locator` returns scoped queries const {queryByLabelText} = within(form) // ... }) ```
fix(fixture): throw correct error when `find*` query times out on vis… …ibility
refactor: derive configuration options type for Testing Library types
PreviousNext