@stablyai/playwright-test 0.1.10 → 0.2.1
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.cjs.map +1 -1
- package/dist/index.d.mts +11 -4
- package/dist/index.d.ts +11 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -5
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import \"@stablyai/playwright-base\";\
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import \"@stablyai/playwright-base\";\nimport {\n expect as playwrightExpect,\n test as playwrightTest,\n} from \"@stablyai/internal-playwright-test\";\n\n// not sure why this is required\nexport { defineStablyConfig } from \"@stablyai/internal-playwright-test\";\n\nimport {\n augmentBrowser,\n augmentBrowserContext,\n augmentPage,\n stablyPlaywrightMatchers,\n} from \"@stablyai/playwright-base\";\n\nexport { setApiKey } from \"@stablyai/playwright-base\";\n\nexport const test: typeof playwrightTest = playwrightTest.extend({\n browser: async ({ browser }, use) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n await use(augmentBrowser(browser as any) as any);\n },\n context: async ({ context }, use) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n await use(augmentBrowserContext(context as any) as any);\n },\n page: async ({ page }, use) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n await use(augmentPage(page as any) as any);\n },\n});\n\nexport const expect = playwrightExpect.extend(stablyPlaywrightMatchers);\n\nexport * from \"@stablyai/internal-playwright-test\";\n\ndeclare module \"@stablyai/internal-playwright-test\" {\n export type ScreenshotPromptOptions =\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n import(\"@stablyai/internal-playwright-test\").PageAssertionsToHaveScreenshotOptions;\n\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface LocatorAssertions {\n toMatchScreenshotPrompt(\n condition: string,\n options?: ScreenshotPromptOptions,\n ): Promise<void>;\n }\n\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface PageAssertions {\n toMatchScreenshotPrompt(\n condition: string,\n options?: ScreenshotPromptOptions,\n ): Promise<void>;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6BAAO;AACP,sCAGO;AAGP,IAAAA,mCAAmC;AAEnC,IAAAC,0BAKO;AAEP,IAAAA,0BAA0B;AAmB1B,0BAAc,+CAnCd;AAkBO,IAAM,OAA8B,gCAAAC,KAAe,OAAO;AAAA,EAC/D,SAAS,OAAO,EAAE,QAAQ,GAAG,QAAQ;AAEnC,UAAM,QAAI,wCAAe,OAAc,CAAQ;AAAA,EACjD;AAAA,EACA,SAAS,OAAO,EAAE,QAAQ,GAAG,QAAQ;AAEnC,UAAM,QAAI,+CAAsB,OAAc,CAAQ;AAAA,EACxD;AAAA,EACA,MAAM,OAAO,EAAE,KAAK,GAAG,QAAQ;AAE7B,UAAM,QAAI,qCAAY,IAAW,CAAQ;AAAA,EAC3C;AACF,CAAC;AAEM,IAAM,SAAS,gCAAAC,OAAiB,OAAO,gDAAwB;","names":["import_internal_playwright_test","import_playwright_base","playwrightTest","playwrightExpect"]}
|
package/dist/index.d.mts
CHANGED
|
@@ -11,10 +11,17 @@ declare const expect: _stablyai_internal_playwright_test.Expect<{
|
|
|
11
11
|
readonly toMatchScreenshotPrompt: (this: {
|
|
12
12
|
isNot: boolean;
|
|
13
13
|
message?: () => string;
|
|
14
|
-
}, received: _stablyai_internal_playwright_test.Page | _stablyai_internal_playwright_test.Locator, condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions) => Promise<
|
|
15
|
-
pass: boolean;
|
|
16
|
-
message: () => string;
|
|
17
|
-
}>;
|
|
14
|
+
}, received: _stablyai_internal_playwright_test.Page | _stablyai_internal_playwright_test.Locator, condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions) => Promise<_stablyai_internal_playwright_test.MatcherReturnType>;
|
|
18
15
|
}>;
|
|
19
16
|
|
|
17
|
+
declare module "@stablyai/internal-playwright-test" {
|
|
18
|
+
type ScreenshotPromptOptions = _stablyai_internal_playwright_test.PageAssertionsToHaveScreenshotOptions;
|
|
19
|
+
interface LocatorAssertions {
|
|
20
|
+
toMatchScreenshotPrompt(condition: string, options?: ScreenshotPromptOptions): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
interface PageAssertions {
|
|
23
|
+
toMatchScreenshotPrompt(condition: string, options?: ScreenshotPromptOptions): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
export { expect, test };
|
package/dist/index.d.ts
CHANGED
|
@@ -11,10 +11,17 @@ declare const expect: _stablyai_internal_playwright_test.Expect<{
|
|
|
11
11
|
readonly toMatchScreenshotPrompt: (this: {
|
|
12
12
|
isNot: boolean;
|
|
13
13
|
message?: () => string;
|
|
14
|
-
}, received: _stablyai_internal_playwright_test.Page | _stablyai_internal_playwright_test.Locator, condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions) => Promise<
|
|
15
|
-
pass: boolean;
|
|
16
|
-
message: () => string;
|
|
17
|
-
}>;
|
|
14
|
+
}, received: _stablyai_internal_playwright_test.Page | _stablyai_internal_playwright_test.Locator, condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions) => Promise<_stablyai_internal_playwright_test.MatcherReturnType>;
|
|
18
15
|
}>;
|
|
19
16
|
|
|
17
|
+
declare module "@stablyai/internal-playwright-test" {
|
|
18
|
+
type ScreenshotPromptOptions = _stablyai_internal_playwright_test.PageAssertionsToHaveScreenshotOptions;
|
|
19
|
+
interface LocatorAssertions {
|
|
20
|
+
toMatchScreenshotPrompt(condition: string, options?: ScreenshotPromptOptions): Promise<void>;
|
|
21
|
+
}
|
|
22
|
+
interface PageAssertions {
|
|
23
|
+
toMatchScreenshotPrompt(condition: string, options?: ScreenshotPromptOptions): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
20
27
|
export { expect, test };
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import \"@stablyai/playwright-base\";\
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import \"@stablyai/playwright-base\";\nimport {\n expect as playwrightExpect,\n test as playwrightTest,\n} from \"@stablyai/internal-playwright-test\";\n\n// not sure why this is required\nexport { defineStablyConfig } from \"@stablyai/internal-playwright-test\";\n\nimport {\n augmentBrowser,\n augmentBrowserContext,\n augmentPage,\n stablyPlaywrightMatchers,\n} from \"@stablyai/playwright-base\";\n\nexport { setApiKey } from \"@stablyai/playwright-base\";\n\nexport const test: typeof playwrightTest = playwrightTest.extend({\n browser: async ({ browser }, use) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n await use(augmentBrowser(browser as any) as any);\n },\n context: async ({ context }, use) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n await use(augmentBrowserContext(context as any) as any);\n },\n page: async ({ page }, use) => {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n await use(augmentPage(page as any) as any);\n },\n});\n\nexport const expect = playwrightExpect.extend(stablyPlaywrightMatchers);\n\nexport * from \"@stablyai/internal-playwright-test\";\n\ndeclare module \"@stablyai/internal-playwright-test\" {\n export type ScreenshotPromptOptions =\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n import(\"@stablyai/internal-playwright-test\").PageAssertionsToHaveScreenshotOptions;\n\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface LocatorAssertions {\n toMatchScreenshotPrompt(\n condition: string,\n options?: ScreenshotPromptOptions,\n ): Promise<void>;\n }\n\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface PageAssertions {\n toMatchScreenshotPrompt(\n condition: string,\n options?: ScreenshotPromptOptions,\n ): Promise<void>;\n }\n}\n"],"mappings":";AAAA,OAAO;AACP;AAAA,EACE,UAAU;AAAA,EACV,QAAQ;AAAA,OACH;AAGP,SAAS,0BAA0B;AAEnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB;AAmB1B,cAAc;AAjBP,IAAM,OAA8B,eAAe,OAAO;AAAA,EAC/D,SAAS,OAAO,EAAE,QAAQ,GAAG,QAAQ;AAEnC,UAAM,IAAI,eAAe,OAAc,CAAQ;AAAA,EACjD;AAAA,EACA,SAAS,OAAO,EAAE,QAAQ,GAAG,QAAQ;AAEnC,UAAM,IAAI,sBAAsB,OAAc,CAAQ;AAAA,EACxD;AAAA,EACA,MAAM,OAAO,EAAE,KAAK,GAAG,QAAQ;AAE7B,UAAM,IAAI,YAAY,IAAW,CAAQ;AAAA,EAC3C;AACF,CAAC;AAEM,IAAM,SAAS,iBAAiB,OAAO,wBAAwB;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stablyai/playwright-test",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "Playwright Test wrapper with Stably AI matchers",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -19,11 +19,14 @@
|
|
|
19
19
|
"cli.js"
|
|
20
20
|
],
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@stablyai/internal-playwright-test": "0.1.
|
|
23
|
-
"@stablyai/playwright": "0.1
|
|
24
|
-
"@stablyai/playwright-base": "0.1
|
|
22
|
+
"@stablyai/internal-playwright-test": "0.1.18",
|
|
23
|
+
"@stablyai/playwright": "0.2.1",
|
|
24
|
+
"@stablyai/playwright-base": "0.2.1"
|
|
25
25
|
},
|
|
26
26
|
"scripts": {
|
|
27
|
-
"build": "tsup
|
|
27
|
+
"build": "tsup",
|
|
28
|
+
"build:watch": "tsup --watch",
|
|
29
|
+
"test": "vitest",
|
|
30
|
+
"test:e2e": "playwright test"
|
|
28
31
|
}
|
|
29
32
|
}
|