@vitest/browser 3.0.0-beta.1 → 3.0.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/context.d.ts +17 -0
- package/dist/client/.vite/manifest.json +1 -1
- package/dist/client/__vitest__/assets/{index-DgyW9gjj.js → index-BgsOOCCp.js} +27 -27
- package/dist/client/__vitest__/assets/{index-DYFkX02J.css → index-D1v_Nqq1.css} +1 -1
- package/dist/client/__vitest__/index.html +2 -2
- package/dist/client/__vitest_browser__/{tester-D_NUSQO8.js → tester-BdwA4c5U.js} +3 -3
- package/dist/client/tester/tester.html +1 -1
- package/dist/context.js +85 -20
- package/dist/{index-CKtADM3n.js → index-CMAn5ZST.js} +7 -1
- package/dist/index.js +3 -3
- package/dist/locators/index.d.ts +2 -0
- package/dist/locators/index.js +1 -1
- package/dist/locators/playwright.js +1 -1
- package/dist/locators/preview.js +11 -34
- package/dist/locators/webdriverio.js +1 -1
- package/package.json +9 -9
package/context.d.ts
CHANGED
|
@@ -302,6 +302,23 @@ interface LocatorSelectors {
|
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
export interface Locator extends LocatorSelectors {
|
|
305
|
+
/**
|
|
306
|
+
* Selector string that will be used to locate the element by the browser provider.
|
|
307
|
+
* You can use this string in the commands API:
|
|
308
|
+
* ```ts
|
|
309
|
+
* // playwright
|
|
310
|
+
* function test({ selector, iframe }) {
|
|
311
|
+
* await iframe.locator(selector).click()
|
|
312
|
+
* }
|
|
313
|
+
* // webdriverio
|
|
314
|
+
* function test({ selector, browser }) {
|
|
315
|
+
* await browser.$(selector).click()
|
|
316
|
+
* }
|
|
317
|
+
* ```
|
|
318
|
+
* @see {@link https://vitest.dev/guide/browser/locators#selector}
|
|
319
|
+
*/
|
|
320
|
+
readonly selector: string
|
|
321
|
+
|
|
305
322
|
/**
|
|
306
323
|
* Click on an element. You can use the options to set the cursor position.
|
|
307
324
|
* @see {@link https://vitest.dev/guide/browser/interactivity-api#userevent-click}
|