@checksum-ai/runtime 1.1.45-alpha → 1.1.47
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/README.md +2 -43
- package/cli.js +61 -62
- package/index.d.ts +25 -14
- package/index.js +323 -157
- package/package.json +1 -1
- package/test-run-monitor.js +19 -19
package/index.d.ts
CHANGED
|
@@ -22,8 +22,6 @@ type EnumValues<T> = T[keyof T];
|
|
|
22
22
|
export interface IVariableStore {
|
|
23
23
|
[key: string]: any;
|
|
24
24
|
}
|
|
25
|
-
// backward compatibility
|
|
26
|
-
export type IVariablesStore = IVariableStore;
|
|
27
25
|
|
|
28
26
|
type ModifyLocatorMethodToChecksumLocator<T> = {
|
|
29
27
|
[K in keyof T]: T[K] extends (...args: any[]) => Locator // Check if the property is a function returning Locator
|
|
@@ -221,9 +219,34 @@ export type ChecksumConfig = {
|
|
|
221
219
|
* Checksum API key
|
|
222
220
|
*/
|
|
223
221
|
apiKey: string;
|
|
222
|
+
/**
|
|
223
|
+
* Base URL of the tested app (i.e http://staging.example.com)
|
|
224
|
+
*/
|
|
225
|
+
baseURL: string;
|
|
224
226
|
|
|
225
227
|
environments?: ChecksumConfigEnvironment[];
|
|
226
228
|
|
|
229
|
+
/**
|
|
230
|
+
* The username/email that will be used
|
|
231
|
+
* to login into your testing environment
|
|
232
|
+
*/
|
|
233
|
+
username?: string;
|
|
234
|
+
/**
|
|
235
|
+
* The password that will be used
|
|
236
|
+
* to login into your testing environment
|
|
237
|
+
*/
|
|
238
|
+
password?: string;
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* The credentials of the users that will be used to login into your testing environment
|
|
242
|
+
*/
|
|
243
|
+
users?: {
|
|
244
|
+
role: string;
|
|
245
|
+
username?: string;
|
|
246
|
+
password?: string;
|
|
247
|
+
default?: boolean;
|
|
248
|
+
}[];
|
|
249
|
+
|
|
227
250
|
/**
|
|
228
251
|
* Checksum runtime options
|
|
229
252
|
*/
|
|
@@ -245,18 +268,6 @@ export type EnvironmentUser = {
|
|
|
245
268
|
default?: boolean;
|
|
246
269
|
};
|
|
247
270
|
|
|
248
|
-
export type ChecksumLoginFunctionParams<PayloadType = any> = {
|
|
249
|
-
environment: ChecksumConfigEnvironment;
|
|
250
|
-
user: EnvironmentUser;
|
|
251
|
-
config: ChecksumConfig;
|
|
252
|
-
payload?: PayloadType;
|
|
253
|
-
};
|
|
254
|
-
|
|
255
|
-
export type ChecksumLoginFunction<PayloadType = any> = (
|
|
256
|
-
page: IChecksumPage,
|
|
257
|
-
params: ChecksumLoginFunctionParams<PayloadType>
|
|
258
|
-
) => Promise<void>;
|
|
259
|
-
|
|
260
271
|
export function getLogin(): (
|
|
261
272
|
page: Page,
|
|
262
273
|
{ role, environment }?: { role?: string; environment?: string }
|