@vitest/browser 3.0.5 → 3.0.6
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 +8 -8
- package/dist/client/.vite/manifest.json +2 -2
- package/dist/client/__vitest__/assets/index-BX_iUIjH.js +52 -0
- package/dist/client/__vitest__/index.html +2 -2
- package/dist/client/__vitest_browser__/{orchestrator-vOivV83Y.js → orchestrator-BR1Ueh0Q.js} +1 -0
- package/dist/client/__vitest_browser__/tester-oUsZBBvV.js +15478 -0
- package/dist/client/orchestrator.html +1 -1
- package/dist/client/tester/tester.html +1 -1
- package/dist/client.js +5 -5
- package/dist/context.js +2 -2
- package/dist/{index--cbQOwRJ.js → index-D-kNWeee.js} +2 -2
- package/dist/index.d.ts +5 -7
- package/dist/index.js +14 -11
- package/dist/locators/index.js +2 -2
- package/dist/locators/playwright.js +2 -2
- package/dist/locators/preview.js +2 -2
- package/dist/locators/webdriverio.js +2 -2
- package/dist/{public-utils-DldpEzVw.js → public-utils-J4vwTaki.js} +100 -102
- package/dist/state.js +1 -1
- package/dist/utils.js +1 -1
- package/jest-dom.d.ts +1 -2
- package/package.json +14 -14
- package/dist/client/__vitest__/assets/index-CkLwJNkP.js +0 -52
- package/dist/client/__vitest_browser__/tester-BbJOQDQr.js +0 -13875
- /package/dist/client/__vitest__/assets/{index-D-vGI2PU.css → index-CV9H8iCm.css} +0 -0
package/context.d.ts
CHANGED
|
@@ -288,38 +288,38 @@ interface LocatorSelectors {
|
|
|
288
288
|
* Creates a way to locate an element by its [ARIA role](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles), [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes) and [accessible name](https://developer.mozilla.org/en-US/docs/Glossary/Accessible_name).
|
|
289
289
|
* @see {@link https://vitest.dev/guide/browser/locators#getbyrole}
|
|
290
290
|
*/
|
|
291
|
-
getByRole(role: ARIARole | ({} & string), options?: LocatorByRoleOptions)
|
|
291
|
+
getByRole: (role: ARIARole | ({} & string), options?: LocatorByRoleOptions) => Locator
|
|
292
292
|
/**
|
|
293
293
|
* @see {@link https://vitest.dev/guide/browser/locators#getbylabeltext}
|
|
294
294
|
*/
|
|
295
|
-
getByLabelText(text: string | RegExp, options?: LocatorOptions)
|
|
295
|
+
getByLabelText: (text: string | RegExp, options?: LocatorOptions) => Locator
|
|
296
296
|
/**
|
|
297
297
|
* Creates a locator capable of finding an element with an `alt` attribute that matches the text. Unlike testing-library's implementation, Vitest will match any element that has an `alt` attribute.
|
|
298
298
|
* @see {@link https://vitest.dev/guide/browser/locators#getbyalttext}
|
|
299
299
|
*/
|
|
300
|
-
getByAltText(text: string | RegExp, options?: LocatorOptions)
|
|
300
|
+
getByAltText: (text: string | RegExp, options?: LocatorOptions) => Locator
|
|
301
301
|
/**
|
|
302
302
|
* Creates a locator capable of finding an element that has the specified placeholder text. Vitest will match any element that has a matching `placeholder` attribute, not just `input`.
|
|
303
303
|
* @see {@link https://vitest.dev/guide/browser/locators#getbyplaceholder}
|
|
304
304
|
*/
|
|
305
|
-
getByPlaceholder(text: string | RegExp, options?: LocatorOptions)
|
|
305
|
+
getByPlaceholder: (text: string | RegExp, options?: LocatorOptions) => Locator
|
|
306
306
|
/**
|
|
307
307
|
* Creates a locator capable of finding an element that contains the specified text. The text will be matched against TextNode's [`nodeValue`](https://developer.mozilla.org/en-US/docs/Web/API/Node/nodeValue) or input's value if the type is `button` or `reset`.
|
|
308
308
|
* Matching by text always normalizes whitespace, even with exact match.
|
|
309
309
|
* For example, it turns multiple spaces into one, turns line breaks into spaces and ignores leading and trailing whitespace.
|
|
310
310
|
* @see {@link https://vitest.dev/guide/browser/locators#getbytext}
|
|
311
311
|
*/
|
|
312
|
-
getByText(text: string | RegExp, options?: LocatorOptions)
|
|
312
|
+
getByText: (text: string | RegExp, options?: LocatorOptions) => Locator
|
|
313
313
|
/**
|
|
314
314
|
* Creates a locator capable of finding an element that has the specified `title` attribute. Unlike testing-library's `getByTitle`, Vitest cannot find `title` elements within an SVG.
|
|
315
315
|
* @see {@link https://vitest.dev/guide/browser/locators#getbytitle}
|
|
316
316
|
*/
|
|
317
|
-
getByTitle(text: string | RegExp, options?: LocatorOptions)
|
|
317
|
+
getByTitle: (text: string | RegExp, options?: LocatorOptions) => Locator
|
|
318
318
|
/**
|
|
319
319
|
* Creates a locator capable of finding an element that matches the specified test id attribute. You can configure the attribute name with [`browser.locators.testIdAttribute`](/config/#browser-locators-testidattribute).
|
|
320
320
|
* @see {@link https://vitest.dev/guide/browser/locators#getbytestid}
|
|
321
321
|
*/
|
|
322
|
-
getByTestId(text: string | RegExp)
|
|
322
|
+
getByTestId: (text: string | RegExp) => Locator
|
|
323
323
|
}
|
|
324
324
|
|
|
325
325
|
export interface Locator extends LocatorSelectors {
|
|
@@ -391,7 +391,7 @@ export interface Locator extends LocatorSelectors {
|
|
|
391
391
|
* Change a file input element to have the specified files. Uses provider's API under the hood.
|
|
392
392
|
* @see {@link https://vitest.dev/guide/browser/interactivity-api#userevent-upload}
|
|
393
393
|
*/
|
|
394
|
-
upload
|
|
394
|
+
upload(files: File | File[] | string | string[]): Promise<void>
|
|
395
395
|
|
|
396
396
|
/**
|
|
397
397
|
* Make a screenshot of an element matching the locator.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"name": "utils"
|
|
5
5
|
},
|
|
6
6
|
"orchestrator.html": {
|
|
7
|
-
"file": "__vitest_browser__/orchestrator-
|
|
7
|
+
"file": "__vitest_browser__/orchestrator-BR1Ueh0Q.js",
|
|
8
8
|
"name": "orchestrator",
|
|
9
9
|
"src": "orchestrator.html",
|
|
10
10
|
"isEntry": true,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"tester/tester.html": {
|
|
16
|
-
"file": "__vitest_browser__/tester-
|
|
16
|
+
"file": "__vitest_browser__/tester-oUsZBBvV.js",
|
|
17
17
|
"name": "tester",
|
|
18
18
|
"src": "tester/tester.html",
|
|
19
19
|
"isEntry": true,
|