@stablyai/playwright-test 2.0.12-rc.0 → 2.0.12-rc.2
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-Cf1SUa76.cjs +9640 -0
- package/dist/index-Cf1SUa76.cjs.map +1 -0
- package/dist/index-YCMYxOS2.mjs +9618 -0
- package/dist/index-YCMYxOS2.mjs.map +1 -0
- package/dist/index.cjs +67 -8538
- package/dist/index.cjs.map +1 -1
- package/dist/index.d-DaMmBaG3.d.cts +45574 -0
- package/dist/index.d-DaMmBaG3.d.cts.map +1 -0
- package/dist/index.d-DaMmBaG3.d.mts +45574 -0
- package/dist/index.d-DaMmBaG3.d.mts.map +1 -0
- package/dist/index.d-DaMmBaG3.d.ts +45574 -0
- package/dist/index.d-DaMmBaG3.d.ts.map +1 -0
- package/dist/index.d.cts +92 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +34 -4
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +34 -4
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +43 -8529
- package/dist/index.mjs.map +1 -1
- package/dist/reporter.cjs +34 -10826
- package/dist/reporter.cjs.map +1 -1
- package/dist/reporter.d.cts +10 -0
- package/dist/reporter.d.cts.map +1 -0
- package/dist/reporter.d.mts +9 -2
- package/dist/reporter.d.mts.map +1 -0
- package/dist/reporter.d.ts.map +1 -0
- package/dist/reporter.mjs +32 -10822
- package/dist/reporter.mjs.map +1 -1
- package/package.json +23 -12
- package/dist/reporter.d.ts +0 -3
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import "@stablyai/playwright-base";
|
|
2
|
+
import * as _stablyai_playwright_base from '@stablyai/playwright-base';
|
|
3
|
+
import { Agent } from '@stablyai/playwright-base';
|
|
4
|
+
export { Agent, setApiKey } from '@stablyai/playwright-base';
|
|
5
|
+
import * as _playwright_test from '@playwright/test';
|
|
6
|
+
import { defineConfig as defineConfig$1, test as test$1 } from '@playwright/test';
|
|
7
|
+
export * from '@playwright/test';
|
|
8
|
+
import { S as StablyNotificationConfig } from './index.d-DaMmBaG3.cjs';
|
|
9
|
+
export { N as NotificationResultPolicy, P as ProjectNotificationConfig, a as StablyEmailNotificationConfig, b as StablyReporterOptions, c as StablySlackNotificationConfig, s as stablyReporter } from './index.d-DaMmBaG3.cjs';
|
|
10
|
+
import 'child_process';
|
|
11
|
+
import 'stream';
|
|
12
|
+
import 'fs';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Get the directory name from an import.meta.url.
|
|
16
|
+
* This is the ESM equivalent of __dirname.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* import { getDirname } from '@stablyai/playwright-test';
|
|
21
|
+
* const __dirname = getDirname(import.meta.url);
|
|
22
|
+
*
|
|
23
|
+
* // Use in tests for file paths
|
|
24
|
+
* await page.setInputFiles('input', path.join(__dirname, 'fixtures', 'file.pdf'));
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function getDirname(importMetaUrl: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the filename from an import.meta.url.
|
|
30
|
+
* This is the ESM equivalent of __filename.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* import { getFilename } from '@stablyai/playwright-test';
|
|
35
|
+
* const __filename = getFilename(import.meta.url);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function getFilename(importMetaUrl: string): string;
|
|
39
|
+
declare const test: typeof test$1;
|
|
40
|
+
declare const expect: _playwright_test.Expect<{
|
|
41
|
+
readonly toMatchScreenshotPrompt: (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>;
|
|
45
|
+
}>;
|
|
46
|
+
|
|
47
|
+
type StablyProjectConfig = {
|
|
48
|
+
notifications?: StablyNotificationConfig;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Stably-enhanced defineConfig with typed support for stably notification configuration in projects.
|
|
52
|
+
* The `stably` property on projects is available via module augmentation of `@playwright/test`.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```ts
|
|
56
|
+
* import { defineConfig, stablyReporter } from "@stablyai/playwright-test";
|
|
57
|
+
*
|
|
58
|
+
* export default defineConfig({
|
|
59
|
+
* reporter: [stablyReporter({ apiKey: "..." })],
|
|
60
|
+
* projects: [
|
|
61
|
+
* {
|
|
62
|
+
* name: "smoke",
|
|
63
|
+
* stably: {
|
|
64
|
+
* notifications: {
|
|
65
|
+
* slack: { channelName: "#alerts", notifyOnResult: "failures-only" },
|
|
66
|
+
* },
|
|
67
|
+
* },
|
|
68
|
+
* },
|
|
69
|
+
* ],
|
|
70
|
+
* });
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
declare const defineConfig: typeof defineConfig$1;
|
|
74
|
+
declare module "@playwright/test" {
|
|
75
|
+
type ScreenshotPromptOptions = _playwright_test.PageAssertionsToHaveScreenshotOptions;
|
|
76
|
+
interface LocatorAssertions {
|
|
77
|
+
toMatchScreenshotPrompt(condition: string, options?: ScreenshotPromptOptions): Promise<void>;
|
|
78
|
+
}
|
|
79
|
+
interface PageAssertions {
|
|
80
|
+
toMatchScreenshotPrompt(condition: string, options?: ScreenshotPromptOptions): Promise<void>;
|
|
81
|
+
}
|
|
82
|
+
interface PlaywrightTestArgs {
|
|
83
|
+
agent: Agent;
|
|
84
|
+
}
|
|
85
|
+
interface Project {
|
|
86
|
+
stably?: StablyProjectConfig;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export { StablyNotificationConfig, defineConfig, expect, getDirname, getFilename, test };
|
|
91
|
+
export type { StablyProjectConfig };
|
|
92
|
+
//# sourceMappingURL=index.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.cts","sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAgCA;AAxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GA0BG;iBACa,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;AA3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GA6BG;iBACa,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEzD;QAEM,MAAM,IAAI,EAAE,OAAO;QAyBnB,MAAM,MAAM;AAtDnB;AACA;AACA;iHAuFmC,CAAC;EAnCmC,CAAC;;KAI5D,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEF;AApDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GAsDG;QACI,MAAM,YAAY;AAEzB,OAAO,QAAQ,kBAAkB,CAAC;IAChC,KAAY,uBAAuB,GAEjC,OAAO,kBAAkB,EAAE;IAG7B,UAAU,iBAAiB;QACzB,uBAAuB,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;KAClB;IAGD,UAAU,cAAc;QACtB,uBAAuB,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;KAClB;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
|
@@ -3,11 +3,39 @@ import * as _stablyai_playwright_base from '@stablyai/playwright-base';
|
|
|
3
3
|
import { Agent } from '@stablyai/playwright-base';
|
|
4
4
|
export { Agent, setApiKey } from '@stablyai/playwright-base';
|
|
5
5
|
import * as _playwright_test from '@playwright/test';
|
|
6
|
-
import {
|
|
6
|
+
import { defineConfig as defineConfig$1, test as test$1 } from '@playwright/test';
|
|
7
7
|
export * from '@playwright/test';
|
|
8
|
-
import { StablyNotificationConfig } from '
|
|
9
|
-
export { NotificationResultPolicy, ProjectNotificationConfig, StablyEmailNotificationConfig,
|
|
8
|
+
import { S as StablyNotificationConfig } from './index.d-DaMmBaG3.mjs';
|
|
9
|
+
export { N as NotificationResultPolicy, P as ProjectNotificationConfig, a as StablyEmailNotificationConfig, b as StablyReporterOptions, c as StablySlackNotificationConfig, s as stablyReporter } from './index.d-DaMmBaG3.mjs';
|
|
10
|
+
import 'child_process';
|
|
11
|
+
import 'stream';
|
|
12
|
+
import 'fs';
|
|
10
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Get the directory name from an import.meta.url.
|
|
16
|
+
* This is the ESM equivalent of __dirname.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* import { getDirname } from '@stablyai/playwright-test';
|
|
21
|
+
* const __dirname = getDirname(import.meta.url);
|
|
22
|
+
*
|
|
23
|
+
* // Use in tests for file paths
|
|
24
|
+
* await page.setInputFiles('input', path.join(__dirname, 'fixtures', 'file.pdf'));
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function getDirname(importMetaUrl: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the filename from an import.meta.url.
|
|
30
|
+
* This is the ESM equivalent of __filename.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* import { getFilename } from '@stablyai/playwright-test';
|
|
35
|
+
* const __filename = getFilename(import.meta.url);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function getFilename(importMetaUrl: string): string;
|
|
11
39
|
declare const test: typeof test$1;
|
|
12
40
|
declare const expect: _playwright_test.Expect<{
|
|
13
41
|
readonly toMatchScreenshotPrompt: (this: {
|
|
@@ -59,4 +87,6 @@ declare module "@playwright/test" {
|
|
|
59
87
|
}
|
|
60
88
|
}
|
|
61
89
|
|
|
62
|
-
export {
|
|
90
|
+
export { StablyNotificationConfig, defineConfig, expect, getDirname, getFilename, test };
|
|
91
|
+
export type { StablyProjectConfig };
|
|
92
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAgCA;AAxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GA0BG;iBACa,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;AA3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GA6BG;iBACa,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEzD;QAEM,MAAM,IAAI,EAAE,OAAO;QAyBnB,MAAM,MAAM;AAtDnB;AACA;AACA;iHAuFmC,CAAC;EAnCmC,CAAC;;KAI5D,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEF;AApDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GAsDG;QACI,MAAM,YAAY;AAEzB,OAAO,QAAQ,kBAAkB,CAAC;IAChC,KAAY,uBAAuB,GAEjC,OAAO,kBAAkB,EAAE;IAG7B,UAAU,iBAAiB;QACzB,uBAAuB,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;KAClB;IAGD,UAAU,cAAc;QACtB,uBAAuB,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;KAClB;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
|
@@ -3,11 +3,39 @@ import * as _stablyai_playwright_base from '@stablyai/playwright-base';
|
|
|
3
3
|
import { Agent } from '@stablyai/playwright-base';
|
|
4
4
|
export { Agent, setApiKey } from '@stablyai/playwright-base';
|
|
5
5
|
import * as _playwright_test from '@playwright/test';
|
|
6
|
-
import {
|
|
6
|
+
import { defineConfig as defineConfig$1, test as test$1 } from '@playwright/test';
|
|
7
7
|
export * from '@playwright/test';
|
|
8
|
-
import { StablyNotificationConfig } from '
|
|
9
|
-
export { NotificationResultPolicy, ProjectNotificationConfig, StablyEmailNotificationConfig,
|
|
8
|
+
import { S as StablyNotificationConfig } from './index.d-DaMmBaG3.js';
|
|
9
|
+
export { N as NotificationResultPolicy, P as ProjectNotificationConfig, a as StablyEmailNotificationConfig, b as StablyReporterOptions, c as StablySlackNotificationConfig, s as stablyReporter } from './index.d-DaMmBaG3.js';
|
|
10
|
+
import 'child_process';
|
|
11
|
+
import 'stream';
|
|
12
|
+
import 'fs';
|
|
10
13
|
|
|
14
|
+
/**
|
|
15
|
+
* Get the directory name from an import.meta.url.
|
|
16
|
+
* This is the ESM equivalent of __dirname.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```ts
|
|
20
|
+
* import { getDirname } from '@stablyai/playwright-test';
|
|
21
|
+
* const __dirname = getDirname(import.meta.url);
|
|
22
|
+
*
|
|
23
|
+
* // Use in tests for file paths
|
|
24
|
+
* await page.setInputFiles('input', path.join(__dirname, 'fixtures', 'file.pdf'));
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
declare function getDirname(importMetaUrl: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the filename from an import.meta.url.
|
|
30
|
+
* This is the ESM equivalent of __filename.
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```ts
|
|
34
|
+
* import { getFilename } from '@stablyai/playwright-test';
|
|
35
|
+
* const __filename = getFilename(import.meta.url);
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
declare function getFilename(importMetaUrl: string): string;
|
|
11
39
|
declare const test: typeof test$1;
|
|
12
40
|
declare const expect: _playwright_test.Expect<{
|
|
13
41
|
readonly toMatchScreenshotPrompt: (this: {
|
|
@@ -59,4 +87,6 @@ declare module "@playwright/test" {
|
|
|
59
87
|
}
|
|
60
88
|
}
|
|
61
89
|
|
|
62
|
-
export {
|
|
90
|
+
export { StablyNotificationConfig, defineConfig, expect, getDirname, getFilename, test };
|
|
91
|
+
export type { StablyProjectConfig };
|
|
92
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sources":["../src/index.ts"],"mappings":";;;;;;;;;;;;AAgCA;AAxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GA0BG;iBACa,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;AA3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GA6BG;iBACa,WAAW,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAEzD;QAEM,MAAM,IAAI,EAAE,OAAO;QAyBnB,MAAM,MAAM;AAtDnB;AACA;AACA;iHAuFmC,CAAC;EAnCmC,CAAC;;KAI5D,mBAAmB,GAAG;IAChC,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C,CAAC;AAEF;AApDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;GAsDG;QACI,MAAM,YAAY;AAEzB,OAAO,QAAQ,kBAAkB,CAAC;IAChC,KAAY,uBAAuB,GAEjC,OAAO,kBAAkB,EAAE;IAG7B,UAAU,iBAAiB;QACzB,uBAAuB,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;KAClB;IAGD,UAAU,cAAc;QACtB,uBAAuB,CACrB,SAAS,EAAE,MAAM,EACjB,OAAO,CAAC,EAAE,uBAAuB,GAChC,OAAO,CAAC,IAAI,CAAC,CAAC;KAClB;IAID,UAAU,kBAAkB;QAC1B,KAAK,EAAE,KAAK,CAAC;KACd;IAID,UAAU,OAAO;QACf,MAAM,CAAC,EAAE,mBAAmB,CAAC;KAC9B;CACF;;;;","names":[]}
|