@vitest/browser 3.0.0-beta.3 → 3.0.0
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 +36 -0
- package/dist/client/.vite/manifest.json +6 -6
- package/dist/client/__vitest__/assets/index-DnuP8DQO.js +52 -0
- package/dist/client/__vitest__/assets/index-GEF0wBOB.css +1 -0
- package/dist/client/__vitest__/index.html +2 -2
- package/dist/client/__vitest_browser__/{orchestrator-vOivV83Y.js → orchestrator-Cv-bzUFk.js} +1 -1
- package/dist/client/__vitest_browser__/{tester-CDBn6hqf.js → tester-B8eJg1-s.js} +75 -61
- package/dist/client/__vitest_browser__/{utils-Owv5OOOf.js → utils-CaCTRFti.js} +2 -0
- package/dist/client/esm-client-injector.js +1 -0
- package/dist/client/orchestrator.html +2 -2
- package/dist/client/tester/tester.html +2 -2
- package/dist/client.js +4 -3
- package/dist/context.js +22 -1
- package/dist/{index-VFFcOojA.js → index-Dos_sf7B.js} +9 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.js +75 -38
- package/dist/locators/index.d.ts +3 -0
- package/dist/locators/index.js +1 -1
- package/dist/locators/playwright.js +1 -1
- package/dist/locators/preview.js +1 -1
- package/dist/locators/webdriverio.js +1 -1
- package/dist/providers.js +1 -1
- package/dist/{webdriver-dkCg9pjp.js → webdriver-kh_HHy0p.js} +4 -0
- package/jest-dom.d.ts +4 -4
- package/package.json +10 -10
- package/providers/playwright.d.ts +2 -1
- package/providers/webdriverio.d.ts +2 -1
- package/dist/client/__vitest__/assets/index-D1v_Nqq1.css +0 -1
- package/dist/client/__vitest__/assets/index-JmEkKNR0.js +0 -52
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-
|
|
3
|
-
"file": "__vitest_browser__/utils-
|
|
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-
|
|
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-
|
|
12
|
+
"_utils-CaCTRFti.js"
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"tester/tester.html": {
|
|
16
|
-
"file": "__vitest_browser__/tester-
|
|
16
|
+
"file": "__vitest_browser__/tester-B8eJg1-s.js",
|
|
17
17
|
"name": "tester",
|
|
18
18
|
"src": "tester/tester.html",
|
|
19
19
|
"isEntry": true,
|
|
20
20
|
"imports": [
|
|
21
|
-
"_utils-
|
|
21
|
+
"_utils-CaCTRFti.js"
|
|
22
22
|
]
|
|
23
23
|
}
|
|
24
24
|
}
|