@opentap/runner-client 2.40.0 → 2.41.0-alpha.1.2.19163408636
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/dist/cjs/DTOs.d.ts +21 -2
- package/dist/cjs/DTOs.js +55 -6
- package/dist/cjs/SessionClient.d.ts +49 -1
- package/dist/cjs/SessionClient.js +79 -1
- package/dist/mjs/DTOs.d.ts +21 -2
- package/dist/mjs/DTOs.js +49 -3
- package/dist/mjs/SessionClient.d.ts +49 -1
- package/dist/mjs/SessionClient.js +80 -2
- package/package.json +1 -1
package/dist/cjs/DTOs.d.ts
CHANGED
|
@@ -824,6 +824,20 @@ export interface IRunStatus {
|
|
|
824
824
|
sessionState?: SessionState;
|
|
825
825
|
executingSteps?: string[] | undefined;
|
|
826
826
|
}
|
|
827
|
+
export declare class EditStatus implements IEditStatus {
|
|
828
|
+
undoBufferSize?: number;
|
|
829
|
+
redoBufferSize?: number;
|
|
830
|
+
testPlanDirty?: boolean;
|
|
831
|
+
constructor(data?: IEditStatus);
|
|
832
|
+
init(_data?: any): void;
|
|
833
|
+
static fromJS(data: any): EditStatus;
|
|
834
|
+
toJSON(data?: any): any;
|
|
835
|
+
}
|
|
836
|
+
export interface IEditStatus {
|
|
837
|
+
undoBufferSize?: number;
|
|
838
|
+
redoBufferSize?: number;
|
|
839
|
+
testPlanDirty?: boolean;
|
|
840
|
+
}
|
|
827
841
|
/** Enumeration containing the verdict types used for Verdict and Verdict properties. */
|
|
828
842
|
export declare enum Verdict {
|
|
829
843
|
NotSet = "NotSet",
|
|
@@ -1205,8 +1219,13 @@ export declare class StoppedEvent extends SessionEvent {
|
|
|
1205
1219
|
static fromJS(): StoppedEvent;
|
|
1206
1220
|
}
|
|
1207
1221
|
export declare class TestPlanChangedEvent extends SessionEvent {
|
|
1208
|
-
|
|
1209
|
-
|
|
1222
|
+
editStatus?: EditStatus;
|
|
1223
|
+
constructor(data?: {
|
|
1224
|
+
editStatus?: EditStatus;
|
|
1225
|
+
});
|
|
1226
|
+
init(_data: any): void;
|
|
1227
|
+
static fromJS(data: any): TestPlanChangedEvent;
|
|
1228
|
+
toJSON(data?: any): any;
|
|
1210
1229
|
}
|
|
1211
1230
|
export declare class SessionStateChangedEvent extends SessionEvent {
|
|
1212
1231
|
runStatus?: RunStatus | undefined;
|
package/dist/cjs/DTOs.js
CHANGED
|
@@ -16,8 +16,8 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
18
|
exports.SessionStartInitiated = exports.SessionEventArgs = exports.SettingsTapPackage = exports.RepositorySettingsPackageDefinition = exports.RepositoryPackageDefinition = exports.RepositoryPackageReference = exports.ProfileGroup = exports.ListItemType = exports.ComponentSettings = exports.FileDescriptor = exports.Resource = exports.PluginTypeSelectorControl = exports.PictureControl = exports.PasswordControl = exports.MultiSelectControl = exports.DropdownControl = exports.EnabledControl = exports.DirectoryPathControl = exports.FilePathControl = exports.ComboBoxControl = exports.TextBoxControl = exports.DataGridControl = exports.DataGridReferenceControl = exports.CheckBoxControl = exports.AvailableValue = exports.ButtonsControl = exports.ButtonControl = exports.ExternalParameter = exports.MetaData = exports.DisplayAttribute = exports.VisualStatus = exports.UnitAttribute = exports.Icon = exports.ColumnDisplayName = exports.LayoutMode = exports.Layout = exports.Setting = exports.ComponentSettingsListItem = exports.AnnotatedObject = exports.ComponentSettingsList = exports.DisplayMode = exports.ComponentSettingsIdentifier = exports.ComponentSettingsBase = exports.Links = exports.Session = exports.ImageResolveErrorResponse = exports.NoResponderError = exports.ErrorResponse = exports.PackageSpecifier = exports.Image = void 0;
|
|
19
|
-
exports.
|
|
20
|
-
exports.RunnerStatus = exports.StreamInfoStatus = exports.RemoteConnection = exports.SaveDefaultSettings = exports.AssetUpdatedEvent = exports.MetadataUpdatedEvent = exports.RunnerDeletedEvent = exports.RunnerUpdatedEvent = exports.RunnerRegisteredEvent = exports.RunnerEvent = exports.TestPlanRunCompletedEvent = exports.TestPlanRunStartEvent = exports.TestPlanRunEvent = exports.OnTestStepRun = exports.OnTestPlanRun = exports.UserInputRequestCompletedEvent = exports.UserInputRequestedEvent = exports.BreakEvent = exports.TestStepChangedEvent = exports.SettingsChangedEvent = exports.HeartbeatEvent = exports.SessionStateChangedEvent = void 0;
|
|
19
|
+
exports.StoppedEvent = exports.StoppingEvent = exports.StartedEvent = exports.StartingEvent = exports.SessionTimeoutEvent = exports.TestPlanSettingsChangedEvent = exports.TypeCacheInvalidatedEvent = exports.SessionEvent = exports.SessionEventName = exports.MetricValue = exports.MetricsConfiguration = exports.SessionMetricInfo = exports.MetricsPollRate = exports.SessionMetricType = exports.SessionMetricKind = exports.ResultColumn = exports.Result = exports.LogEvent = exports.TestStepRun = exports.WatchDog = exports.Parameter = exports.BreakPoints = exports.InstalledFile = exports.Interaction = exports.CommonContext = exports.CommonSettings = exports.ValidationError = exports.TestStepValidationError = exports.TestStepCopy = exports.TestStepType = exports.TestStep = exports.TestPlan = exports.SessionState = exports.Verdict = exports.EditStatus = exports.RunStatus = exports.MissingLicenseResponse = exports.LogEntry = exports.LogList = exports.ApiException = exports.ImageCreationFailed = exports.ImageCreated = exports.ImageCreating = exports.ImageEventArgs = exports.SessionInactivityLimitHit = exports.SessionShutdownFailed = exports.SessionShutdown = exports.SessionShutdownInitiated = exports.SessionStartFailed = exports.SessionStarted = void 0;
|
|
20
|
+
exports.RunnerStatus = exports.StreamInfoStatus = exports.RemoteConnection = exports.SaveDefaultSettings = exports.AssetUpdatedEvent = exports.MetadataUpdatedEvent = exports.RunnerDeletedEvent = exports.RunnerUpdatedEvent = exports.RunnerRegisteredEvent = exports.RunnerEvent = exports.TestPlanRunCompletedEvent = exports.TestPlanRunStartEvent = exports.TestPlanRunEvent = exports.OnTestStepRun = exports.OnTestPlanRun = exports.UserInputRequestCompletedEvent = exports.UserInputRequestedEvent = exports.BreakEvent = exports.TestStepChangedEvent = exports.SettingsChangedEvent = exports.HeartbeatEvent = exports.SessionStateChangedEvent = exports.TestPlanChangedEvent = void 0;
|
|
21
21
|
var Image = /** @class */ (function () {
|
|
22
22
|
function Image(data) {
|
|
23
23
|
this.packages = [];
|
|
@@ -2333,6 +2333,39 @@ var RunStatus = /** @class */ (function () {
|
|
|
2333
2333
|
return RunStatus;
|
|
2334
2334
|
}());
|
|
2335
2335
|
exports.RunStatus = RunStatus;
|
|
2336
|
+
var EditStatus = /** @class */ (function () {
|
|
2337
|
+
function EditStatus(data) {
|
|
2338
|
+
if (data) {
|
|
2339
|
+
for (var property in data) {
|
|
2340
|
+
if (Object.prototype.hasOwnProperty.call(data, property)) {
|
|
2341
|
+
this[property] = data[property];
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
EditStatus.prototype.init = function (_data) {
|
|
2347
|
+
if (_data) {
|
|
2348
|
+
this.undoBufferSize = _data['UndoBufferSize'];
|
|
2349
|
+
this.redoBufferSize = _data['RedoBufferSize'];
|
|
2350
|
+
this.testPlanDirty = _data['TestPlanDirty'];
|
|
2351
|
+
}
|
|
2352
|
+
};
|
|
2353
|
+
EditStatus.fromJS = function (data) {
|
|
2354
|
+
data = typeof data === 'object' ? data : {};
|
|
2355
|
+
var result = new EditStatus();
|
|
2356
|
+
result.init(data);
|
|
2357
|
+
return result;
|
|
2358
|
+
};
|
|
2359
|
+
EditStatus.prototype.toJSON = function (data) {
|
|
2360
|
+
data = typeof data === 'object' ? data : {};
|
|
2361
|
+
data['UndoBufferSize'] = this.undoBufferSize;
|
|
2362
|
+
data['RedoBufferSize'] = this.redoBufferSize;
|
|
2363
|
+
data['TestPlanDirty'] = this.testPlanDirty;
|
|
2364
|
+
return data;
|
|
2365
|
+
};
|
|
2366
|
+
return EditStatus;
|
|
2367
|
+
}());
|
|
2368
|
+
exports.EditStatus = EditStatus;
|
|
2336
2369
|
/** Enumeration containing the verdict types used for Verdict and Verdict properties. */
|
|
2337
2370
|
var Verdict;
|
|
2338
2371
|
(function (Verdict) {
|
|
@@ -3322,11 +3355,27 @@ var StoppedEvent = /** @class */ (function (_super) {
|
|
|
3322
3355
|
exports.StoppedEvent = StoppedEvent;
|
|
3323
3356
|
var TestPlanChangedEvent = /** @class */ (function (_super) {
|
|
3324
3357
|
__extends(TestPlanChangedEvent, _super);
|
|
3325
|
-
function TestPlanChangedEvent() {
|
|
3326
|
-
|
|
3358
|
+
function TestPlanChangedEvent(data) {
|
|
3359
|
+
var _this = _super.call(this, SessionEventName.TestPlanChanged) || this;
|
|
3360
|
+
if (data === null || data === void 0 ? void 0 : data.editStatus) {
|
|
3361
|
+
_this.editStatus = data.editStatus;
|
|
3362
|
+
}
|
|
3363
|
+
return _this;
|
|
3327
3364
|
}
|
|
3328
|
-
TestPlanChangedEvent.
|
|
3329
|
-
|
|
3365
|
+
TestPlanChangedEvent.prototype.init = function (_data) {
|
|
3366
|
+
var data = ensureObject(_data);
|
|
3367
|
+
var payload = data['EditStatus'];
|
|
3368
|
+
this.editStatus = payload ? EditStatus.fromJS(payload) : undefined;
|
|
3369
|
+
};
|
|
3370
|
+
TestPlanChangedEvent.fromJS = function (data) {
|
|
3371
|
+
var result = new TestPlanChangedEvent();
|
|
3372
|
+
result.init(data);
|
|
3373
|
+
return result;
|
|
3374
|
+
};
|
|
3375
|
+
TestPlanChangedEvent.prototype.toJSON = function (data) {
|
|
3376
|
+
var json = ensureObject(data);
|
|
3377
|
+
json['EditStatus'] = this.editStatus ? this.editStatus.toJSON() : undefined;
|
|
3378
|
+
return json;
|
|
3330
3379
|
};
|
|
3331
3380
|
return TestPlanChangedEvent;
|
|
3332
3381
|
}(SessionEvent));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, IMetricsConfiguration, Image, Interaction, ListItemType, LogList, MetricsConfiguration, OnTestPlanRun, OnTestStepRun, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SessionEvent, SessionEventName, Setting, TestPlan, TestStepType, TestStepValidationError, WatchDog } from './DTOs';
|
|
1
|
+
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, IMetricsConfiguration, Image, Interaction, ListItemType, LogList, MetricsConfiguration, OnTestPlanRun, OnTestStepRun, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SessionEvent, SessionEventName, Setting, TestPlan, TestStepType, TestStepValidationError, WatchDog, EditStatus } 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 {
|
|
@@ -115,6 +115,11 @@ export declare class SessionClient extends BaseClient {
|
|
|
115
115
|
* @return RunStatus retrieved
|
|
116
116
|
*/
|
|
117
117
|
getStatus(timeout: number | null | undefined): Promise<RunStatus>;
|
|
118
|
+
/**
|
|
119
|
+
* Get edit status that contains undo/redo buffer count and testplan dirty status
|
|
120
|
+
* @returns EditStatus retrieved
|
|
121
|
+
*/
|
|
122
|
+
getEditStatus(): Promise<EditStatus>;
|
|
118
123
|
/**
|
|
119
124
|
* Upload test plan XML
|
|
120
125
|
* @param xml Test Plan XML
|
|
@@ -131,6 +136,49 @@ export declare class SessionClient extends BaseClient {
|
|
|
131
136
|
* @return Raw bytes representing the resource
|
|
132
137
|
*/
|
|
133
138
|
downloadResource(resource: Resource): Promise<Uint8Array>;
|
|
139
|
+
/**
|
|
140
|
+
* Moves the test steps as children of target step
|
|
141
|
+
* @param TargetStepId target test step id
|
|
142
|
+
* @param StepIds test steps ids to move
|
|
143
|
+
*/
|
|
144
|
+
moveStepsAsChildren(targetStepId: string, StepIds: string[]): void;
|
|
145
|
+
/**
|
|
146
|
+
* Moves the test steps as sibling of target step
|
|
147
|
+
* @param TargetStepId target test step id
|
|
148
|
+
* @param StepIds test steps ids to move
|
|
149
|
+
*/
|
|
150
|
+
moveSteps(targetStepId: string, StepIds: string[]): void;
|
|
151
|
+
/**
|
|
152
|
+
* Copy test steps
|
|
153
|
+
* @param stepIds test step ids to copy
|
|
154
|
+
* @return copied steps
|
|
155
|
+
*/
|
|
156
|
+
copySteps(StepIds: string[]): Promise<string>;
|
|
157
|
+
/**
|
|
158
|
+
* Paste copied test steps as sibling of target step
|
|
159
|
+
* @param TargetStepId target test step id
|
|
160
|
+
* @param Clipboard test steps copied to clipboard
|
|
161
|
+
*/
|
|
162
|
+
pasteStepsAsChildren(targetStepId: string, Clipboard: string): void;
|
|
163
|
+
/**
|
|
164
|
+
* Paste copied test steps as sibling of target step
|
|
165
|
+
* @param TargetStepId target test step id
|
|
166
|
+
* @param Clipboard test steps copied to clipboard
|
|
167
|
+
*/
|
|
168
|
+
pasteSteps(targetStepId: string, Clipboard: string): void;
|
|
169
|
+
/**
|
|
170
|
+
* Delete test steps
|
|
171
|
+
* @param stepIds test step ids to delete
|
|
172
|
+
*/
|
|
173
|
+
deleteSteps(StepIds: string[]): void;
|
|
174
|
+
/**
|
|
175
|
+
* Undo
|
|
176
|
+
*/
|
|
177
|
+
testPlanUndo(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Redo
|
|
180
|
+
*/
|
|
181
|
+
testPlanRedo(): void;
|
|
134
182
|
/**
|
|
135
183
|
* Load test plan using a test plan TapPackage from a repository
|
|
136
184
|
* @param {RepositoryPackageDefinition} packageReference
|
|
@@ -31,6 +31,7 @@ exports.SessionClient = void 0;
|
|
|
31
31
|
var DTOs_1 = require("./DTOs");
|
|
32
32
|
var BaseClient_1 = require("./BaseClient");
|
|
33
33
|
var encoders_1 = require("./encoders");
|
|
34
|
+
var uuid_1 = require("uuid");
|
|
34
35
|
var SessionClient = /** @class */ (function (_super) {
|
|
35
36
|
__extends(SessionClient, _super);
|
|
36
37
|
function SessionClient(baseSubject, options) {
|
|
@@ -318,6 +319,16 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
318
319
|
.then(this.success())
|
|
319
320
|
.catch(this.error());
|
|
320
321
|
};
|
|
322
|
+
/**
|
|
323
|
+
* Get edit status that contains undo/redo buffer count and testplan dirty status
|
|
324
|
+
* @returns EditStatus retrieved
|
|
325
|
+
*/
|
|
326
|
+
SessionClient.prototype.getEditStatus = function () {
|
|
327
|
+
return this.request('GetEditStatus')
|
|
328
|
+
.then(function (editStatusJs) { return DTOs_1.EditStatus.fromJS(editStatusJs); })
|
|
329
|
+
.then(this.success())
|
|
330
|
+
.catch(this.error());
|
|
331
|
+
};
|
|
321
332
|
/**
|
|
322
333
|
* Upload test plan XML
|
|
323
334
|
* @param xml Test Plan XML
|
|
@@ -349,6 +360,73 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
349
360
|
.then(this.success())
|
|
350
361
|
.catch(this.error());
|
|
351
362
|
};
|
|
363
|
+
/**
|
|
364
|
+
* Moves the test steps as children of target step
|
|
365
|
+
* @param TargetStepId target test step id
|
|
366
|
+
* @param StepIds test steps ids to move
|
|
367
|
+
*/
|
|
368
|
+
SessionClient.prototype.moveStepsAsChildren = function (targetStepId, StepIds) {
|
|
369
|
+
// need to send GUID.EMPTY if target step id is empty, so that runner can parse correctly
|
|
370
|
+
var TargetStepId = targetStepId ? targetStepId : uuid_1.NIL;
|
|
371
|
+
this.request('MoveStepsAsChildren', { StepIds: StepIds, TargetStepId: TargetStepId }).then(this.success()).catch(this.error());
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* Moves the test steps as sibling of target step
|
|
375
|
+
* @param TargetStepId target test step id
|
|
376
|
+
* @param StepIds test steps ids to move
|
|
377
|
+
*/
|
|
378
|
+
SessionClient.prototype.moveSteps = function (targetStepId, StepIds) {
|
|
379
|
+
// need to send GUID.EMPTY if target step id is empty, so that runner can parse correctly
|
|
380
|
+
var TargetStepId = targetStepId ? targetStepId : uuid_1.NIL;
|
|
381
|
+
this.request('MoveSteps', { StepIds: StepIds, TargetStepId: TargetStepId }).then(this.success()).catch(this.error());
|
|
382
|
+
};
|
|
383
|
+
/**
|
|
384
|
+
* Copy test steps
|
|
385
|
+
* @param stepIds test step ids to copy
|
|
386
|
+
* @return copied steps
|
|
387
|
+
*/
|
|
388
|
+
SessionClient.prototype.copySteps = function (StepIds) {
|
|
389
|
+
return this.request('CopySteps', { StepIds: StepIds }).then(this.success()).catch(this.error());
|
|
390
|
+
};
|
|
391
|
+
/**
|
|
392
|
+
* Paste copied test steps as sibling of target step
|
|
393
|
+
* @param TargetStepId target test step id
|
|
394
|
+
* @param Clipboard test steps copied to clipboard
|
|
395
|
+
*/
|
|
396
|
+
SessionClient.prototype.pasteStepsAsChildren = function (targetStepId, Clipboard) {
|
|
397
|
+
// need to send GUID.EMPTY if target step id is empty, so that runner can parse correctly
|
|
398
|
+
var TargetStepId = targetStepId ? targetStepId : uuid_1.NIL;
|
|
399
|
+
this.request('PasteStepsAsChildren', { TargetStepId: TargetStepId, Clipboard: Clipboard }).then(this.success()).catch(this.error());
|
|
400
|
+
};
|
|
401
|
+
/**
|
|
402
|
+
* Paste copied test steps as sibling of target step
|
|
403
|
+
* @param TargetStepId target test step id
|
|
404
|
+
* @param Clipboard test steps copied to clipboard
|
|
405
|
+
*/
|
|
406
|
+
SessionClient.prototype.pasteSteps = function (targetStepId, Clipboard) {
|
|
407
|
+
// need to send GUID.EMPTY if target step id is empty, so that runner can parse correctly
|
|
408
|
+
var TargetStepId = targetStepId ? targetStepId : uuid_1.NIL;
|
|
409
|
+
this.request('PasteSteps', { TargetStepId: TargetStepId, Clipboard: Clipboard }).then(this.success()).catch(this.error());
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* Delete test steps
|
|
413
|
+
* @param stepIds test step ids to delete
|
|
414
|
+
*/
|
|
415
|
+
SessionClient.prototype.deleteSteps = function (StepIds) {
|
|
416
|
+
this.request('DeleteSteps', { StepIds: StepIds }).then(this.success()).catch(this.error());
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* Undo
|
|
420
|
+
*/
|
|
421
|
+
SessionClient.prototype.testPlanUndo = function () {
|
|
422
|
+
this.request('TestPlanUndo').then(this.success()).catch(this.error());
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
* Redo
|
|
426
|
+
*/
|
|
427
|
+
SessionClient.prototype.testPlanRedo = function () {
|
|
428
|
+
this.request('TestPlanRedo').then(this.success()).catch(this.error());
|
|
429
|
+
};
|
|
352
430
|
/**
|
|
353
431
|
* Load test plan using a test plan TapPackage from a repository
|
|
354
432
|
* @param {RepositoryPackageDefinition} packageReference
|
|
@@ -748,7 +826,7 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
748
826
|
_a[DTOs_1.SessionEventName.Heartbeat] = function (payload) { return DTOs_1.HeartbeatEvent.fromJS(payload); },
|
|
749
827
|
_a[DTOs_1.SessionEventName.Stopping] = function () { return DTOs_1.StoppingEvent.fromJS(); },
|
|
750
828
|
_a[DTOs_1.SessionEventName.Stopped] = function () { return DTOs_1.StoppedEvent.fromJS(); },
|
|
751
|
-
_a[DTOs_1.SessionEventName.TestPlanChanged] = function () { return DTOs_1.TestPlanChangedEvent.fromJS(); },
|
|
829
|
+
_a[DTOs_1.SessionEventName.TestPlanChanged] = function (payload) { return DTOs_1.TestPlanChangedEvent.fromJS(payload); },
|
|
752
830
|
_a[DTOs_1.SessionEventName.SessionStateChanged] = function (payload) { return DTOs_1.SessionStateChangedEvent.fromJS(payload); },
|
|
753
831
|
_a[DTOs_1.SessionEventName.SettingsChanged] = function (payload) { return DTOs_1.SettingsChangedEvent.fromJS(payload); },
|
|
754
832
|
_a[DTOs_1.SessionEventName.TestStepChanged] = function (payload) { return DTOs_1.TestStepChangedEvent.fromJS(payload); },
|
package/dist/mjs/DTOs.d.ts
CHANGED
|
@@ -824,6 +824,20 @@ export interface IRunStatus {
|
|
|
824
824
|
sessionState?: SessionState;
|
|
825
825
|
executingSteps?: string[] | undefined;
|
|
826
826
|
}
|
|
827
|
+
export declare class EditStatus implements IEditStatus {
|
|
828
|
+
undoBufferSize?: number;
|
|
829
|
+
redoBufferSize?: number;
|
|
830
|
+
testPlanDirty?: boolean;
|
|
831
|
+
constructor(data?: IEditStatus);
|
|
832
|
+
init(_data?: any): void;
|
|
833
|
+
static fromJS(data: any): EditStatus;
|
|
834
|
+
toJSON(data?: any): any;
|
|
835
|
+
}
|
|
836
|
+
export interface IEditStatus {
|
|
837
|
+
undoBufferSize?: number;
|
|
838
|
+
redoBufferSize?: number;
|
|
839
|
+
testPlanDirty?: boolean;
|
|
840
|
+
}
|
|
827
841
|
/** Enumeration containing the verdict types used for Verdict and Verdict properties. */
|
|
828
842
|
export declare enum Verdict {
|
|
829
843
|
NotSet = "NotSet",
|
|
@@ -1205,8 +1219,13 @@ export declare class StoppedEvent extends SessionEvent {
|
|
|
1205
1219
|
static fromJS(): StoppedEvent;
|
|
1206
1220
|
}
|
|
1207
1221
|
export declare class TestPlanChangedEvent extends SessionEvent {
|
|
1208
|
-
|
|
1209
|
-
|
|
1222
|
+
editStatus?: EditStatus;
|
|
1223
|
+
constructor(data?: {
|
|
1224
|
+
editStatus?: EditStatus;
|
|
1225
|
+
});
|
|
1226
|
+
init(_data: any): void;
|
|
1227
|
+
static fromJS(data: any): TestPlanChangedEvent;
|
|
1228
|
+
toJSON(data?: any): any;
|
|
1210
1229
|
}
|
|
1211
1230
|
export declare class SessionStateChangedEvent extends SessionEvent {
|
|
1212
1231
|
runStatus?: RunStatus | undefined;
|
package/dist/mjs/DTOs.js
CHANGED
|
@@ -2038,6 +2038,37 @@ export class RunStatus {
|
|
|
2038
2038
|
return data;
|
|
2039
2039
|
}
|
|
2040
2040
|
}
|
|
2041
|
+
export class EditStatus {
|
|
2042
|
+
constructor(data) {
|
|
2043
|
+
if (data) {
|
|
2044
|
+
for (const property in data) {
|
|
2045
|
+
if (Object.prototype.hasOwnProperty.call(data, property)) {
|
|
2046
|
+
this[property] = data[property];
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
init(_data) {
|
|
2052
|
+
if (_data) {
|
|
2053
|
+
this.undoBufferSize = _data['UndoBufferSize'];
|
|
2054
|
+
this.redoBufferSize = _data['RedoBufferSize'];
|
|
2055
|
+
this.testPlanDirty = _data['TestPlanDirty'];
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
static fromJS(data) {
|
|
2059
|
+
data = typeof data === 'object' ? data : {};
|
|
2060
|
+
const result = new EditStatus();
|
|
2061
|
+
result.init(data);
|
|
2062
|
+
return result;
|
|
2063
|
+
}
|
|
2064
|
+
toJSON(data) {
|
|
2065
|
+
data = typeof data === 'object' ? data : {};
|
|
2066
|
+
data['UndoBufferSize'] = this.undoBufferSize;
|
|
2067
|
+
data['RedoBufferSize'] = this.redoBufferSize;
|
|
2068
|
+
data['TestPlanDirty'] = this.testPlanDirty;
|
|
2069
|
+
return data;
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2041
2072
|
/** Enumeration containing the verdict types used for Verdict and Verdict properties. */
|
|
2042
2073
|
export var Verdict;
|
|
2043
2074
|
(function (Verdict) {
|
|
@@ -2903,11 +2934,26 @@ export class StoppedEvent extends SessionEvent {
|
|
|
2903
2934
|
}
|
|
2904
2935
|
}
|
|
2905
2936
|
export class TestPlanChangedEvent extends SessionEvent {
|
|
2906
|
-
constructor() {
|
|
2937
|
+
constructor(data) {
|
|
2907
2938
|
super(SessionEventName.TestPlanChanged);
|
|
2939
|
+
if (data === null || data === void 0 ? void 0 : data.editStatus) {
|
|
2940
|
+
this.editStatus = data.editStatus;
|
|
2941
|
+
}
|
|
2908
2942
|
}
|
|
2909
|
-
|
|
2910
|
-
|
|
2943
|
+
init(_data) {
|
|
2944
|
+
const data = ensureObject(_data);
|
|
2945
|
+
const payload = data['EditStatus'];
|
|
2946
|
+
this.editStatus = payload ? EditStatus.fromJS(payload) : undefined;
|
|
2947
|
+
}
|
|
2948
|
+
static fromJS(data) {
|
|
2949
|
+
const result = new TestPlanChangedEvent();
|
|
2950
|
+
result.init(data);
|
|
2951
|
+
return result;
|
|
2952
|
+
}
|
|
2953
|
+
toJSON(data) {
|
|
2954
|
+
const json = ensureObject(data);
|
|
2955
|
+
json['EditStatus'] = this.editStatus ? this.editStatus.toJSON() : undefined;
|
|
2956
|
+
return json;
|
|
2911
2957
|
}
|
|
2912
2958
|
}
|
|
2913
2959
|
export class SessionStateChangedEvent extends SessionEvent {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, IMetricsConfiguration, Image, Interaction, ListItemType, LogList, MetricsConfiguration, OnTestPlanRun, OnTestStepRun, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SessionEvent, SessionEventName, Setting, TestPlan, TestStepType, TestStepValidationError, WatchDog } from './DTOs';
|
|
1
|
+
import { BreakPoints, CommonContext, CommonSettings, DataGridControl, IMetricsConfiguration, Image, Interaction, ListItemType, LogList, MetricsConfiguration, OnTestPlanRun, OnTestStepRun, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SessionEvent, SessionEventName, Setting, TestPlan, TestStepType, TestStepValidationError, WatchDog, EditStatus } 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 {
|
|
@@ -115,6 +115,11 @@ export declare class SessionClient extends BaseClient {
|
|
|
115
115
|
* @return RunStatus retrieved
|
|
116
116
|
*/
|
|
117
117
|
getStatus(timeout: number | null | undefined): Promise<RunStatus>;
|
|
118
|
+
/**
|
|
119
|
+
* Get edit status that contains undo/redo buffer count and testplan dirty status
|
|
120
|
+
* @returns EditStatus retrieved
|
|
121
|
+
*/
|
|
122
|
+
getEditStatus(): Promise<EditStatus>;
|
|
118
123
|
/**
|
|
119
124
|
* Upload test plan XML
|
|
120
125
|
* @param xml Test Plan XML
|
|
@@ -131,6 +136,49 @@ export declare class SessionClient extends BaseClient {
|
|
|
131
136
|
* @return Raw bytes representing the resource
|
|
132
137
|
*/
|
|
133
138
|
downloadResource(resource: Resource): Promise<Uint8Array>;
|
|
139
|
+
/**
|
|
140
|
+
* Moves the test steps as children of target step
|
|
141
|
+
* @param TargetStepId target test step id
|
|
142
|
+
* @param StepIds test steps ids to move
|
|
143
|
+
*/
|
|
144
|
+
moveStepsAsChildren(targetStepId: string, StepIds: string[]): void;
|
|
145
|
+
/**
|
|
146
|
+
* Moves the test steps as sibling of target step
|
|
147
|
+
* @param TargetStepId target test step id
|
|
148
|
+
* @param StepIds test steps ids to move
|
|
149
|
+
*/
|
|
150
|
+
moveSteps(targetStepId: string, StepIds: string[]): void;
|
|
151
|
+
/**
|
|
152
|
+
* Copy test steps
|
|
153
|
+
* @param stepIds test step ids to copy
|
|
154
|
+
* @return copied steps
|
|
155
|
+
*/
|
|
156
|
+
copySteps(StepIds: string[]): Promise<string>;
|
|
157
|
+
/**
|
|
158
|
+
* Paste copied test steps as sibling of target step
|
|
159
|
+
* @param TargetStepId target test step id
|
|
160
|
+
* @param Clipboard test steps copied to clipboard
|
|
161
|
+
*/
|
|
162
|
+
pasteStepsAsChildren(targetStepId: string, Clipboard: string): void;
|
|
163
|
+
/**
|
|
164
|
+
* Paste copied test steps as sibling of target step
|
|
165
|
+
* @param TargetStepId target test step id
|
|
166
|
+
* @param Clipboard test steps copied to clipboard
|
|
167
|
+
*/
|
|
168
|
+
pasteSteps(targetStepId: string, Clipboard: string): void;
|
|
169
|
+
/**
|
|
170
|
+
* Delete test steps
|
|
171
|
+
* @param stepIds test step ids to delete
|
|
172
|
+
*/
|
|
173
|
+
deleteSteps(StepIds: string[]): void;
|
|
174
|
+
/**
|
|
175
|
+
* Undo
|
|
176
|
+
*/
|
|
177
|
+
testPlanUndo(): void;
|
|
178
|
+
/**
|
|
179
|
+
* Redo
|
|
180
|
+
*/
|
|
181
|
+
testPlanRedo(): void;
|
|
134
182
|
/**
|
|
135
183
|
* Load test plan using a test plan TapPackage from a repository
|
|
136
184
|
* @param {RepositoryPackageDefinition} packageReference
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { BreakEvent, BreakPoints, CommonContext, CommonSettings, DataGridControl, HeartbeatEvent, Image, Interaction, ListItemType, LogList, MetricsConfiguration, OnTestPlanRun, OnTestStepRun, Result, RunStatus, SessionEventName, SessionStateChangedEvent, SessionTimeoutEvent, Setting, SettingsChangedEvent, StartingEvent, StartedEvent, StoppedEvent, StoppingEvent, TestPlan, TestPlanChangedEvent, TestPlanSettingsChangedEvent, TestStepChangedEvent, TestStepType, TestStepValidationError, TypeCacheInvalidatedEvent, UserInputRequestCompletedEvent, UserInputRequestedEvent, WatchDog, } from './DTOs';
|
|
1
|
+
import { BreakEvent, BreakPoints, CommonContext, CommonSettings, DataGridControl, HeartbeatEvent, Image, Interaction, ListItemType, LogList, MetricsConfiguration, OnTestPlanRun, OnTestStepRun, Result, RunStatus, SessionEventName, SessionStateChangedEvent, SessionTimeoutEvent, Setting, SettingsChangedEvent, StartingEvent, StartedEvent, StoppedEvent, StoppingEvent, TestPlan, TestPlanChangedEvent, TestPlanSettingsChangedEvent, TestStepChangedEvent, TestStepType, TestStepValidationError, TypeCacheInvalidatedEvent, UserInputRequestCompletedEvent, UserInputRequestedEvent, WatchDog, EditStatus, } from './DTOs';
|
|
2
2
|
import { BaseClient } from './BaseClient';
|
|
3
3
|
import { jsonCodec } from './encoders';
|
|
4
|
+
import { NIL } from 'uuid';
|
|
4
5
|
export class SessionClient extends BaseClient {
|
|
5
6
|
constructor(baseSubject, options) {
|
|
6
7
|
super(baseSubject, options);
|
|
@@ -280,6 +281,16 @@ export class SessionClient extends BaseClient {
|
|
|
280
281
|
.then(this.success())
|
|
281
282
|
.catch(this.error());
|
|
282
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Get edit status that contains undo/redo buffer count and testplan dirty status
|
|
286
|
+
* @returns EditStatus retrieved
|
|
287
|
+
*/
|
|
288
|
+
getEditStatus() {
|
|
289
|
+
return this.request('GetEditStatus')
|
|
290
|
+
.then(editStatusJs => EditStatus.fromJS(editStatusJs))
|
|
291
|
+
.then(this.success())
|
|
292
|
+
.catch(this.error());
|
|
293
|
+
}
|
|
283
294
|
/**
|
|
284
295
|
* Upload test plan XML
|
|
285
296
|
* @param xml Test Plan XML
|
|
@@ -311,6 +322,73 @@ export class SessionClient extends BaseClient {
|
|
|
311
322
|
.then(this.success())
|
|
312
323
|
.catch(this.error());
|
|
313
324
|
}
|
|
325
|
+
/**
|
|
326
|
+
* Moves the test steps as children of target step
|
|
327
|
+
* @param TargetStepId target test step id
|
|
328
|
+
* @param StepIds test steps ids to move
|
|
329
|
+
*/
|
|
330
|
+
moveStepsAsChildren(targetStepId, StepIds) {
|
|
331
|
+
// need to send GUID.EMPTY if target step id is empty, so that runner can parse correctly
|
|
332
|
+
const TargetStepId = targetStepId ? targetStepId : NIL;
|
|
333
|
+
this.request('MoveStepsAsChildren', { StepIds, TargetStepId }).then(this.success()).catch(this.error());
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* Moves the test steps as sibling of target step
|
|
337
|
+
* @param TargetStepId target test step id
|
|
338
|
+
* @param StepIds test steps ids to move
|
|
339
|
+
*/
|
|
340
|
+
moveSteps(targetStepId, StepIds) {
|
|
341
|
+
// need to send GUID.EMPTY if target step id is empty, so that runner can parse correctly
|
|
342
|
+
const TargetStepId = targetStepId ? targetStepId : NIL;
|
|
343
|
+
this.request('MoveSteps', { StepIds, TargetStepId }).then(this.success()).catch(this.error());
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
346
|
+
* Copy test steps
|
|
347
|
+
* @param stepIds test step ids to copy
|
|
348
|
+
* @return copied steps
|
|
349
|
+
*/
|
|
350
|
+
copySteps(StepIds) {
|
|
351
|
+
return this.request('CopySteps', { StepIds }).then(this.success()).catch(this.error());
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Paste copied test steps as sibling of target step
|
|
355
|
+
* @param TargetStepId target test step id
|
|
356
|
+
* @param Clipboard test steps copied to clipboard
|
|
357
|
+
*/
|
|
358
|
+
pasteStepsAsChildren(targetStepId, Clipboard) {
|
|
359
|
+
// need to send GUID.EMPTY if target step id is empty, so that runner can parse correctly
|
|
360
|
+
const TargetStepId = targetStepId ? targetStepId : NIL;
|
|
361
|
+
this.request('PasteStepsAsChildren', { TargetStepId, Clipboard }).then(this.success()).catch(this.error());
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Paste copied test steps as sibling of target step
|
|
365
|
+
* @param TargetStepId target test step id
|
|
366
|
+
* @param Clipboard test steps copied to clipboard
|
|
367
|
+
*/
|
|
368
|
+
pasteSteps(targetStepId, Clipboard) {
|
|
369
|
+
// need to send GUID.EMPTY if target step id is empty, so that runner can parse correctly
|
|
370
|
+
const TargetStepId = targetStepId ? targetStepId : NIL;
|
|
371
|
+
this.request('PasteSteps', { TargetStepId, Clipboard }).then(this.success()).catch(this.error());
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Delete test steps
|
|
375
|
+
* @param stepIds test step ids to delete
|
|
376
|
+
*/
|
|
377
|
+
deleteSteps(StepIds) {
|
|
378
|
+
this.request('DeleteSteps', { StepIds }).then(this.success()).catch(this.error());
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Undo
|
|
382
|
+
*/
|
|
383
|
+
testPlanUndo() {
|
|
384
|
+
this.request('TestPlanUndo').then(this.success()).catch(this.error());
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Redo
|
|
388
|
+
*/
|
|
389
|
+
testPlanRedo() {
|
|
390
|
+
this.request('TestPlanRedo').then(this.success()).catch(this.error());
|
|
391
|
+
}
|
|
314
392
|
/**
|
|
315
393
|
* Load test plan using a test plan TapPackage from a repository
|
|
316
394
|
* @param {RepositoryPackageDefinition} packageReference
|
|
@@ -709,7 +787,7 @@ SessionClient.sessionEventFactories = {
|
|
|
709
787
|
[SessionEventName.Heartbeat]: payload => HeartbeatEvent.fromJS(payload),
|
|
710
788
|
[SessionEventName.Stopping]: () => StoppingEvent.fromJS(),
|
|
711
789
|
[SessionEventName.Stopped]: () => StoppedEvent.fromJS(),
|
|
712
|
-
[SessionEventName.TestPlanChanged]:
|
|
790
|
+
[SessionEventName.TestPlanChanged]: payload => TestPlanChangedEvent.fromJS(payload),
|
|
713
791
|
[SessionEventName.SessionStateChanged]: payload => SessionStateChangedEvent.fromJS(payload),
|
|
714
792
|
[SessionEventName.SettingsChanged]: payload => SettingsChangedEvent.fromJS(payload),
|
|
715
793
|
[SessionEventName.TestStepChanged]: payload => TestStepChangedEvent.fromJS(payload),
|
package/package.json
CHANGED