@opentap/runner-client 2.19.1-alpha.1.1 → 2.19.1-alpha.1.2
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/SessionClient.d.ts +2 -2
- package/lib/SessionClient.js +5 -5
- package/package.json +1 -1
package/lib/SessionClient.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Result, Resource, RunStatus, SessionEvent, Setting, TestPlan, TestRun, TestStepType, TestStepValidationError, WatchDog,
|
|
1
|
+
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Result, Resource, RunStatus, SessionEvent, Setting, TestPlan, TestRun, TestStepType, TestStepValidationError, WatchDog, TestStepRunEvent } 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 {
|
|
@@ -24,7 +24,7 @@ export declare class SessionClient extends BaseClient {
|
|
|
24
24
|
*/
|
|
25
25
|
connectSessionResults(resultHandler: (result: Result | undefined, err: NatsError | Error | null) => void, testRunHandler: (testRun: TestRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): [Subscription, Subscription];
|
|
26
26
|
connectTestStepRunStartedEvents(resultHandler: (result: Result | undefined, err: NatsError | Error | null) => void, testRunHandler: (testRun: TestRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): [Subscription, Subscription];
|
|
27
|
-
connectTestStepRunEvents(handler: (testRun:
|
|
27
|
+
connectTestStepRunEvents(testPlanRunId: string, testStepRunId: string, handler: (testRun: TestStepRunEvent | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): Subscription;
|
|
28
28
|
/**
|
|
29
29
|
* Unsubscibe from session events
|
|
30
30
|
*/
|
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, Result, RunStatus, SessionEvent, Setting, TestPlan, TestRun, TestStepType, TestStepValidationError, WatchDog,
|
|
27
|
+
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, Image, Interaction, ListItemType, LogList, Result, RunStatus, SessionEvent, Setting, TestPlan, TestRun, TestStepType, TestStepValidationError, WatchDog, TestStepRunEvent, } from './DTOs';
|
|
28
28
|
import { JSONCodec } from 'nats.ws';
|
|
29
29
|
import { BaseClient } from './BaseClient';
|
|
30
30
|
var SessionClient = /** @class */ (function (_super) {
|
|
@@ -154,16 +154,16 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
154
154
|
} })),
|
|
155
155
|
];
|
|
156
156
|
};
|
|
157
|
-
SessionClient.prototype.connectTestStepRunEvents = function (handler, options) {
|
|
158
|
-
return this.subscribe(
|
|
157
|
+
SessionClient.prototype.connectTestStepRunEvents = function (testPlanRunId, testStepRunId, handler, options) {
|
|
158
|
+
return this.subscribe("PlanRun.".concat(testPlanRunId, ".StepRun.").concat(testStepRunId), __assign(__assign({}, options), { callback: function (error, encodedMessage) {
|
|
159
159
|
if (error) {
|
|
160
160
|
handler(undefined, error);
|
|
161
161
|
return;
|
|
162
162
|
}
|
|
163
163
|
try {
|
|
164
164
|
var jsonCodec = JSONCodec();
|
|
165
|
-
var
|
|
166
|
-
var result =
|
|
165
|
+
var testStepRunEventJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
|
|
166
|
+
var result = TestStepRunEvent.fromJS(testStepRunEventJs);
|
|
167
167
|
handler(result, error);
|
|
168
168
|
}
|
|
169
169
|
catch (error) {
|