@stablyai/playwright-test 2.0.16 → 2.1.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-Tn_eFdjz.mjs → index-CI2c83oz.mjs} +1435 -1561
- package/dist/index-CI2c83oz.mjs.map +1 -0
- package/dist/{index-Covr1y-4.cjs → index-Dg_zRYuy.cjs} +1439 -1565
- package/dist/index-Dg_zRYuy.cjs.map +1 -0
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +41 -4
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +41 -4
- package/dist/index.d.mts.map +1 -1
- package/dist/index.d.ts +41 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/reporter.cjs +2 -2
- package/dist/reporter.mjs +2 -2
- package/package.json +3 -3
- package/dist/index-Covr1y-4.cjs.map +0 -1
- package/dist/index-Tn_eFdjz.mjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var require$$0$1 = require('path');
|
|
|
4
4
|
var require$$7 = require('url');
|
|
5
5
|
var test$1 = require('@playwright/test');
|
|
6
6
|
var playwrightBase = require('@stablyai/playwright-base');
|
|
7
|
-
var index = require('./index-
|
|
7
|
+
var index = require('./index-Dg_zRYuy.cjs');
|
|
8
8
|
require('node:buffer');
|
|
9
9
|
require('node:path');
|
|
10
10
|
require('node:child_process');
|
|
@@ -62,7 +62,7 @@ Object.defineProperty(exports, "setApiKey", {
|
|
|
62
62
|
enumerable: true,
|
|
63
63
|
get: function () { return playwrightBase.setApiKey; }
|
|
64
64
|
});
|
|
65
|
-
exports.stablyReporter = index.
|
|
65
|
+
exports.stablyReporter = index.Sa;
|
|
66
66
|
exports.defineConfig = defineConfig;
|
|
67
67
|
exports.expect = expect;
|
|
68
68
|
exports.getDirname = getDirname;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { dirname } from \"path\";\nimport { fileURLToPath } from \"url\";\n\nimport type { BrowserContext } from \"@playwright/test\";\nimport {\n defineConfig as playwrightDefineConfig,\n expect as playwrightExpect,\n test as playwrightTest,\n} from \"@playwright/test\";\nimport \"@stablyai/playwright-base\";\n\nimport type { Agent } from \"@stablyai/playwright-base\";\nimport {\n augmentBrowser,\n augmentBrowserContext,\n augmentPage,\n stablyPlaywrightMatchers,\n} from \"@stablyai/playwright-base\";\n\nimport type { StablyNotificationConfig } from \"@stablyai/playwright-reporter\";\n\nexport { stablyReporter } from \"@stablyai/playwright-reporter\";\nexport type {\n StablyReporterOptions,\n ProjectNotificationConfig,\n NotificationResultPolicy,\n StablyEmailNotificationConfig,\n StablySlackNotificationConfig,\n StablyNotificationConfig,\n} from \"@stablyai/playwright-reporter\";\nexport { Agent, setApiKey } from \"@stablyai/playwright-base\";\n\n/**\n * Get the directory name from an import.meta.url.\n * This is the ESM equivalent of __dirname.\n *\n * @example\n * ```ts\n * import { getDirname } from '@stablyai/playwright-test';\n * const __dirname = getDirname(import.meta.url);\n *\n * // Use in tests for file paths\n * await page.setInputFiles('input', path.join(__dirname, 'fixtures', 'file.pdf'));\n * ```\n */\nexport function getDirname(importMetaUrl: string): string {\n return dirname(fileURLToPath(importMetaUrl));\n}\n\n/**\n * Get the filename from an import.meta.url.\n * This is the ESM equivalent of __filename.\n *\n * @example\n * ```ts\n * import { getFilename } from '@stablyai/playwright-test';\n * const __filename = getFilename(import.meta.url);\n * ```\n */\nexport function getFilename(importMetaUrl: string): string {\n return fileURLToPath(importMetaUrl);\n}\n\nexport const test: typeof playwrightTest = playwrightTest.extend<{\n agent: Agent;\n}>({\n agent: async (\n { context }: { context: BrowserContext },\n use: (agent: Agent) => Promise<void>,\n ) => {\n // Create a default agent from the default context\n const agent = context.newAgent();\n await use(agent);\n },\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 \"@playwright/test\";\n\nexport type StablyProjectConfig = {\n notifications?: StablyNotificationConfig;\n};\n\n/**\n * Stably-enhanced defineConfig with typed support for stably notification configuration in projects.\n * The `stably` property on projects is available via module augmentation of `@playwright/test`.\n *\n * @example\n * ```ts\n * import { defineConfig, stablyReporter } from \"@stablyai/playwright-test\";\n *\n * export default defineConfig({\n * reporter: [stablyReporter({ apiKey: \"...\" })],\n * projects: [\n * {\n * name: \"smoke\",\n * stably: {\n * notifications: {\n * slack: { channelName: \"#alerts\", notifyOnResult: \"failures-only\" },\n * },\n * },\n * },\n * ],\n * });\n * ```\n */\nexport const defineConfig = playwrightDefineConfig;\n\ndeclare module \"@playwright/test\" {\n
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["import { dirname } from \"path\";\nimport { fileURLToPath } from \"url\";\n\nimport type { BrowserContext } from \"@playwright/test\";\nimport {\n defineConfig as playwrightDefineConfig,\n expect as playwrightExpect,\n test as playwrightTest,\n} from \"@playwright/test\";\nimport \"@stablyai/playwright-base\";\n\nimport type { Agent } from \"@stablyai/playwright-base\";\nimport {\n augmentBrowser,\n augmentBrowserContext,\n augmentPage,\n stablyPlaywrightMatchers,\n} from \"@stablyai/playwright-base\";\n\nimport type { StablyNotificationConfig } from \"@stablyai/playwright-reporter\";\n\nexport { stablyReporter } from \"@stablyai/playwright-reporter\";\nexport type {\n StablyReporterOptions,\n ProjectNotificationConfig,\n NotificationResultPolicy,\n StablyEmailNotificationConfig,\n StablySlackNotificationConfig,\n StablyNotificationConfig,\n} from \"@stablyai/playwright-reporter\";\nexport { Agent, setApiKey } from \"@stablyai/playwright-base\";\nexport type {\n AIModel,\n GetLocatorsByAIOptions,\n GetLocatorsByAIResult,\n ScreenshotPromptOptions,\n} from \"@stablyai/playwright-base\";\n\n/**\n * Get the directory name from an import.meta.url.\n * This is the ESM equivalent of __dirname.\n *\n * @example\n * ```ts\n * import { getDirname } from '@stablyai/playwright-test';\n * const __dirname = getDirname(import.meta.url);\n *\n * // Use in tests for file paths\n * await page.setInputFiles('input', path.join(__dirname, 'fixtures', 'file.pdf'));\n * ```\n */\nexport function getDirname(importMetaUrl: string): string {\n return dirname(fileURLToPath(importMetaUrl));\n}\n\n/**\n * Get the filename from an import.meta.url.\n * This is the ESM equivalent of __filename.\n *\n * @example\n * ```ts\n * import { getFilename } from '@stablyai/playwright-test';\n * const __filename = getFilename(import.meta.url);\n * ```\n */\nexport function getFilename(importMetaUrl: string): string {\n return fileURLToPath(importMetaUrl);\n}\n\nexport const test: typeof playwrightTest = playwrightTest.extend<{\n agent: Agent;\n}>({\n agent: async (\n { context }: { context: BrowserContext },\n use: (agent: Agent) => Promise<void>,\n ) => {\n // Create a default agent from the default context\n const agent = context.newAgent();\n await use(agent);\n },\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 \"@playwright/test\";\n\nexport type StablyProjectConfig = {\n notifications?: StablyNotificationConfig;\n};\n\n/**\n * Stably-enhanced defineConfig with typed support for stably notification configuration in projects.\n * The `stably` property on projects is available via module augmentation of `@playwright/test`.\n *\n * @example\n * ```ts\n * import { defineConfig, stablyReporter } from \"@stablyai/playwright-test\";\n *\n * export default defineConfig({\n * reporter: [stablyReporter({ apiKey: \"...\" })],\n * projects: [\n * {\n * name: \"smoke\",\n * stably: {\n * notifications: {\n * slack: { channelName: \"#alerts\", notifyOnResult: \"failures-only\" },\n * },\n * },\n * },\n * ],\n * });\n * ```\n */\nexport const defineConfig = playwrightDefineConfig;\n\ndeclare module \"@playwright/test\" {\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface LocatorAssertions {\n /**\n * Asserts that the locator satisfies a natural language condition using AI vision.\n *\n * Takes a screenshot of the locator and uses AI to verify whether the specified condition is met.\n *\n * @param condition - A natural language description of what should be true about the locator\n * @param options - Optional screenshot options (e.g., timeout)\n *\n * @example\n * ```typescript\n * await expect(page.locator('.button')).aiAssert('The button is disabled and grayed out');\n * ```\n */\n aiAssert(\n condition: string,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n options?: import(\"@stablyai/playwright-base\").ScreenshotPromptOptions,\n ): Promise<void>;\n\n /**\n * @deprecated Use `aiAssert` instead. This method will be removed in a future version.\n */\n toMatchScreenshotPrompt(\n condition: string,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n options?: import(\"@stablyai/playwright-base\").ScreenshotPromptOptions,\n ): Promise<void>;\n }\n\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface PageAssertions {\n /**\n * Asserts that the page satisfies a natural language condition using AI vision.\n *\n * Takes a screenshot of the page and uses AI to verify whether the specified condition is met.\n *\n * @param condition - A natural language description of what should be true about the page\n * @param options - Optional screenshot options (e.g., fullPage, timeout)\n *\n * @example\n * ```typescript\n * await expect(page).aiAssert('The page shows a success message after form submission');\n * ```\n */\n aiAssert(\n condition: string,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n options?: import(\"@stablyai/playwright-base\").ScreenshotPromptOptions,\n ): Promise<void>;\n\n /**\n * @deprecated Use `aiAssert` instead. This method will be removed in a future version.\n */\n toMatchScreenshotPrompt(\n condition: string,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n options?: import(\"@stablyai/playwright-base\").ScreenshotPromptOptions,\n ): Promise<void>;\n }\n\n // Add agent fixture to test args\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface PlaywrightTestArgs {\n agent: Agent;\n }\n\n // Add stably config to project configuration\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface Project {\n stably?: StablyProjectConfig;\n }\n}\n"],"names":["dirname","fileURLToPath","playwrightTest","augmentBrowser","augmentBrowserContext","augmentPage","playwrightExpect","stablyPlaywrightMatchers","playwrightDefineConfig"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,SAAS,WAAW,aAAA,EAA+B;AACxD,EAAA,OAAOA,oBAAA,CAAQC,wBAAA,CAAc,aAAa,CAAC,CAAA;AAC7C;AAYO,SAAS,YAAY,aAAA,EAA+B;AACzD,EAAA,OAAOA,yBAAc,aAAa,CAAA;AACpC;AAEO,MAAM,IAAA,GAA8BC,YAAe,MAAA,CAEvD;AAAA,EACD,KAAA,EAAO,OACL,EAAE,OAAA,IACF,GAAA,KACG;AAEH,IAAA,MAAM,KAAA,GAAQ,QAAQ,QAAA,EAAS;AAC/B,IAAA,MAAM,IAAI,KAAK,CAAA;AAAA,EACjB,CAAA;AAAA,EACA,OAAA,EAAS,OAAO,EAAE,OAAA,IAAW,GAAA,KAAQ;AAEnC,IAAA,MAAM,GAAA,CAAIC,6BAAA,CAAe,OAAc,CAAQ,CAAA;AAAA,EACjD,CAAA;AAAA,EACA,OAAA,EAAS,OAAO,EAAE,OAAA,IAAW,GAAA,KAAQ;AAEnC,IAAA,MAAM,GAAA,CAAIC,oCAAA,CAAsB,OAAc,CAAQ,CAAA;AAAA,EACxD,CAAA;AAAA,EACA,IAAA,EAAM,OAAO,EAAE,IAAA,IAAQ,GAAA,KAAQ;AAE7B,IAAA,MAAM,GAAA,CAAIC,0BAAA,CAAY,IAAW,CAAQ,CAAA;AAAA,EAC3C;AACF,CAAC;AAEM,MAAM,MAAA,GAASC,aAAA,CAAiB,MAAA,CAAOC,uCAAwB;AA+B/D,MAAM,YAAA,GAAeC;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@stablyai/playwright-base";
|
|
2
2
|
import * as _stablyai_playwright_base from '@stablyai/playwright-base';
|
|
3
3
|
import { Agent } from '@stablyai/playwright-base';
|
|
4
|
-
export { Agent, setApiKey } from '@stablyai/playwright-base';
|
|
4
|
+
export { AIModel, Agent, GetLocatorsByAIOptions, GetLocatorsByAIResult, ScreenshotPromptOptions, setApiKey } from '@stablyai/playwright-base';
|
|
5
5
|
import * as _playwright_test from '@playwright/test';
|
|
6
6
|
import { defineConfig as defineConfig$1, test as test$1 } from '@playwright/test';
|
|
7
7
|
export * from '@playwright/test';
|
|
@@ -38,6 +38,10 @@ declare function getDirname(importMetaUrl: string): string;
|
|
|
38
38
|
declare function getFilename(importMetaUrl: string): string;
|
|
39
39
|
declare const test: typeof test$1;
|
|
40
40
|
declare const expect: _playwright_test.Expect<{
|
|
41
|
+
readonly aiAssert: (this: {
|
|
42
|
+
isNot: boolean;
|
|
43
|
+
message?: () => string;
|
|
44
|
+
}, received: _playwright_test.Page | _playwright_test.Locator, condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions) => Promise<_playwright_test.MatcherReturnType>;
|
|
41
45
|
readonly toMatchScreenshotPrompt: (this: {
|
|
42
46
|
isNot: boolean;
|
|
43
47
|
message?: () => string;
|
|
@@ -72,12 +76,45 @@ type StablyProjectConfig = {
|
|
|
72
76
|
*/
|
|
73
77
|
declare const defineConfig: typeof defineConfig$1;
|
|
74
78
|
declare module "@playwright/test" {
|
|
75
|
-
type ScreenshotPromptOptions = _playwright_test.PageAssertionsToHaveScreenshotOptions;
|
|
76
79
|
interface LocatorAssertions {
|
|
77
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Asserts that the locator satisfies a natural language condition using AI vision.
|
|
82
|
+
*
|
|
83
|
+
* Takes a screenshot of the locator and uses AI to verify whether the specified condition is met.
|
|
84
|
+
*
|
|
85
|
+
* @param condition - A natural language description of what should be true about the locator
|
|
86
|
+
* @param options - Optional screenshot options (e.g., timeout)
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```typescript
|
|
90
|
+
* await expect(page.locator('.button')).aiAssert('The button is disabled and grayed out');
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
aiAssert(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Use `aiAssert` instead. This method will be removed in a future version.
|
|
96
|
+
*/
|
|
97
|
+
toMatchScreenshotPrompt(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
78
98
|
}
|
|
79
99
|
interface PageAssertions {
|
|
80
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Asserts that the page satisfies a natural language condition using AI vision.
|
|
102
|
+
*
|
|
103
|
+
* Takes a screenshot of the page and uses AI to verify whether the specified condition is met.
|
|
104
|
+
*
|
|
105
|
+
* @param condition - A natural language description of what should be true about the page
|
|
106
|
+
* @param options - Optional screenshot options (e.g., fullPage, timeout)
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```typescript
|
|
110
|
+
* await expect(page).aiAssert('The page shows a success message after form submission');
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
aiAssert(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated Use `aiAssert` instead. This method will be removed in a future version.
|
|
116
|
+
*/
|
|
117
|
+
toMatchScreenshotPrompt(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
81
118
|
}
|
|
82
119
|
interface PlaywrightTestArgs {
|
|
83
120
|
agent: Agent;
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAsCA;AA7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GA+BG;iBACa,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;AAhCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GAkCG;iBACa,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEzD;QAEM,MAAM,IAAI,EAAE,OAAO;QAyBnB,MAAM,MAAM;AA3DnB;AACA;AACA;iHA+HuD,CAAC;AA7HxD;AACA;AACA;iHAkIW,CAAC;EA7E2D,CAAC;;KAI5D,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEF;AArDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GAuDG;QACI,MAAM,YAAY;AAEzB,OAAO,QAAQ,kBAAkB,CAAC;IAEhC,UAAU,iBAAiB;QACzB;AAvDJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;WAyDO;QACH,QAAQ,CACN,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;QAEH;AA5DJ;WA8DO;QACH,uBAAuB,CACrB,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;KACJ;IAGD,UAAU,cAAc;QACtB;AAlEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;WAoEO;QACH,QAAQ,CACN,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;QAEH;AAvEJ;WAyEO;QACH,uBAAuB,CACrB,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;KACJ;IAID,UAAU,kBAAkB;QAC1B,KAAK,EAAE,KAAK,CAAC;KACd;IAID,UAAU,OAAO;QACf,MAAM,CAAC,EAAE,mBAAmB,CAAC;KAC9B;CACF;;;;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@stablyai/playwright-base";
|
|
2
2
|
import * as _stablyai_playwright_base from '@stablyai/playwright-base';
|
|
3
3
|
import { Agent } from '@stablyai/playwright-base';
|
|
4
|
-
export { Agent, setApiKey } from '@stablyai/playwright-base';
|
|
4
|
+
export { AIModel, Agent, GetLocatorsByAIOptions, GetLocatorsByAIResult, ScreenshotPromptOptions, setApiKey } from '@stablyai/playwright-base';
|
|
5
5
|
import * as _playwright_test from '@playwright/test';
|
|
6
6
|
import { defineConfig as defineConfig$1, test as test$1 } from '@playwright/test';
|
|
7
7
|
export * from '@playwright/test';
|
|
@@ -38,6 +38,10 @@ declare function getDirname(importMetaUrl: string): string;
|
|
|
38
38
|
declare function getFilename(importMetaUrl: string): string;
|
|
39
39
|
declare const test: typeof test$1;
|
|
40
40
|
declare const expect: _playwright_test.Expect<{
|
|
41
|
+
readonly aiAssert: (this: {
|
|
42
|
+
isNot: boolean;
|
|
43
|
+
message?: () => string;
|
|
44
|
+
}, received: _playwright_test.Page | _playwright_test.Locator, condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions) => Promise<_playwright_test.MatcherReturnType>;
|
|
41
45
|
readonly toMatchScreenshotPrompt: (this: {
|
|
42
46
|
isNot: boolean;
|
|
43
47
|
message?: () => string;
|
|
@@ -72,12 +76,45 @@ type StablyProjectConfig = {
|
|
|
72
76
|
*/
|
|
73
77
|
declare const defineConfig: typeof defineConfig$1;
|
|
74
78
|
declare module "@playwright/test" {
|
|
75
|
-
type ScreenshotPromptOptions = _playwright_test.PageAssertionsToHaveScreenshotOptions;
|
|
76
79
|
interface LocatorAssertions {
|
|
77
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Asserts that the locator satisfies a natural language condition using AI vision.
|
|
82
|
+
*
|
|
83
|
+
* Takes a screenshot of the locator and uses AI to verify whether the specified condition is met.
|
|
84
|
+
*
|
|
85
|
+
* @param condition - A natural language description of what should be true about the locator
|
|
86
|
+
* @param options - Optional screenshot options (e.g., timeout)
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```typescript
|
|
90
|
+
* await expect(page.locator('.button')).aiAssert('The button is disabled and grayed out');
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
aiAssert(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Use `aiAssert` instead. This method will be removed in a future version.
|
|
96
|
+
*/
|
|
97
|
+
toMatchScreenshotPrompt(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
78
98
|
}
|
|
79
99
|
interface PageAssertions {
|
|
80
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Asserts that the page satisfies a natural language condition using AI vision.
|
|
102
|
+
*
|
|
103
|
+
* Takes a screenshot of the page and uses AI to verify whether the specified condition is met.
|
|
104
|
+
*
|
|
105
|
+
* @param condition - A natural language description of what should be true about the page
|
|
106
|
+
* @param options - Optional screenshot options (e.g., fullPage, timeout)
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```typescript
|
|
110
|
+
* await expect(page).aiAssert('The page shows a success message after form submission');
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
aiAssert(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated Use `aiAssert` instead. This method will be removed in a future version.
|
|
116
|
+
*/
|
|
117
|
+
toMatchScreenshotPrompt(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
81
118
|
}
|
|
82
119
|
interface PlaywrightTestArgs {
|
|
83
120
|
agent: Agent;
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.mts","sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAsCA;AA7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GA+BG;iBACa,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;AAhCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GAkCG;iBACa,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEzD;QAEM,MAAM,IAAI,EAAE,OAAO;QAyBnB,MAAM,MAAM;AA3DnB;AACA;AACA;iHA+HuD,CAAC;AA7HxD;AACA;AACA;iHAkIW,CAAC;EA7E2D,CAAC;;KAI5D,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEF;AArDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GAuDG;QACI,MAAM,YAAY;AAEzB,OAAO,QAAQ,kBAAkB,CAAC;IAEhC,UAAU,iBAAiB;QACzB;AAvDJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;WAyDO;QACH,QAAQ,CACN,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;QAEH;AA5DJ;WA8DO;QACH,uBAAuB,CACrB,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;KACJ;IAGD,UAAU,cAAc;QACtB;AAlEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;WAoEO;QACH,QAAQ,CACN,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;QAEH;AAvEJ;WAyEO;QACH,uBAAuB,CACrB,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;KACJ;IAID,UAAU,kBAAkB;QAC1B,KAAK,EAAE,KAAK,CAAC;KACd;IAID,UAAU,OAAO;QACf,MAAM,CAAC,EAAE,mBAAmB,CAAC;KAC9B;CACF;;;;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "@stablyai/playwright-base";
|
|
2
2
|
import * as _stablyai_playwright_base from '@stablyai/playwright-base';
|
|
3
3
|
import { Agent } from '@stablyai/playwright-base';
|
|
4
|
-
export { Agent, setApiKey } from '@stablyai/playwright-base';
|
|
4
|
+
export { AIModel, Agent, GetLocatorsByAIOptions, GetLocatorsByAIResult, ScreenshotPromptOptions, setApiKey } from '@stablyai/playwright-base';
|
|
5
5
|
import * as _playwright_test from '@playwright/test';
|
|
6
6
|
import { defineConfig as defineConfig$1, test as test$1 } from '@playwright/test';
|
|
7
7
|
export * from '@playwright/test';
|
|
@@ -38,6 +38,10 @@ declare function getDirname(importMetaUrl: string): string;
|
|
|
38
38
|
declare function getFilename(importMetaUrl: string): string;
|
|
39
39
|
declare const test: typeof test$1;
|
|
40
40
|
declare const expect: _playwright_test.Expect<{
|
|
41
|
+
readonly aiAssert: (this: {
|
|
42
|
+
isNot: boolean;
|
|
43
|
+
message?: () => string;
|
|
44
|
+
}, received: _playwright_test.Page | _playwright_test.Locator, condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions) => Promise<_playwright_test.MatcherReturnType>;
|
|
41
45
|
readonly toMatchScreenshotPrompt: (this: {
|
|
42
46
|
isNot: boolean;
|
|
43
47
|
message?: () => string;
|
|
@@ -72,12 +76,45 @@ type StablyProjectConfig = {
|
|
|
72
76
|
*/
|
|
73
77
|
declare const defineConfig: typeof defineConfig$1;
|
|
74
78
|
declare module "@playwright/test" {
|
|
75
|
-
type ScreenshotPromptOptions = _playwright_test.PageAssertionsToHaveScreenshotOptions;
|
|
76
79
|
interface LocatorAssertions {
|
|
77
|
-
|
|
80
|
+
/**
|
|
81
|
+
* Asserts that the locator satisfies a natural language condition using AI vision.
|
|
82
|
+
*
|
|
83
|
+
* Takes a screenshot of the locator and uses AI to verify whether the specified condition is met.
|
|
84
|
+
*
|
|
85
|
+
* @param condition - A natural language description of what should be true about the locator
|
|
86
|
+
* @param options - Optional screenshot options (e.g., timeout)
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```typescript
|
|
90
|
+
* await expect(page.locator('.button')).aiAssert('The button is disabled and grayed out');
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
aiAssert(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Use `aiAssert` instead. This method will be removed in a future version.
|
|
96
|
+
*/
|
|
97
|
+
toMatchScreenshotPrompt(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
78
98
|
}
|
|
79
99
|
interface PageAssertions {
|
|
80
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Asserts that the page satisfies a natural language condition using AI vision.
|
|
102
|
+
*
|
|
103
|
+
* Takes a screenshot of the page and uses AI to verify whether the specified condition is met.
|
|
104
|
+
*
|
|
105
|
+
* @param condition - A natural language description of what should be true about the page
|
|
106
|
+
* @param options - Optional screenshot options (e.g., fullPage, timeout)
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```typescript
|
|
110
|
+
* await expect(page).aiAssert('The page shows a success message after form submission');
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
aiAssert(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
114
|
+
/**
|
|
115
|
+
* @deprecated Use `aiAssert` instead. This method will be removed in a future version.
|
|
116
|
+
*/
|
|
117
|
+
toMatchScreenshotPrompt(condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions): Promise<void>;
|
|
81
118
|
}
|
|
82
119
|
interface PlaywrightTestArgs {
|
|
83
120
|
agent: Agent;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAsCA;AA7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GA+BG;iBACa,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;AAhCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GAkCG;iBACa,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEzD;QAEM,MAAM,IAAI,EAAE,OAAO;QAyBnB,MAAM,MAAM;AA3DnB;AACA;AACA;iHA+HuD,CAAC;AA7HxD;AACA;AACA;iHAkIW,CAAC;EA7E2D,CAAC;;KAI5D,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEF;AArDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GAuDG;QACI,MAAM,YAAY;AAEzB,OAAO,QAAQ,kBAAkB,CAAC;IAEhC,UAAU,iBAAiB;QACzB;AAvDJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;WAyDO;QACH,QAAQ,CACN,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;QAEH;AA5DJ;WA8DO;QACH,uBAAuB,CACrB,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;KACJ;IAGD,UAAU,cAAc;QACtB;AAlEJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;WAoEO;QACH,QAAQ,CACN,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;QAEH;AAvEJ;WAyEO;QACH,uBAAuB,CACrB,SAAS,EAAE,MAAM,EAEjB,OAAO,CAAC,EAAE,OAAO,2BAA2B,EAAE,uBAAuB,GACpE;KACJ;IAID,UAAU,kBAAkB;QAC1B,KAAK,EAAE,KAAK,CAAC;KACd;IAID,UAAU,OAAO;QACf,MAAM,CAAC,EAAE,mBAAmB,CAAC;KAC9B;CACF;;;;","names":[]}
|
package/dist/index.mjs
CHANGED
|
@@ -4,7 +4,7 @@ import { test as test$2, expect as expect$1, defineConfig as defineConfig$1 } fr
|
|
|
4
4
|
export * from '@playwright/test';
|
|
5
5
|
import { augmentPage, augmentBrowserContext, augmentBrowser, stablyPlaywrightMatchers } from '@stablyai/playwright-base';
|
|
6
6
|
export { Agent, setApiKey } from '@stablyai/playwright-base';
|
|
7
|
-
export {
|
|
7
|
+
export { S as stablyReporter } from './index-CI2c83oz.mjs';
|
|
8
8
|
import 'node:buffer';
|
|
9
9
|
import 'node:path';
|
|
10
10
|
import 'node:child_process';
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import { dirname } from \"path\";\nimport { fileURLToPath } from \"url\";\n\nimport type { BrowserContext } from \"@playwright/test\";\nimport {\n defineConfig as playwrightDefineConfig,\n expect as playwrightExpect,\n test as playwrightTest,\n} from \"@playwright/test\";\nimport \"@stablyai/playwright-base\";\n\nimport type { Agent } from \"@stablyai/playwright-base\";\nimport {\n augmentBrowser,\n augmentBrowserContext,\n augmentPage,\n stablyPlaywrightMatchers,\n} from \"@stablyai/playwright-base\";\n\nimport type { StablyNotificationConfig } from \"@stablyai/playwright-reporter\";\n\nexport { stablyReporter } from \"@stablyai/playwright-reporter\";\nexport type {\n StablyReporterOptions,\n ProjectNotificationConfig,\n NotificationResultPolicy,\n StablyEmailNotificationConfig,\n StablySlackNotificationConfig,\n StablyNotificationConfig,\n} from \"@stablyai/playwright-reporter\";\nexport { Agent, setApiKey } from \"@stablyai/playwright-base\";\n\n/**\n * Get the directory name from an import.meta.url.\n * This is the ESM equivalent of __dirname.\n *\n * @example\n * ```ts\n * import { getDirname } from '@stablyai/playwright-test';\n * const __dirname = getDirname(import.meta.url);\n *\n * // Use in tests for file paths\n * await page.setInputFiles('input', path.join(__dirname, 'fixtures', 'file.pdf'));\n * ```\n */\nexport function getDirname(importMetaUrl: string): string {\n return dirname(fileURLToPath(importMetaUrl));\n}\n\n/**\n * Get the filename from an import.meta.url.\n * This is the ESM equivalent of __filename.\n *\n * @example\n * ```ts\n * import { getFilename } from '@stablyai/playwright-test';\n * const __filename = getFilename(import.meta.url);\n * ```\n */\nexport function getFilename(importMetaUrl: string): string {\n return fileURLToPath(importMetaUrl);\n}\n\nexport const test: typeof playwrightTest = playwrightTest.extend<{\n agent: Agent;\n}>({\n agent: async (\n { context }: { context: BrowserContext },\n use: (agent: Agent) => Promise<void>,\n ) => {\n // Create a default agent from the default context\n const agent = context.newAgent();\n await use(agent);\n },\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 \"@playwright/test\";\n\nexport type StablyProjectConfig = {\n notifications?: StablyNotificationConfig;\n};\n\n/**\n * Stably-enhanced defineConfig with typed support for stably notification configuration in projects.\n * The `stably` property on projects is available via module augmentation of `@playwright/test`.\n *\n * @example\n * ```ts\n * import { defineConfig, stablyReporter } from \"@stablyai/playwright-test\";\n *\n * export default defineConfig({\n * reporter: [stablyReporter({ apiKey: \"...\" })],\n * projects: [\n * {\n * name: \"smoke\",\n * stably: {\n * notifications: {\n * slack: { channelName: \"#alerts\", notifyOnResult: \"failures-only\" },\n * },\n * },\n * },\n * ],\n * });\n * ```\n */\nexport const defineConfig = playwrightDefineConfig;\n\ndeclare module \"@playwright/test\" {\n
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../src/index.ts"],"sourcesContent":["import { dirname } from \"path\";\nimport { fileURLToPath } from \"url\";\n\nimport type { BrowserContext } from \"@playwright/test\";\nimport {\n defineConfig as playwrightDefineConfig,\n expect as playwrightExpect,\n test as playwrightTest,\n} from \"@playwright/test\";\nimport \"@stablyai/playwright-base\";\n\nimport type { Agent } from \"@stablyai/playwright-base\";\nimport {\n augmentBrowser,\n augmentBrowserContext,\n augmentPage,\n stablyPlaywrightMatchers,\n} from \"@stablyai/playwright-base\";\n\nimport type { StablyNotificationConfig } from \"@stablyai/playwright-reporter\";\n\nexport { stablyReporter } from \"@stablyai/playwright-reporter\";\nexport type {\n StablyReporterOptions,\n ProjectNotificationConfig,\n NotificationResultPolicy,\n StablyEmailNotificationConfig,\n StablySlackNotificationConfig,\n StablyNotificationConfig,\n} from \"@stablyai/playwright-reporter\";\nexport { Agent, setApiKey } from \"@stablyai/playwright-base\";\nexport type {\n AIModel,\n GetLocatorsByAIOptions,\n GetLocatorsByAIResult,\n ScreenshotPromptOptions,\n} from \"@stablyai/playwright-base\";\n\n/**\n * Get the directory name from an import.meta.url.\n * This is the ESM equivalent of __dirname.\n *\n * @example\n * ```ts\n * import { getDirname } from '@stablyai/playwright-test';\n * const __dirname = getDirname(import.meta.url);\n *\n * // Use in tests for file paths\n * await page.setInputFiles('input', path.join(__dirname, 'fixtures', 'file.pdf'));\n * ```\n */\nexport function getDirname(importMetaUrl: string): string {\n return dirname(fileURLToPath(importMetaUrl));\n}\n\n/**\n * Get the filename from an import.meta.url.\n * This is the ESM equivalent of __filename.\n *\n * @example\n * ```ts\n * import { getFilename } from '@stablyai/playwright-test';\n * const __filename = getFilename(import.meta.url);\n * ```\n */\nexport function getFilename(importMetaUrl: string): string {\n return fileURLToPath(importMetaUrl);\n}\n\nexport const test: typeof playwrightTest = playwrightTest.extend<{\n agent: Agent;\n}>({\n agent: async (\n { context }: { context: BrowserContext },\n use: (agent: Agent) => Promise<void>,\n ) => {\n // Create a default agent from the default context\n const agent = context.newAgent();\n await use(agent);\n },\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 \"@playwright/test\";\n\nexport type StablyProjectConfig = {\n notifications?: StablyNotificationConfig;\n};\n\n/**\n * Stably-enhanced defineConfig with typed support for stably notification configuration in projects.\n * The `stably` property on projects is available via module augmentation of `@playwright/test`.\n *\n * @example\n * ```ts\n * import { defineConfig, stablyReporter } from \"@stablyai/playwright-test\";\n *\n * export default defineConfig({\n * reporter: [stablyReporter({ apiKey: \"...\" })],\n * projects: [\n * {\n * name: \"smoke\",\n * stably: {\n * notifications: {\n * slack: { channelName: \"#alerts\", notifyOnResult: \"failures-only\" },\n * },\n * },\n * },\n * ],\n * });\n * ```\n */\nexport const defineConfig = playwrightDefineConfig;\n\ndeclare module \"@playwright/test\" {\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface LocatorAssertions {\n /**\n * Asserts that the locator satisfies a natural language condition using AI vision.\n *\n * Takes a screenshot of the locator and uses AI to verify whether the specified condition is met.\n *\n * @param condition - A natural language description of what should be true about the locator\n * @param options - Optional screenshot options (e.g., timeout)\n *\n * @example\n * ```typescript\n * await expect(page.locator('.button')).aiAssert('The button is disabled and grayed out');\n * ```\n */\n aiAssert(\n condition: string,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n options?: import(\"@stablyai/playwright-base\").ScreenshotPromptOptions,\n ): Promise<void>;\n\n /**\n * @deprecated Use `aiAssert` instead. This method will be removed in a future version.\n */\n toMatchScreenshotPrompt(\n condition: string,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n options?: import(\"@stablyai/playwright-base\").ScreenshotPromptOptions,\n ): Promise<void>;\n }\n\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface PageAssertions {\n /**\n * Asserts that the page satisfies a natural language condition using AI vision.\n *\n * Takes a screenshot of the page and uses AI to verify whether the specified condition is met.\n *\n * @param condition - A natural language description of what should be true about the page\n * @param options - Optional screenshot options (e.g., fullPage, timeout)\n *\n * @example\n * ```typescript\n * await expect(page).aiAssert('The page shows a success message after form submission');\n * ```\n */\n aiAssert(\n condition: string,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n options?: import(\"@stablyai/playwright-base\").ScreenshotPromptOptions,\n ): Promise<void>;\n\n /**\n * @deprecated Use `aiAssert` instead. This method will be removed in a future version.\n */\n toMatchScreenshotPrompt(\n condition: string,\n // eslint-disable-next-line @typescript-eslint/consistent-type-imports\n options?: import(\"@stablyai/playwright-base\").ScreenshotPromptOptions,\n ): Promise<void>;\n }\n\n // Add agent fixture to test args\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface PlaywrightTestArgs {\n agent: Agent;\n }\n\n // Add stably config to project configuration\n // eslint-disable-next-line @typescript-eslint/consistent-type-definitions\n interface Project {\n stably?: StablyProjectConfig;\n }\n}\n"],"names":["playwrightTest","playwrightExpect","playwrightDefineConfig"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmDO,SAAS,WAAW,aAAA,EAA+B;AACxD,EAAA,OAAO,OAAA,CAAQ,aAAA,CAAc,aAAa,CAAC,CAAA;AAC7C;AAYO,SAAS,YAAY,aAAA,EAA+B;AACzD,EAAA,OAAO,cAAc,aAAa,CAAA;AACpC;AAEO,MAAM,IAAA,GAA8BA,OAAe,MAAA,CAEvD;AAAA,EACD,KAAA,EAAO,OACL,EAAE,OAAA,IACF,GAAA,KACG;AAEH,IAAA,MAAM,KAAA,GAAQ,QAAQ,QAAA,EAAS;AAC/B,IAAA,MAAM,IAAI,KAAK,CAAA;AAAA,EACjB,CAAA;AAAA,EACA,OAAA,EAAS,OAAO,EAAE,OAAA,IAAW,GAAA,KAAQ;AAEnC,IAAA,MAAM,GAAA,CAAI,cAAA,CAAe,OAAc,CAAQ,CAAA;AAAA,EACjD,CAAA;AAAA,EACA,OAAA,EAAS,OAAO,EAAE,OAAA,IAAW,GAAA,KAAQ;AAEnC,IAAA,MAAM,GAAA,CAAI,qBAAA,CAAsB,OAAc,CAAQ,CAAA;AAAA,EACxD,CAAA;AAAA,EACA,IAAA,EAAM,OAAO,EAAE,IAAA,IAAQ,GAAA,KAAQ;AAE7B,IAAA,MAAM,GAAA,CAAI,WAAA,CAAY,IAAW,CAAQ,CAAA;AAAA,EAC3C;AACF,CAAC;AAEM,MAAM,MAAA,GAASC,QAAA,CAAiB,MAAA,CAAO,wBAAwB;AA+B/D,MAAM,YAAA,GAAeC;;;;"}
|
package/dist/reporter.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-Dg_zRYuy.cjs');
|
|
4
4
|
require('node:buffer');
|
|
5
5
|
require('node:path');
|
|
6
6
|
require('node:child_process');
|
|
@@ -30,5 +30,5 @@ require('os');
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
module.exports = index.
|
|
33
|
+
module.exports = index.Cn;
|
|
34
34
|
//# sourceMappingURL=reporter.cjs.map
|
package/dist/reporter.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { C as Cn } from './index-CI2c83oz.mjs';
|
|
2
2
|
import 'node:buffer';
|
|
3
3
|
import 'node:path';
|
|
4
4
|
import 'node:child_process';
|
|
@@ -28,5 +28,5 @@ import 'os';
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
export {
|
|
31
|
+
export { Cn as default };
|
|
32
32
|
//# sourceMappingURL=reporter.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stablyai/playwright-test",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "Playwright Test wrapper with Stably AI matchers",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@stablyai/playwright": "2.
|
|
35
|
-
"@stablyai/playwright-base": "2.
|
|
34
|
+
"@stablyai/playwright": "2.1.1",
|
|
35
|
+
"@stablyai/playwright-base": "2.1.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@stablyai/playwright-reporter": "1.3.6"
|