@vitest/browser 2.1.0-beta.6 → 2.1.0-beta.7
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 +11 -0
- package/dist/client/.vite/manifest.json +6 -6
- package/dist/client/__vitest__/assets/index-CEU6kzsk.js +52 -0
- package/dist/client/__vitest__/index.html +1 -1
- package/dist/client/__vitest_browser__/{orchestrator-CoMoQEYq.js → orchestrator-qtq9EW1J.js} +243 -91
- package/dist/client/__vitest_browser__/preload-helper-D-WYp1PK.js +317 -0
- package/dist/client/__vitest_browser__/{tester-C7y_vb57.js → tester-Bm6k0JOu.js} +585 -371
- 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/context.js +3 -0
- package/dist/{index-DcU_z8HM.js → index-Cgg35wOd.js} +19 -0
- package/dist/index.d.ts +7 -13
- package/dist/index.js +287 -263
- package/dist/locators/index.d.ts +1 -0
- package/dist/locators/index.js +1 -1
- package/dist/locators/playwright.js +1 -1
- package/dist/locators/preview.js +4 -1
- package/dist/locators/webdriverio.js +1 -1
- package/dist/providers.js +1 -1
- package/dist/state.js +1 -1
- package/dist/{webdriver-BdVqnfdE.js → webdriver-Cv9wga63.js} +10 -1
- package/package.json +10 -7
- package/dist/client/__vitest__/assets/index-D7jfm8wn.js +0 -52
- package/dist/client/__vitest_browser__/preload-helper-YsBSwBkS.js +0 -310
package/context.d.ts
CHANGED
|
@@ -160,6 +160,12 @@ export interface UserEvent {
|
|
|
160
160
|
* @see {@link https://testing-library.com/docs/user-event/convenience/#hover} testing-library API
|
|
161
161
|
*/
|
|
162
162
|
unhover: (element: Element | Locator, options?: UserEventHoverOptions) => Promise<void>
|
|
163
|
+
/**
|
|
164
|
+
* Change a file input element to have the specified files. Uses provider's API under the hood.
|
|
165
|
+
* @see {@link https://playwright.dev/docs/api/class-locator#locator-set-input-files} Playwright API
|
|
166
|
+
* @see {@link https://testing-library.com/docs/user-event/utility#upload} testing-library API
|
|
167
|
+
*/
|
|
168
|
+
upload: (element: Element | Locator, files: File | File[] | string | string[]) => Promise<void>
|
|
163
169
|
/**
|
|
164
170
|
* Fills an input element with text. This will remove any existing text in the input before typing the new text.
|
|
165
171
|
* Uses provider's API under the hood.
|
|
@@ -337,6 +343,11 @@ export interface Locator extends LocatorSelectors {
|
|
|
337
343
|
values: HTMLElement | HTMLElement[] | Locator | Locator[] | string | string[],
|
|
338
344
|
options?: UserEventSelectOptions,
|
|
339
345
|
): Promise<void>
|
|
346
|
+
/**
|
|
347
|
+
* Change a file input element to have the specified files. Uses provider's API under the hood.
|
|
348
|
+
* @see {@link https://vitest.dev/guide/browser/interactivity-api#userevent-upload}
|
|
349
|
+
*/
|
|
350
|
+
upload: (files: File | File[] | string | string[]) => Promise<void>
|
|
340
351
|
|
|
341
352
|
/**
|
|
342
353
|
* Make a screenshot of an element matching the locator.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_preload-helper-
|
|
3
|
-
"file": "__vitest_browser__/preload-helper-
|
|
2
|
+
"_preload-helper-D-WYp1PK.js": {
|
|
3
|
+
"file": "__vitest_browser__/preload-helper-D-WYp1PK.js",
|
|
4
4
|
"name": "preload-helper"
|
|
5
5
|
},
|
|
6
6
|
"orchestrator.html": {
|
|
7
|
-
"file": "__vitest_browser__/orchestrator-
|
|
7
|
+
"file": "__vitest_browser__/orchestrator-qtq9EW1J.js",
|
|
8
8
|
"name": "orchestrator",
|
|
9
9
|
"src": "orchestrator.html",
|
|
10
10
|
"isEntry": true,
|
|
11
11
|
"imports": [
|
|
12
|
-
"_preload-helper-
|
|
12
|
+
"_preload-helper-D-WYp1PK.js"
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"tester/tester.html": {
|
|
16
|
-
"file": "__vitest_browser__/tester-
|
|
16
|
+
"file": "__vitest_browser__/tester-Bm6k0JOu.js",
|
|
17
17
|
"name": "tester",
|
|
18
18
|
"src": "tester/tester.html",
|
|
19
19
|
"isEntry": true,
|
|
20
20
|
"imports": [
|
|
21
|
-
"_preload-helper-
|
|
21
|
+
"_preload-helper-D-WYp1PK.js"
|
|
22
22
|
]
|
|
23
23
|
}
|
|
24
24
|
}
|