@opentap/runner-client 2.19.0-alpha.1.9 → 2.19.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/lib/DTOs.d.ts +16 -4
- package/lib/DTOs.js +38 -8
- package/lib/SessionClient.d.ts +5 -5
- package/lib/SessionClient.js +9 -9
- package/package.json +1 -1
package/lib/DTOs.d.ts
CHANGED
|
@@ -1205,22 +1205,34 @@ export declare class TestPlanSettingsChangedEventArgs extends SessionEvent imple
|
|
|
1205
1205
|
toJSON(data?: any): any;
|
|
1206
1206
|
}
|
|
1207
1207
|
export declare type ITestPlanSettingsChangedEventArgs = ISessionEvent;
|
|
1208
|
-
export interface
|
|
1208
|
+
export interface IOnTestPlanRun {
|
|
1209
|
+
status?: string;
|
|
1210
|
+
userId?: string;
|
|
1211
|
+
}
|
|
1212
|
+
export declare class OnTestPlanRun implements IOnTestPlanRun {
|
|
1213
|
+
status?: string;
|
|
1214
|
+
userId?: string;
|
|
1215
|
+
constructor(data?: IOnTestPlanRun);
|
|
1216
|
+
init(_data?: any): void;
|
|
1217
|
+
static fromJS(data: any): OnTestPlanRun;
|
|
1218
|
+
toJSON(data?: any): any;
|
|
1219
|
+
}
|
|
1220
|
+
export interface IOnTestStepRun {
|
|
1209
1221
|
status?: string;
|
|
1210
1222
|
stepId?: string;
|
|
1211
1223
|
parentRunId?: string;
|
|
1212
1224
|
verdict?: string;
|
|
1213
1225
|
duration?: string;
|
|
1214
1226
|
}
|
|
1215
|
-
export declare class
|
|
1227
|
+
export declare class OnTestStepRun implements IOnTestStepRun {
|
|
1216
1228
|
status?: string;
|
|
1217
1229
|
stepId?: string;
|
|
1218
1230
|
parentRunId?: string;
|
|
1219
1231
|
verdict?: string;
|
|
1220
1232
|
duration?: string;
|
|
1221
|
-
constructor(data?:
|
|
1233
|
+
constructor(data?: IOnTestStepRun);
|
|
1222
1234
|
init(_data?: any): void;
|
|
1223
|
-
static fromJS(data: any):
|
|
1235
|
+
static fromJS(data: any): OnTestStepRun;
|
|
1224
1236
|
toJSON(data?: any): any;
|
|
1225
1237
|
}
|
|
1226
1238
|
export interface ITestStepRunEvent {
|
package/lib/DTOs.js
CHANGED
|
@@ -3507,8 +3507,8 @@ var TestPlanSettingsChangedEventArgs = /** @class */ (function (_super) {
|
|
|
3507
3507
|
return TestPlanSettingsChangedEventArgs;
|
|
3508
3508
|
}(SessionEvent));
|
|
3509
3509
|
export { TestPlanSettingsChangedEventArgs };
|
|
3510
|
-
var
|
|
3511
|
-
function
|
|
3510
|
+
var OnTestPlanRun = /** @class */ (function () {
|
|
3511
|
+
function OnTestPlanRun(data) {
|
|
3512
3512
|
if (data) {
|
|
3513
3513
|
for (var property in data) {
|
|
3514
3514
|
if (Object.prototype.hasOwnProperty.call(data, property))
|
|
@@ -3516,7 +3516,37 @@ var TestStepRunStatusEvent = /** @class */ (function () {
|
|
|
3516
3516
|
}
|
|
3517
3517
|
}
|
|
3518
3518
|
}
|
|
3519
|
-
|
|
3519
|
+
OnTestPlanRun.prototype.init = function (_data) {
|
|
3520
|
+
if (_data) {
|
|
3521
|
+
this.status = _data['Status'];
|
|
3522
|
+
this.userId = _data['UserId'];
|
|
3523
|
+
}
|
|
3524
|
+
};
|
|
3525
|
+
OnTestPlanRun.fromJS = function (data) {
|
|
3526
|
+
data = typeof data === 'object' ? data : {};
|
|
3527
|
+
var result = new OnTestPlanRun();
|
|
3528
|
+
result.init(data);
|
|
3529
|
+
return result;
|
|
3530
|
+
};
|
|
3531
|
+
OnTestPlanRun.prototype.toJSON = function (data) {
|
|
3532
|
+
data = typeof data === 'object' ? data : {};
|
|
3533
|
+
data['Status'] = this.status;
|
|
3534
|
+
data['UserId'] = this.userId;
|
|
3535
|
+
return data;
|
|
3536
|
+
};
|
|
3537
|
+
return OnTestPlanRun;
|
|
3538
|
+
}());
|
|
3539
|
+
export { OnTestPlanRun };
|
|
3540
|
+
var OnTestStepRun = /** @class */ (function () {
|
|
3541
|
+
function OnTestStepRun(data) {
|
|
3542
|
+
if (data) {
|
|
3543
|
+
for (var property in data) {
|
|
3544
|
+
if (Object.prototype.hasOwnProperty.call(data, property))
|
|
3545
|
+
this[property] = data[property];
|
|
3546
|
+
}
|
|
3547
|
+
}
|
|
3548
|
+
}
|
|
3549
|
+
OnTestStepRun.prototype.init = function (_data) {
|
|
3520
3550
|
if (_data) {
|
|
3521
3551
|
this.status = _data['Status'];
|
|
3522
3552
|
this.stepId = _data['StepId'];
|
|
@@ -3525,13 +3555,13 @@ var TestStepRunStatusEvent = /** @class */ (function () {
|
|
|
3525
3555
|
this.duration = _data['Duration'];
|
|
3526
3556
|
}
|
|
3527
3557
|
};
|
|
3528
|
-
|
|
3558
|
+
OnTestStepRun.fromJS = function (data) {
|
|
3529
3559
|
data = typeof data === 'object' ? data : {};
|
|
3530
|
-
var result = new
|
|
3560
|
+
var result = new OnTestStepRun();
|
|
3531
3561
|
result.init(data);
|
|
3532
3562
|
return result;
|
|
3533
3563
|
};
|
|
3534
|
-
|
|
3564
|
+
OnTestStepRun.prototype.toJSON = function (data) {
|
|
3535
3565
|
data = typeof data === 'object' ? data : {};
|
|
3536
3566
|
data['Status'] = this.status;
|
|
3537
3567
|
data['StepId'] = this.stepId;
|
|
@@ -3540,9 +3570,9 @@ var TestStepRunStatusEvent = /** @class */ (function () {
|
|
|
3540
3570
|
data['Duration'] = this.duration;
|
|
3541
3571
|
return data;
|
|
3542
3572
|
};
|
|
3543
|
-
return
|
|
3573
|
+
return OnTestStepRun;
|
|
3544
3574
|
}());
|
|
3545
|
-
export {
|
|
3575
|
+
export { OnTestStepRun };
|
|
3546
3576
|
var TestStepRunEvent = /** @class */ (function () {
|
|
3547
3577
|
function TestStepRunEvent(data) {
|
|
3548
3578
|
if (data) {
|
package/lib/SessionClient.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SessionEvent, Setting, TestPlan,
|
|
1
|
+
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, OnTestPlanRun, OnTestStepRun, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SessionEvent, Setting, TestPlan, TestRun, TestStepType, TestStepValidationError, WatchDog } from './DTOs';
|
|
2
2
|
import { ConnectionOptions, NatsError, Subscription, SubscriptionOptions } from 'nats.ws';
|
|
3
3
|
import { BaseClient } from './BaseClient';
|
|
4
4
|
export declare class SessionClient extends BaseClient {
|
|
@@ -32,11 +32,11 @@ export declare class SessionClient extends BaseClient {
|
|
|
32
32
|
/**
|
|
33
33
|
* Connect to listen to the TestPlanRun events for the given test plan run ID.
|
|
34
34
|
* @param {string} testPlanRunId
|
|
35
|
-
* @param {(event:
|
|
35
|
+
* @param {(event:OnTestPlanRun|undefined,err:NatsError|Error|null)=>void} handler
|
|
36
36
|
* @param {SubscriptionOptions} options?
|
|
37
37
|
* @returns Subscription
|
|
38
38
|
*/
|
|
39
|
-
connectTestPlanRunEvents(testPlanRunId: string, handler: (event:
|
|
39
|
+
connectTestPlanRunEvents(testPlanRunId: string, handler: (event: OnTestPlanRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): Subscription;
|
|
40
40
|
/**
|
|
41
41
|
* Connect to listen to the test plan run logs for the given test plan run ID
|
|
42
42
|
* @param {string} testPlanRunId
|
|
@@ -57,11 +57,11 @@ export declare class SessionClient extends BaseClient {
|
|
|
57
57
|
* Connect to listen to the test step run events for the given test step and test plan run ID
|
|
58
58
|
* @param {string} testPlanRunId
|
|
59
59
|
* @param {string} testStepRunId
|
|
60
|
-
* @param {(testRun:
|
|
60
|
+
* @param {(testRun:OnTestStepRun|undefined,err:NatsError|Error|null)=>void} handler
|
|
61
61
|
* @param {SubscriptionOptions} options?
|
|
62
62
|
* @returns Subscription
|
|
63
63
|
*/
|
|
64
|
-
connectTestStepRunEvents(testPlanRunId: string, testStepRunId: string, handler: (testStepRunId: string | undefined, testRun:
|
|
64
|
+
connectTestStepRunEvents(testPlanRunId: string, testStepRunId: string, handler: (testStepRunId: string | undefined, testRun: OnTestStepRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): Subscription;
|
|
65
65
|
/**
|
|
66
66
|
* Connect to listen to the test step run parameters for the given test step and test plan run ID
|
|
67
67
|
* @param {string} testPlanRunId
|
package/lib/SessionClient.js
CHANGED
|
@@ -24,7 +24,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
24
24
|
};
|
|
25
25
|
return __assign.apply(this, arguments);
|
|
26
26
|
};
|
|
27
|
-
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, Parameter, Result, RunStatus, SessionEvent, Setting, TestPlan,
|
|
27
|
+
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, OnTestPlanRun, OnTestStepRun, Parameter, Result, RunStatus, SessionEvent, Setting, TestPlan, TestRun, TestStepType, TestStepValidationError, WatchDog, } from './DTOs';
|
|
28
28
|
import { JSONCodec } from 'nats.ws';
|
|
29
29
|
import { BaseClient } from './BaseClient';
|
|
30
30
|
var SessionClient = /** @class */ (function (_super) {
|
|
@@ -145,7 +145,7 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
145
145
|
/**
|
|
146
146
|
* Connect to listen to the TestPlanRun events for the given test plan run ID.
|
|
147
147
|
* @param {string} testPlanRunId
|
|
148
|
-
* @param {(event:
|
|
148
|
+
* @param {(event:OnTestPlanRun|undefined,err:NatsError|Error|null)=>void} handler
|
|
149
149
|
* @param {SubscriptionOptions} options?
|
|
150
150
|
* @returns Subscription
|
|
151
151
|
*/
|
|
@@ -157,9 +157,9 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
157
157
|
}
|
|
158
158
|
try {
|
|
159
159
|
var jsonCodec = JSONCodec();
|
|
160
|
-
var
|
|
161
|
-
var
|
|
162
|
-
handler(
|
|
160
|
+
var onTestPlanRunJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
|
|
161
|
+
var onTestPlanRun = OnTestPlanRun.fromJS(onTestPlanRunJs);
|
|
162
|
+
handler(onTestPlanRun, error);
|
|
163
163
|
}
|
|
164
164
|
catch (error) {
|
|
165
165
|
handler(undefined, error);
|
|
@@ -218,7 +218,7 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
218
218
|
* Connect to listen to the test step run events for the given test step and test plan run ID
|
|
219
219
|
* @param {string} testPlanRunId
|
|
220
220
|
* @param {string} testStepRunId
|
|
221
|
-
* @param {(testRun:
|
|
221
|
+
* @param {(testRun:OnTestStepRun|undefined,err:NatsError|Error|null)=>void} handler
|
|
222
222
|
* @param {SubscriptionOptions} options?
|
|
223
223
|
* @returns Subscription
|
|
224
224
|
*/
|
|
@@ -231,10 +231,10 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
231
231
|
}
|
|
232
232
|
try {
|
|
233
233
|
var jsonCodec = JSONCodec();
|
|
234
|
-
var
|
|
235
|
-
var
|
|
234
|
+
var onTestStepRunJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
|
|
235
|
+
var onTestStepRun = OnTestStepRun.fromJS(onTestStepRunJs);
|
|
236
236
|
var stepRunId = (_a = encodedMessage.subject.match(/\.StepRun\.(.+)$/)) === null || _a === void 0 ? void 0 : _a[1];
|
|
237
|
-
handler(stepRunId,
|
|
237
|
+
handler(stepRunId, onTestStepRun, error);
|
|
238
238
|
}
|
|
239
239
|
catch (error) {
|
|
240
240
|
handler(undefined, undefined, error);
|