| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -401,7 +401,7 @@ However, Vitest also provides packages to render components for several popular | |||
| 401 | 401 | ||
| 402 | 402 | If your framework is not represented, feel free to create your own package - it is a simple wrapper around the framework renderer and `page.elementLocator` API. We will add a link to it on this page. Make sure it has a name starting with `vitest-browser-`. | |
| 403 | 403 | ||
| 404 | - Besides rendering components and locating elements, you will also need to make assertions. Vitest bundles the [`@testing-library/jest-dom`](https://github.com/testing-library/jest-dom) library to provide a wide range of DOM assertions out of the box. Read more at the [Assertions API](/guide/browser/assertion-api). | ||
| 404 | + Besides rendering components and locating elements, you will also need to make assertions. Vitest forks the [`@testing-library/jest-dom`](https://github.com/testing-library/jest-dom) library to provide a wide range of DOM assertions out of the box. Read more at the [Assertions API](/guide/browser/assertion-api). | ||
| 405 | 405 | ||
| 406 | 406 | ```ts | |
| 407 | 407 | import { expect } from 'vitest' | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,9 +5,13 @@ outline: [2, 3] | |||
| 5 | 5 | ||
| 6 | 6 | # Locators | |
| 7 | 7 | ||
| 8 | - A locator is a representation of an element or a number of elements. Every locator is defined by a string called a selector. Vitest abstracts this selector by providing convenient methods that generate those selectors behind the scenes. | ||
| 8 | + A locator is a representation of an element or a number of elements. Every locator is defined by a string called a selector. Vitest abstracts this selector by providing convenient methods that generate them behind the scenes. | ||
| 9 | 9 | ||
| 10 | - The locator API uses a fork of [Playwright's locators](https://playwright.dev/docs/api/class-locator) called [Ivya](https://npmjs.com/ivya). However, Vitest provides this API to every [provider](/guide/browser/config.html#browser-provider). | ||
| 10 | + The locator API uses a fork of [Playwright's locators](https://playwright.dev/docs/api/class-locator) called [Ivya](https://npmjs.com/ivya). However, Vitest provides this API to every [provider](/guide/browser/config.html#browser-provider), not just playwright. | ||
| 11 | + | ||
| 12 | + ::: tip | ||
| 13 | + This page covers API usage. To better understand locators and their usage, read [Playwright's "Locators" documentation](https://playwright.dev/docs/locators). | ||
| 14 | + ::: | ||
| 11 | 15 | ||
| 12 | 16 | ## getByRole | |
| 13 | 17 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,6 @@ | |||
| 1 | - import type { SerializedConfig } from 'vitest' | ||
| 1 | + import { SerializedConfig } from 'vitest' | ||
| 2 | 2 | import { ARIARole } from './aria-role.js' | |
| 3 | + import {} from './matchers.js' | ||
| 3 | 4 | ||
| 4 | 5 | export type BufferEncoding = | |
| 5 | 6 | | 'ascii' | |
| Back | FazBrowse Home | New Git URL |
0 commit comments