@letsrunit/playwright 0.7.1 → 0.9.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/dist/index.d.ts +17 -2
- package/dist/index.js +357 -262
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/fuzzy-locator.ts +22 -9
- package/src/index.ts +1 -0
- package/src/scrub-html.ts +40 -0
- package/src/snapshot.ts +16 -2
package/dist/index.d.ts
CHANGED
|
@@ -63,7 +63,11 @@ interface PageInfo {
|
|
|
63
63
|
screenshot?: File;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
type SnapshotOptions = {
|
|
67
|
+
/** Strip utility-framework classes (Tailwind, Bootstrap, UnoCSS, Windi) from the captured HTML. */
|
|
68
|
+
dropUtilityClasses?: boolean;
|
|
69
|
+
};
|
|
70
|
+
declare function snapshot(page: Page, opts?: SnapshotOptions): Promise<Snapshot>;
|
|
67
71
|
|
|
68
72
|
declare function screenshotElement(page: Page, selector: string, options?: LocatorScreenshotOptions): Promise<File>;
|
|
69
73
|
declare function screenshot(page: Page, options?: PageScreenshotOptions): Promise<File>;
|
|
@@ -123,6 +127,9 @@ type ScrubHtmlOptions = {
|
|
|
123
127
|
replaceBrInHeadings?: boolean;
|
|
124
128
|
/** Limit lists to max items: -1 mean no limit. Default: -1 */
|
|
125
129
|
limitLists?: number;
|
|
130
|
+
/** Strip utility-framework classes (Tailwind, Bootstrap, UnoCSS, Windi) from class
|
|
131
|
+
* attributes. Removes the attribute entirely when all classes are stripped. Default: false */
|
|
132
|
+
dropUtilityClasses?: boolean;
|
|
126
133
|
};
|
|
127
134
|
declare function scrubHtml(page: {
|
|
128
135
|
html: string;
|
|
@@ -136,4 +143,12 @@ declare function realScrubHtml({ html, url }: {
|
|
|
136
143
|
url: string;
|
|
137
144
|
}, opts?: ScrubHtmlOptions): Promise<string>;
|
|
138
145
|
|
|
139
|
-
|
|
146
|
+
declare function unifiedHtmlDiff(old: {
|
|
147
|
+
html: string;
|
|
148
|
+
url: string;
|
|
149
|
+
} | Page, current: {
|
|
150
|
+
html: string;
|
|
151
|
+
url: string;
|
|
152
|
+
} | Page): Promise<string>;
|
|
153
|
+
|
|
154
|
+
export { type PageInfo, type ScrubHtmlOptions, type Snapshot, type SnapshotOptions, browse, createDateEngine, createFieldEngine, formatDate, formatDateForInput, formatHtml, fuzzyLocator, getMonthNames, realScrubHtml, screenshot, screenshotElement, scrollToCenter, scrubHtml, setFieldValue, snapshot, suppressInterferences, unifiedHtmlDiff, waitAfterInteraction, waitForAnimationsToFinish, waitForDomIdle, waitForIdle, waitForMeta, waitForUrlChange, waitUntilEnabled };
|