@reportportal/client-javascript 5.5.9 → 5.5.10
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/VERSION +1 -1
- package/index.d.ts +45 -27
- package/package.json +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
5.5.
|
|
1
|
+
5.5.11-SNAPSHOT
|
package/index.d.ts
CHANGED
|
@@ -52,6 +52,10 @@ declare module '@reportportal/client-javascript' {
|
|
|
52
52
|
username: string;
|
|
53
53
|
password: string;
|
|
54
54
|
};
|
|
55
|
+
/**
|
|
56
|
+
* Optional debug logs for the proxy.
|
|
57
|
+
*/
|
|
58
|
+
debug?: boolean;
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
/**
|
|
@@ -78,16 +82,11 @@ declare module '@reportportal/client-javascript' {
|
|
|
78
82
|
/**
|
|
79
83
|
* Custom HTTP agent options.
|
|
80
84
|
*/
|
|
81
|
-
agent?:
|
|
85
|
+
agent?: any;
|
|
82
86
|
/**
|
|
83
87
|
* Retry configuration.
|
|
84
88
|
*/
|
|
85
|
-
retry?: number |
|
|
86
|
-
retries?: number;
|
|
87
|
-
retryDelay?: (retryCount: number) => number;
|
|
88
|
-
retryCondition?: (error: any) => boolean;
|
|
89
|
-
shouldResetTimeout?: boolean;
|
|
90
|
-
};
|
|
89
|
+
retry?: number | any;
|
|
91
90
|
/**
|
|
92
91
|
* Enable debug logging.
|
|
93
92
|
*/
|
|
@@ -95,7 +94,7 @@ declare module '@reportportal/client-javascript' {
|
|
|
95
94
|
/**
|
|
96
95
|
* Any other axios configuration options.
|
|
97
96
|
*/
|
|
98
|
-
[key: string]:
|
|
97
|
+
[key: string]: any;
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
/**
|
|
@@ -175,9 +174,9 @@ declare module '@reportportal/client-javascript' {
|
|
|
175
174
|
*/
|
|
176
175
|
export interface LaunchOptions {
|
|
177
176
|
name?: string;
|
|
178
|
-
startTime?: string;
|
|
177
|
+
startTime?: string | number;
|
|
179
178
|
description?: string;
|
|
180
|
-
attributes?: Array<{ key
|
|
179
|
+
attributes?: Array<{ key?: string; value?: string } | string>;
|
|
181
180
|
mode?: string;
|
|
182
181
|
id?: string;
|
|
183
182
|
}
|
|
@@ -198,8 +197,8 @@ declare module '@reportportal/client-javascript' {
|
|
|
198
197
|
name: string;
|
|
199
198
|
type: string;
|
|
200
199
|
description?: string;
|
|
201
|
-
startTime?: string;
|
|
202
|
-
attributes?: Array<{ key
|
|
200
|
+
startTime?: string | number;
|
|
201
|
+
attributes?: Array<{ key?: string; value?: string } | string>;
|
|
203
202
|
hasStats?: boolean;
|
|
204
203
|
}
|
|
205
204
|
|
|
@@ -218,7 +217,7 @@ declare module '@reportportal/client-javascript' {
|
|
|
218
217
|
export interface LogOptions {
|
|
219
218
|
level?: string;
|
|
220
219
|
message?: string;
|
|
221
|
-
time?: string;
|
|
220
|
+
time?: string | number;
|
|
222
221
|
file?: {
|
|
223
222
|
name: string;
|
|
224
223
|
content: string;
|
|
@@ -239,11 +238,11 @@ declare module '@reportportal/client-javascript' {
|
|
|
239
238
|
*/
|
|
240
239
|
export interface FinishTestItemOptions {
|
|
241
240
|
status?: string;
|
|
242
|
-
endTime?: string;
|
|
241
|
+
endTime?: string | number;
|
|
243
242
|
issue?: {
|
|
244
243
|
issueType: string;
|
|
245
244
|
comment?: string;
|
|
246
|
-
externalSystemIssues?: Array<any
|
|
245
|
+
externalSystemIssues?: Array<any>;
|
|
247
246
|
};
|
|
248
247
|
}
|
|
249
248
|
|
|
@@ -258,7 +257,7 @@ declare module '@reportportal/client-javascript' {
|
|
|
258
257
|
* ```
|
|
259
258
|
*/
|
|
260
259
|
export interface FinishLaunchOptions {
|
|
261
|
-
endTime?: string;
|
|
260
|
+
endTime?: string | number;
|
|
262
261
|
status?: string;
|
|
263
262
|
}
|
|
264
263
|
|
|
@@ -269,7 +268,7 @@ declare module '@reportportal/client-javascript' {
|
|
|
269
268
|
/**
|
|
270
269
|
* Initializes a new Report Portal client.
|
|
271
270
|
*/
|
|
272
|
-
constructor(config: ReportPortalConfig);
|
|
271
|
+
constructor(config: ReportPortalConfig, agentInfo?: { name?: string; version?: string });
|
|
273
272
|
|
|
274
273
|
/**
|
|
275
274
|
* Starts a new launch.
|
|
@@ -306,7 +305,10 @@ declare module '@reportportal/client-javascript' {
|
|
|
306
305
|
* await launchFinishObj.promise;
|
|
307
306
|
* ```
|
|
308
307
|
*/
|
|
309
|
-
finishLaunch(
|
|
308
|
+
finishLaunch(
|
|
309
|
+
launchId: string,
|
|
310
|
+
options?: FinishLaunchOptions,
|
|
311
|
+
): { tempId: string; promise: Promise<any> };
|
|
310
312
|
|
|
311
313
|
/**
|
|
312
314
|
* Update the launch data
|
|
@@ -331,7 +333,10 @@ declare module '@reportportal/client-javascript' {
|
|
|
331
333
|
* await updateLaunch.promise;
|
|
332
334
|
* ```
|
|
333
335
|
*/
|
|
334
|
-
updateLaunch(
|
|
336
|
+
updateLaunch(
|
|
337
|
+
launchId: string,
|
|
338
|
+
options: LaunchOptions,
|
|
339
|
+
): { tempId: string; promise: Promise<any> };
|
|
335
340
|
|
|
336
341
|
/**
|
|
337
342
|
* Starts a new test item under a launch or parent item.
|
|
@@ -360,34 +365,47 @@ declare module '@reportportal/client-javascript' {
|
|
|
360
365
|
* }, launchObj.tempId, suiteObj.tempId);
|
|
361
366
|
* ```
|
|
362
367
|
*/
|
|
363
|
-
startTestItem(
|
|
368
|
+
startTestItem(
|
|
369
|
+
options: StartTestItemOptions,
|
|
370
|
+
launchId: string,
|
|
371
|
+
parentId?: string,
|
|
372
|
+
): {
|
|
364
373
|
tempId: string;
|
|
365
|
-
promise: Promise<any
|
|
374
|
+
promise: Promise<any>;
|
|
366
375
|
};
|
|
367
376
|
|
|
368
377
|
/**
|
|
369
378
|
* Finishes a test item.
|
|
370
379
|
* @example
|
|
371
380
|
* ```typescript
|
|
372
|
-
* rpClient.finishTestItem(itemObj.tempId, {
|
|
381
|
+
* const finishObj = rpClient.finishTestItem(itemObj.tempId, {
|
|
373
382
|
* status: 'failed'
|
|
374
383
|
* });
|
|
384
|
+
* await finishObj.promise;
|
|
375
385
|
* ```
|
|
376
386
|
*/
|
|
377
|
-
finishTestItem(
|
|
387
|
+
finishTestItem(
|
|
388
|
+
itemId: string,
|
|
389
|
+
options: FinishTestItemOptions,
|
|
390
|
+
): { tempId: string; promise: Promise<any> };
|
|
378
391
|
|
|
379
392
|
/**
|
|
380
393
|
* Sends a log entry to a test item.
|
|
381
394
|
* @example
|
|
382
395
|
* ```typescript
|
|
383
|
-
*
|
|
396
|
+
* const logObj = rpClient.sendLog(stepObj.tempId, {
|
|
384
397
|
* level: 'INFO',
|
|
385
398
|
* message: 'User clicks login button',
|
|
386
399
|
* time: rpClient.helpers.now()
|
|
387
400
|
* });
|
|
401
|
+
* await logObj.promise;
|
|
388
402
|
* ```
|
|
389
403
|
*/
|
|
390
|
-
sendLog(
|
|
404
|
+
sendLog(
|
|
405
|
+
itemId: string,
|
|
406
|
+
options: LogOptions,
|
|
407
|
+
file?: { name: string; content: string | Buffer; type: string },
|
|
408
|
+
): { tempId: string; promise: Promise<any> };
|
|
391
409
|
|
|
392
410
|
/**
|
|
393
411
|
* Waits for all test items to be finished.
|
|
@@ -419,7 +437,7 @@ declare module '@reportportal/client-javascript' {
|
|
|
419
437
|
* });
|
|
420
438
|
* ```
|
|
421
439
|
*/
|
|
422
|
-
now(): string
|
|
423
|
-
}
|
|
440
|
+
now(): string;
|
|
441
|
+
};
|
|
424
442
|
}
|
|
425
443
|
}
|