@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 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`.
@@ -13,7 +13,7 @@
13
13
  ]
14
14
  },
15
15
  "tester/tester.html": {
16
- "file": "__vitest_browser__/tester-lo_P6U-u.js",
16
+ "file": "__vitest_browser__/tester-DRF-LncV.js",
17
17
  "name": "tester",
18
18
  "src": "tester/tester.html",
19
19
  "isEntry": true,