@checksum-ai/runtime 1.1.9 → 1.1.12-alpha

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
@@ -17,6 +17,7 @@ export interface IChecksumPage extends Page {
17
17
  checksumSelector: (id: string) => IChecksumPage;
18
18
  checksumAI: ChecksumAIMethod;
19
19
  resolveAssetsFolder: (assets: string[]) => string[];
20
+ getPage(index: number): Promise<IChecksumPage>;
20
21
  }
21
22
 
22
23
  class Wrapper<ExtendedMatchers, T> {
@@ -176,7 +177,7 @@ export type EnvironmentUser = {
176
177
 
177
178
  export function getLogin(): (
178
179
  page: Page,
179
- { role }: { role?: string } = {}
180
+ { role, environment }?: { role?: string; environment?: string }
180
181
  ) => Promise<void>;
181
182
 
182
183
  export function getChecksumConfig(
@@ -203,4 +204,15 @@ export function init(base: ChecksumTestType<PlaywrightTestArgs>): {
203
204
  defineChecksumTest: (title: string, testId: string) => string;
204
205
  expect: IChecksumExpect;
205
206
  checksumAI: (description: string, testFunction: Function) => Promise<any>;
207
+ getEnvironment: ({
208
+ name,
209
+ userRole,
210
+ }: {
211
+ name?: string;
212
+ userRole?: string;
213
+ }) => {
214
+ environment: ChecksumConfigEnvironment;
215
+ user: EnvironmentUser;
216
+ login: ReturnType<typeof getLogin>;
217
+ };
206
218
  };