@letsrunit/playwright 0.9.1 → 0.11.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 +20 -17
- package/dist/index.js +67046 -4
- package/dist/index.js.map +1 -1
- package/dist/re2-EDMAKNVO.node +0 -0
- package/package.json +2 -2
- package/src/index.ts +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Browser, BrowserContextOptions, Page, Locator, LocatorScreenshotOptions, PageScreenshotOptions } from '@playwright/test';
|
|
2
2
|
import { Scalar, Range } from '@letsrunit/utils';
|
|
3
|
+
import { MetascraperOptions } from 'metascraper';
|
|
3
4
|
|
|
4
5
|
declare function browse(browser: Browser, options?: BrowserContextOptions): Promise<Page>;
|
|
5
6
|
|
|
@@ -19,22 +20,6 @@ declare function formatHtml(page: string | Page): Promise<string>;
|
|
|
19
20
|
*/
|
|
20
21
|
declare function fuzzyLocator(page: Page, selector: string): Promise<Locator>;
|
|
21
22
|
|
|
22
|
-
declare const createDateEngine: () => {
|
|
23
|
-
query(root: Element | Document, body: string): Element | null;
|
|
24
|
-
queryAll(root: Element | Document, body: string): Element[];
|
|
25
|
-
_parseSelector(body: string): Date | null;
|
|
26
|
-
_matchesDate(el: Element, targetDate: Date, locale: string, body: string): {
|
|
27
|
-
matched: boolean;
|
|
28
|
-
type: "full" | "partial";
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
declare const createFieldEngine: () => {
|
|
33
|
-
_compileMatcher(body: string): (s: string | null | undefined) => boolean;
|
|
34
|
-
query(root: Element | Document, body: string): Element | null;
|
|
35
|
-
queryAll(root: Element | Document, body: string): Element[];
|
|
36
|
-
};
|
|
37
|
-
|
|
38
23
|
interface Snapshot {
|
|
39
24
|
url: string;
|
|
40
25
|
html: string;
|
|
@@ -63,6 +48,24 @@ interface PageInfo {
|
|
|
63
48
|
screenshot?: File;
|
|
64
49
|
}
|
|
65
50
|
|
|
51
|
+
declare function extractPageInfo(options: MetascraperOptions & Partial<Snapshot>): Promise<PageInfo>;
|
|
52
|
+
|
|
53
|
+
declare const createDateEngine: () => {
|
|
54
|
+
query(root: Element | Document, body: string): Element | null;
|
|
55
|
+
queryAll(root: Element | Document, body: string): Element[];
|
|
56
|
+
_parseSelector(body: string): Date | null;
|
|
57
|
+
_matchesDate(el: Element, targetDate: Date, locale: string, body: string): {
|
|
58
|
+
matched: boolean;
|
|
59
|
+
type: "full" | "partial";
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
declare const createFieldEngine: () => {
|
|
64
|
+
_compileMatcher(body: string): (s: string | null | undefined) => boolean;
|
|
65
|
+
query(root: Element | Document, body: string): Element | null;
|
|
66
|
+
queryAll(root: Element | Document, body: string): Element[];
|
|
67
|
+
};
|
|
68
|
+
|
|
66
69
|
type SnapshotOptions = {
|
|
67
70
|
/** Strip utility-framework classes (Tailwind, Bootstrap, UnoCSS, Windi) from the captured HTML. */
|
|
68
71
|
dropUtilityClasses?: boolean;
|
|
@@ -151,4 +154,4 @@ declare function unifiedHtmlDiff(old: {
|
|
|
151
154
|
url: string;
|
|
152
155
|
} | Page): Promise<string>;
|
|
153
156
|
|
|
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 };
|
|
157
|
+
export { type PageInfo, type ScrubHtmlOptions, type Snapshot, type SnapshotOptions, browse, createDateEngine, createFieldEngine, extractPageInfo, formatDate, formatDateForInput, formatHtml, fuzzyLocator, getMonthNames, realScrubHtml, screenshot, screenshotElement, scrollToCenter, scrubHtml, setFieldValue, snapshot, suppressInterferences, unifiedHtmlDiff, waitAfterInteraction, waitForAnimationsToFinish, waitForDomIdle, waitForIdle, waitForMeta, waitForUrlChange, waitUntilEnabled };
|