@vitest/browser 3.0.9 → 3.1.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 +22 -0
- package/dist/client/.vite/manifest.json +1 -1
- package/dist/client/__vitest__/assets/{index-CsZqQx26.js → index-C3wX9Cb1.js} +1 -1
- package/dist/client/__vitest__/index.html +1 -1
- package/dist/client/__vitest_browser__/{tester-lo_P6U-u.js → tester-DRF-LncV.js} +1112 -324
- package/dist/client/tester/tester.html +1 -1
- package/dist/client.js +91 -105
- package/dist/context.js +374 -390
- package/dist/index-VvsEiykv.js +327 -0
- package/dist/index.js +1914 -1885
- package/dist/locators/index.d.ts +3 -0
- package/dist/locators/index.js +2 -2
- package/dist/locators/playwright.js +99 -108
- package/dist/locators/preview.js +71 -78
- package/dist/locators/webdriverio.js +135 -138
- package/dist/providers.js +34 -37
- package/dist/{public-utils-J4vwTaki.js → public-utils-4WiYB3_6.js} +38 -40
- package/dist/state.js +170 -1
- package/dist/utils.js +1 -1
- package/dist/webdriver-BP2w_ajA.js +271 -0
- package/package.json +8 -8
- package/dist/index-DrTP5i7N.js +0 -195
- package/dist/utils-VCysLhWp.js +0 -115
- package/dist/webdriver-C5-VI7VH.js +0 -275
package/context.d.ts
CHANGED
|
@@ -452,6 +452,21 @@ export interface Locator extends LocatorSelectors {
|
|
|
452
452
|
* @see {@link https://vitest.dev/guide/browser/locators#last}
|
|
453
453
|
*/
|
|
454
454
|
last(): Locator
|
|
455
|
+
/**
|
|
456
|
+
* Returns a locator that matches both the current locator and the provided locator.
|
|
457
|
+
* @see {@link https://vitest.dev/guide/browser/locators#and}
|
|
458
|
+
*/
|
|
459
|
+
and(locator: Locator): Locator
|
|
460
|
+
/**
|
|
461
|
+
* Returns a locator that matches either the current locator or the provided locator.
|
|
462
|
+
* @see {@link https://vitest.dev/guide/browser/locators#or}
|
|
463
|
+
*/
|
|
464
|
+
or(locator: Locator): Locator
|
|
465
|
+
/**
|
|
466
|
+
* Narrows existing locator according to the options.
|
|
467
|
+
* @see {@link https://vitest.dev/guide/browser/locators#filter}
|
|
468
|
+
*/
|
|
469
|
+
filter(options: LocatorOptions): Locator
|
|
455
470
|
}
|
|
456
471
|
|
|
457
472
|
export interface UserEventTabOptions {
|
|
@@ -506,6 +521,13 @@ export const server: {
|
|
|
506
521
|
config: SerializedConfig
|
|
507
522
|
}
|
|
508
523
|
|
|
524
|
+
export interface LocatorOptions {
|
|
525
|
+
hasText?: string | RegExp
|
|
526
|
+
hasNotText?: string | RegExp
|
|
527
|
+
has?: Locator
|
|
528
|
+
hasNot?: Locator
|
|
529
|
+
}
|
|
530
|
+
|
|
509
531
|
/**
|
|
510
532
|
* Handler for user interactions. The support is provided by the browser provider (`playwright` or `webdriverio`).
|
|
511
533
|
* If used with `preview` provider, fallbacks to simulated events via `@testing-library/user-event`.
|