@stablyai/playwright-test 2.0.1 → 2.0.5

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.mts CHANGED
@@ -3,9 +3,10 @@ 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 { test as test$1 } from '@playwright/test';
6
+ import { test as test$1, defineConfig as defineConfig$1 } from '@playwright/test';
7
7
  export * from '@playwright/test';
8
- export { stablyReporter } from '@stablyai/playwright-reporter';
8
+ import { StablyNotificationConfig } from '@stablyai/playwright-reporter';
9
+ export { NotificationResultPolicy, ProjectNotificationConfig, StablyEmailNotificationConfig, StablyNotificationConfig, StablyReporterOptions, StablySlackNotificationConfig, stablyReporter } from '@stablyai/playwright-reporter';
9
10
 
10
11
  declare const test: typeof test$1;
11
12
  declare const expect: _playwright_test.Expect<{
@@ -15,6 +16,33 @@ declare const expect: _playwright_test.Expect<{
15
16
  }, received: _playwright_test.Page | _playwright_test.Locator, condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions) => Promise<_playwright_test.MatcherReturnType>;
16
17
  }>;
17
18
 
19
+ type StablyProjectConfig = {
20
+ notifications?: StablyNotificationConfig;
21
+ };
22
+ /**
23
+ * Stably-enhanced defineConfig with typed support for stably notification configuration in projects.
24
+ * The `stably` property on projects is available via module augmentation of `@playwright/test`.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * import { defineConfig, stablyReporter } from "@stablyai/playwright-test";
29
+ *
30
+ * export default defineConfig({
31
+ * reporter: [stablyReporter({ apiKey: "..." })],
32
+ * projects: [
33
+ * {
34
+ * name: "smoke",
35
+ * stably: {
36
+ * notifications: {
37
+ * slack: { channelName: "#alerts", notifyOnResult: "failures-only" },
38
+ * },
39
+ * },
40
+ * },
41
+ * ],
42
+ * });
43
+ * ```
44
+ */
45
+ declare const defineConfig: typeof defineConfig$1;
18
46
  declare module "@playwright/test" {
19
47
  type ScreenshotPromptOptions = _playwright_test.PageAssertionsToHaveScreenshotOptions;
20
48
  interface LocatorAssertions {
@@ -26,6 +54,9 @@ declare module "@playwright/test" {
26
54
  interface PlaywrightTestArgs {
27
55
  agent: Agent;
28
56
  }
57
+ interface Project {
58
+ stably?: StablyProjectConfig;
59
+ }
29
60
  }
30
61
 
31
- export { expect, test };
62
+ export { type StablyProjectConfig, defineConfig, expect, test };
package/dist/index.d.ts CHANGED
@@ -3,9 +3,10 @@ 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 { test as test$1 } from '@playwright/test';
6
+ import { test as test$1, defineConfig as defineConfig$1 } from '@playwright/test';
7
7
  export * from '@playwright/test';
8
- export { stablyReporter } from '@stablyai/playwright-reporter';
8
+ import { StablyNotificationConfig } from '@stablyai/playwright-reporter';
9
+ export { NotificationResultPolicy, ProjectNotificationConfig, StablyEmailNotificationConfig, StablyNotificationConfig, StablyReporterOptions, StablySlackNotificationConfig, stablyReporter } from '@stablyai/playwright-reporter';
9
10
 
10
11
  declare const test: typeof test$1;
11
12
  declare const expect: _playwright_test.Expect<{
@@ -15,6 +16,33 @@ declare const expect: _playwright_test.Expect<{
15
16
  }, received: _playwright_test.Page | _playwright_test.Locator, condition: string, options?: _stablyai_playwright_base.ScreenshotPromptOptions) => Promise<_playwright_test.MatcherReturnType>;
16
17
  }>;
17
18
 
19
+ type StablyProjectConfig = {
20
+ notifications?: StablyNotificationConfig;
21
+ };
22
+ /**
23
+ * Stably-enhanced defineConfig with typed support for stably notification configuration in projects.
24
+ * The `stably` property on projects is available via module augmentation of `@playwright/test`.
25
+ *
26
+ * @example
27
+ * ```ts
28
+ * import { defineConfig, stablyReporter } from "@stablyai/playwright-test";
29
+ *
30
+ * export default defineConfig({
31
+ * reporter: [stablyReporter({ apiKey: "..." })],
32
+ * projects: [
33
+ * {
34
+ * name: "smoke",
35
+ * stably: {
36
+ * notifications: {
37
+ * slack: { channelName: "#alerts", notifyOnResult: "failures-only" },
38
+ * },
39
+ * },
40
+ * },
41
+ * ],
42
+ * });
43
+ * ```
44
+ */
45
+ declare const defineConfig: typeof defineConfig$1;
18
46
  declare module "@playwright/test" {
19
47
  type ScreenshotPromptOptions = _playwright_test.PageAssertionsToHaveScreenshotOptions;
20
48
  interface LocatorAssertions {
@@ -26,6 +54,9 @@ declare module "@playwright/test" {
26
54
  interface PlaywrightTestArgs {
27
55
  agent: Agent;
28
56
  }
57
+ interface Project {
58
+ stably?: StablyProjectConfig;
59
+ }
29
60
  }
30
61
 
31
- export { expect, test };
62
+ export { type StablyProjectConfig, defineConfig, expect, test };