@vitest/browser 4.0.13 → 4.0.15
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 +19 -0
- package/dist/client/.vite/manifest.json +1 -1
- package/dist/client/__vitest__/assets/index-CfDzoXo3.js +57 -0
- package/dist/client/__vitest__/assets/index-DlhE0rqZ.css +1 -0
- package/dist/client/__vitest__/index.html +2 -2
- package/dist/client/__vitest_browser__/{tester-gw0ZBXrK.js → tester-CrGChK3u.js} +1 -0
- package/dist/client/tester/tester.html +1 -1
- package/dist/context.js +11 -2
- package/dist/expect-element.js +3 -3
- package/dist/{index-hFpxawnd.js → index-CEutxZap.js} +1 -1
- package/dist/index.js +30 -10
- package/dist/locators.js +1 -1
- package/dist/shared/screenshotMatcher/types.d.ts +8 -2
- package/package.json +6 -6
- package/dist/client/__vitest__/assets/index-TGTX-jRo.js +0 -57
- package/dist/client/__vitest__/assets/index-VPnwgb7M.css +0 -1
package/context.d.ts
CHANGED
|
@@ -753,17 +753,36 @@ export interface BrowserLocators {
|
|
|
753
753
|
export type PrettyDOMOptions = Omit<StringifyOptions, 'maxLength'>
|
|
754
754
|
|
|
755
755
|
export const utils: {
|
|
756
|
+
/**
|
|
757
|
+
* This is simillar to calling `page.elementLocator`, but it returns only
|
|
758
|
+
* locator selectors.
|
|
759
|
+
*/
|
|
756
760
|
getElementLocatorSelectors(element: Element): LocatorSelectors
|
|
761
|
+
/**
|
|
762
|
+
* Prints prettified HTML of an element.
|
|
763
|
+
*/
|
|
757
764
|
debug(
|
|
758
765
|
el?: Element | Locator | null | (Element | Locator)[],
|
|
759
766
|
maxLength?: number,
|
|
760
767
|
options?: PrettyDOMOptions,
|
|
761
768
|
): void
|
|
769
|
+
/**
|
|
770
|
+
* Returns prettified HTML of an element.
|
|
771
|
+
*/
|
|
762
772
|
prettyDOM(
|
|
763
773
|
dom?: Element | Locator | undefined | null,
|
|
764
774
|
maxLength?: number,
|
|
765
775
|
prettyFormatOptions?: PrettyDOMOptions,
|
|
766
776
|
): string
|
|
777
|
+
/**
|
|
778
|
+
* Configures default options of `prettyDOM` and `debug` functions.
|
|
779
|
+
* This will also affect `vitest-browser-{framework}` package.
|
|
780
|
+
* @experimental
|
|
781
|
+
*/
|
|
782
|
+
configurePrettyDOM(options: StringifyOptions): void
|
|
783
|
+
/**
|
|
784
|
+
* Creates "Cannot find element" error. Useful for custom locators.
|
|
785
|
+
*/
|
|
767
786
|
getElementError(selector: string, container?: Element): Error
|
|
768
787
|
}
|
|
769
788
|
|