@checksum-ai/runtime 1.0.91 → 1.1.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/index.d.ts CHANGED
@@ -8,9 +8,15 @@ import {
8
8
  PlaywrightWorkerOptions,
9
9
  } from "@playwright/test";
10
10
 
11
+ interface ChecksumAIMethod {
12
+ (title: string): IChecksumPage;
13
+ <T>(title: string, body: () => T | Promise<T>): Promise<T>;
14
+ }
15
+
11
16
  export interface IChecksumPage extends Page {
12
17
  checksumSelector: (id: string) => IChecksumPage;
13
- checksumAI: (thought: string, testFunction?: () => void) => IChecksumPage;
18
+ checksumAI: ChecksumAIMethod;
19
+ resolveAssetsFolder: (assets: string[]) => string[];
14
20
  }
15
21
 
16
22
  class Wrapper<ExtendedMatchers, T> {
@@ -42,21 +48,31 @@ type ChecksumMakeMatchers<MakeMatchers> = MakeMatchers & {
42
48
 
43
49
  export interface IChecksumExpect<ExtendedMatchers = {}>
44
50
  extends Expect<ExtendedMatchers> {
51
+ checksumAI: (thought: string) => IChecksumExpect<ExtendedMatchers>;
45
52
  <T = unknown>(
46
53
  actual: T,
47
- messageOrOptions?: string | { message?: string }
54
+ messageOrOptions?:
55
+ | string
56
+ | { message?: string; checksumAI?: boolean | string }
48
57
  ): ChecksumMakeMatchers<Apply_MakeMatchers<ExtendedMatchers, T>>;
49
58
 
50
59
  soft: <T = unknown>(
51
60
  actual: T,
52
- messageOrOptions?: string | { message?: string }
61
+ messageOrOptions?:
62
+ | string
63
+ | { message?: string; checksumAI?: boolean | string }
53
64
  ) => ChecksumMakeMatchers<Soft_MakeMatchers<ExtendedMatchers, T>>;
54
65
 
55
66
  poll: <T = unknown>(
56
67
  actual: () => T | Promise<T>,
57
68
  messageOrOptions?:
58
69
  | string
59
- | { message?: string; timeout?: number; intervals?: number[] }
70
+ | {
71
+ message?: string;
72
+ timeout?: number;
73
+ intervals?: number[];
74
+ checksumAI?: boolean | string;
75
+ }
60
76
  ) => ChecksumMakeMatchers<Poll_MakeMatchers<ExtendedMatchers, T>>;
61
77
  }
62
78
 
@@ -169,4 +185,5 @@ export function init(base: ChecksumTestType<PlaywrightTestArgs>): {
169
185
  login: ReturnType<typeof getLogin>;
170
186
  defineChecksumTest: (title: string, testId: string) => string;
171
187
  expect: IChecksumExpect;
188
+ checksumAI: (description: string, testFunction: Function) => Promise<any>;
172
189
  };