@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.
@@ -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, TestStepRun } from './DTOs';
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: TestStepRun | undefined, err: NatsError | Error | null) => void, options?: SubscriptionOptions): Subscription;
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
  */
@@ -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, TestStepRun, } from './DTOs';
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('PlanRun.*.StepRun.*', __assign(__assign({}, options), { callback: function (error, encodedMessage) {
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 testStepRunJs = jsonCodec.decode(encodedMessage === null || encodedMessage === void 0 ? void 0 : encodedMessage.data);
166
- var result = TestStepRun.fromJS(testStepRunJs);
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentap/runner-client",
3
- "version": "2.19.1-alpha.1.1",
3
+ "version": "2.19.1-alpha.1.2",
4
4
  "description": "This is the web client for the OpenTAP Runner.",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",