@vitest/browser 3.0.0-beta.2 → 3.0.0-beta.4

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
@@ -172,6 +172,27 @@ export interface UserEvent {
172
172
  * @see {@link https://testing-library.com/docs/user-event/utility#upload} testing-library API
173
173
  */
174
174
  upload: (element: Element | Locator, files: File | File[] | string | string[]) => Promise<void>
175
+ /**
176
+ * Copies the selected content.
177
+ * @see {@link https://playwright.dev/docs/api/class-keyboard} Playwright API
178
+ * @see {@link https://webdriver.io/docs/api/browser/keys//} WebdriverIO API
179
+ * @see {@link https://testing-library.com/docs/user-event/clipboard#copy} testing-library API
180
+ */
181
+ copy: () => Promise<void>
182
+ /**
183
+ * Cuts the selected content.
184
+ * @see {@link https://playwright.dev/docs/api/class-keyboard} Playwright API
185
+ * @see {@link https://webdriver.io/docs/api/browser/keys//} WebdriverIO API
186
+ * @see {@link https://testing-library.com/docs/user-event/clipboard#cut} testing-library API
187
+ */
188
+ cut: () => Promise<void>
189
+ /**
190
+ * Pastes the copied or cut content.
191
+ * @see {@link https://playwright.dev/docs/api/class-keyboard} Playwright API
192
+ * @see {@link https://webdriver.io/docs/api/browser/keys//} WebdriverIO API
193
+ * @see {@link https://testing-library.com/docs/user-event/clipboard#paste} testing-library API
194
+ */
195
+ paste: () => Promise<void>
175
196
  /**
176
197
  * Fills an input element with text. This will remove any existing text in the input before typing the new text.
177
198
  * Uses provider's API under the hood.
@@ -414,6 +435,21 @@ export interface Locator extends LocatorSelectors {
414
435
  * @see {@link https://vitest.dev/guide/browser/locators#all}
415
436
  */
416
437
  all(): Locator[]
438
+ /**
439
+ * Returns a locator for the nth element matching the selector.
440
+ * @see {@link https://vitest.dev/guide/browser/locators#nth}
441
+ */
442
+ nth(index: number): Locator
443
+ /**
444
+ * Returns a locator for the first element matching the selector.
445
+ * @see {@link https://vitest.dev/guide/browser/locators#first}
446
+ */
447
+ first(): Locator
448
+ /**
449
+ * Returns a locator for the last element matching the selector.
450
+ * @see {@link https://vitest.dev/guide/browser/locators#last}
451
+ */
452
+ last(): Locator
417
453
  }
418
454
 
419
455
  export interface UserEventTabOptions {
@@ -1,24 +1,24 @@
1
1
  {
2
- "_utils-Owv5OOOf.js": {
3
- "file": "__vitest_browser__/utils-Owv5OOOf.js",
2
+ "_utils-CaCTRFti.js": {
3
+ "file": "__vitest_browser__/utils-CaCTRFti.js",
4
4
  "name": "utils"
5
5
  },
6
6
  "orchestrator.html": {
7
- "file": "__vitest_browser__/orchestrator-DnP17K36.js",
7
+ "file": "__vitest_browser__/orchestrator-Cv-bzUFk.js",
8
8
  "name": "orchestrator",
9
9
  "src": "orchestrator.html",
10
10
  "isEntry": true,
11
11
  "imports": [
12
- "_utils-Owv5OOOf.js"
12
+ "_utils-CaCTRFti.js"
13
13
  ]
14
14
  },
15
15
  "tester/tester.html": {
16
- "file": "__vitest_browser__/tester-BdwA4c5U.js",
16
+ "file": "__vitest_browser__/tester-DreAh6ar.js",
17
17
  "name": "tester",
18
18
  "src": "tester/tester.html",
19
19
  "isEntry": true,
20
20
  "imports": [
21
- "_utils-Owv5OOOf.js"
21
+ "_utils-CaCTRFti.js"
22
22
  ]
23
23
  }
24
24
  }