@opentap/runner-client 3.0.0 → 3.1.0-alpha.1.1.20063228389
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 +43 -2
- package/dist/cjs/DTOs.js +114 -7
- package/dist/cjs/SessionClient.d.ts +56 -3
- package/dist/cjs/SessionClient.js +90 -3
- package/dist/mjs/DTOs.d.ts +43 -2
- package/dist/mjs/DTOs.js +103 -3
- package/dist/mjs/SessionClient.d.ts +56 -3
- package/dist/mjs/SessionClient.js +91 -4
- package/package.json +1 -1
package/dist/cjs/DTOs.d.ts
CHANGED
|
@@ -569,6 +569,7 @@ export declare class RepositoryPackageReference implements IRepositoryPackageRef
|
|
|
569
569
|
version?: string | undefined;
|
|
570
570
|
repository?: string | undefined;
|
|
571
571
|
path?: string | undefined;
|
|
572
|
+
pathId?: string | undefined;
|
|
572
573
|
constructor(data?: IRepositoryPackageReference);
|
|
573
574
|
init(_data?: any): void;
|
|
574
575
|
static fromJS(data: any): RepositoryPackageReference;
|
|
@@ -579,6 +580,7 @@ export interface IRepositoryPackageReference {
|
|
|
579
580
|
version?: string | undefined;
|
|
580
581
|
repository?: string | undefined;
|
|
581
582
|
path?: string | undefined;
|
|
583
|
+
pathId?: string | undefined;
|
|
582
584
|
}
|
|
583
585
|
export declare class RepositoryPackageDefinition extends RepositoryPackageReference implements IRepositoryPackageDefinition {
|
|
584
586
|
tags?: string[] | undefined;
|
|
@@ -597,6 +599,26 @@ export declare class RepositorySettingsPackageDefinition extends RepositoryPacka
|
|
|
597
599
|
toJSON(data?: any): any;
|
|
598
600
|
}
|
|
599
601
|
export declare type IRepositorySettingsPackageDefinition = IRepositoryPackageDefinition;
|
|
602
|
+
export declare class GetTestPlanReferenceResponse implements IGetTestPlanReferenceResponse {
|
|
603
|
+
testPlanReference?: RepositoryPackageReference | undefined;
|
|
604
|
+
constructor(data?: IGetTestPlanReferenceResponse);
|
|
605
|
+
init(_data?: any): void;
|
|
606
|
+
static fromJS(data: any): GetTestPlanReferenceResponse;
|
|
607
|
+
toJSON(data?: any): any;
|
|
608
|
+
}
|
|
609
|
+
export interface IGetTestPlanReferenceResponse {
|
|
610
|
+
testPlanReference?: RepositoryPackageReference | undefined;
|
|
611
|
+
}
|
|
612
|
+
export declare class SaveTestPlanToRepositoryResponse implements ISaveTestPlanToRepositoryResponse {
|
|
613
|
+
testPlanReference?: RepositoryPackageReference | undefined;
|
|
614
|
+
constructor(data?: ISaveTestPlanToRepositoryResponse);
|
|
615
|
+
init(_data?: any): void;
|
|
616
|
+
static fromJS(data: any): SaveTestPlanToRepositoryResponse;
|
|
617
|
+
toJSON(data?: any): any;
|
|
618
|
+
}
|
|
619
|
+
export interface ISaveTestPlanToRepositoryResponse {
|
|
620
|
+
testPlanReference?: RepositoryPackageReference | undefined;
|
|
621
|
+
}
|
|
600
622
|
export declare class SettingsTapPackage implements ISettingsTapPackage {
|
|
601
623
|
name?: string | undefined;
|
|
602
624
|
version?: string | undefined;
|
|
@@ -824,6 +846,20 @@ export interface IRunStatus {
|
|
|
824
846
|
sessionState?: SessionState;
|
|
825
847
|
executingSteps?: string[] | undefined;
|
|
826
848
|
}
|
|
849
|
+
export declare class EditStatus implements IEditStatus {
|
|
850
|
+
undoBufferSize?: number;
|
|
851
|
+
redoBufferSize?: number;
|
|
852
|
+
testPlanDirty?: boolean;
|
|
853
|
+
constructor(data?: IEditStatus);
|
|
854
|
+
init(_data?: any): void;
|
|
855
|
+
static fromJS(data: any): EditStatus;
|
|
856
|
+
toJSON(data?: any): any;
|
|
857
|
+
}
|
|
858
|
+
export interface IEditStatus {
|
|
859
|
+
undoBufferSize?: number;
|
|
860
|
+
redoBufferSize?: number;
|
|
861
|
+
testPlanDirty?: boolean;
|
|
862
|
+
}
|
|
827
863
|
/** Enumeration containing the verdict types used for Verdict and Verdict properties. */
|
|
828
864
|
export declare enum Verdict {
|
|
829
865
|
NotSet = "NotSet",
|
|
@@ -1205,8 +1241,13 @@ export declare class StoppedEvent extends SessionEvent {
|
|
|
1205
1241
|
static fromJS(): StoppedEvent;
|
|
1206
1242
|
}
|
|
1207
1243
|
export declare class TestPlanChangedEvent extends SessionEvent {
|
|
1208
|
-
|
|
1209
|
-
|
|
1244
|
+
editStatus?: EditStatus;
|
|
1245
|
+
constructor(data?: {
|
|
1246
|
+
editStatus?: EditStatus;
|
|
1247
|
+
});
|
|
1248
|
+
init(_data: any): void;
|
|
1249
|
+
static fromJS(data: any): TestPlanChangedEvent;
|
|
1250
|
+
toJSON(data?: any): any;
|
|
1210
1251
|
}
|
|
1211
1252
|
export declare class SessionStateChangedEvent extends SessionEvent {
|
|
1212
1253
|
runStatus?: RunStatus | undefined;
|
package/dist/cjs/DTOs.js
CHANGED
|
@@ -15,9 +15,9 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.
|
|
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;
|
|
18
|
+
exports.SettingsTapPackage = exports.SaveTestPlanToRepositoryResponse = exports.GetTestPlanReferenceResponse = 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.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 = exports.SessionStartInitiated = exports.SessionEventArgs = 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 = exports.StoppedEvent = exports.StoppingEvent = void 0;
|
|
21
21
|
var Image = /** @class */ (function () {
|
|
22
22
|
function Image(data) {
|
|
23
23
|
this.packages = [];
|
|
@@ -1625,6 +1625,7 @@ var RepositoryPackageReference = /** @class */ (function () {
|
|
|
1625
1625
|
this.version = _data['Version'];
|
|
1626
1626
|
this.repository = _data['Repository'];
|
|
1627
1627
|
this.path = _data['Path'];
|
|
1628
|
+
this.pathId = _data['PathId'];
|
|
1628
1629
|
}
|
|
1629
1630
|
};
|
|
1630
1631
|
RepositoryPackageReference.fromJS = function (data) {
|
|
@@ -1639,6 +1640,7 @@ var RepositoryPackageReference = /** @class */ (function () {
|
|
|
1639
1640
|
data['Version'] = this.version;
|
|
1640
1641
|
data['Repository'] = this.repository;
|
|
1641
1642
|
data['Path'] = this.path;
|
|
1643
|
+
data['PathId'] = this.pathId;
|
|
1642
1644
|
return data;
|
|
1643
1645
|
};
|
|
1644
1646
|
return RepositoryPackageReference;
|
|
@@ -1704,6 +1706,62 @@ var RepositorySettingsPackageDefinition = /** @class */ (function (_super) {
|
|
|
1704
1706
|
return RepositorySettingsPackageDefinition;
|
|
1705
1707
|
}(RepositoryPackageDefinition));
|
|
1706
1708
|
exports.RepositorySettingsPackageDefinition = RepositorySettingsPackageDefinition;
|
|
1709
|
+
var GetTestPlanReferenceResponse = /** @class */ (function () {
|
|
1710
|
+
function GetTestPlanReferenceResponse(data) {
|
|
1711
|
+
if (data) {
|
|
1712
|
+
for (var property in data) {
|
|
1713
|
+
if (Object.prototype.hasOwnProperty.call(data, property))
|
|
1714
|
+
this[property] = data[property];
|
|
1715
|
+
}
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
GetTestPlanReferenceResponse.prototype.init = function (_data) {
|
|
1719
|
+
if (_data) {
|
|
1720
|
+
this.testPlanReference = _data['TestPlanReference'] ? RepositoryPackageReference.fromJS(_data['TestPlanReference']) : undefined;
|
|
1721
|
+
}
|
|
1722
|
+
};
|
|
1723
|
+
GetTestPlanReferenceResponse.fromJS = function (data) {
|
|
1724
|
+
data = typeof data === 'object' ? data : {};
|
|
1725
|
+
var result = new GetTestPlanReferenceResponse();
|
|
1726
|
+
result.init(data);
|
|
1727
|
+
return result;
|
|
1728
|
+
};
|
|
1729
|
+
GetTestPlanReferenceResponse.prototype.toJSON = function (data) {
|
|
1730
|
+
data = typeof data === 'object' ? data : {};
|
|
1731
|
+
data['TestPlanReference'] = this.testPlanReference ? this.testPlanReference.toJSON() : undefined;
|
|
1732
|
+
return data;
|
|
1733
|
+
};
|
|
1734
|
+
return GetTestPlanReferenceResponse;
|
|
1735
|
+
}());
|
|
1736
|
+
exports.GetTestPlanReferenceResponse = GetTestPlanReferenceResponse;
|
|
1737
|
+
var SaveTestPlanToRepositoryResponse = /** @class */ (function () {
|
|
1738
|
+
function SaveTestPlanToRepositoryResponse(data) {
|
|
1739
|
+
if (data) {
|
|
1740
|
+
for (var property in data) {
|
|
1741
|
+
if (Object.prototype.hasOwnProperty.call(data, property))
|
|
1742
|
+
this[property] = data[property];
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
}
|
|
1746
|
+
SaveTestPlanToRepositoryResponse.prototype.init = function (_data) {
|
|
1747
|
+
if (_data) {
|
|
1748
|
+
this.testPlanReference = _data['TestPlanReference'] ? RepositoryPackageReference.fromJS(_data['TestPlanReference']) : undefined;
|
|
1749
|
+
}
|
|
1750
|
+
};
|
|
1751
|
+
SaveTestPlanToRepositoryResponse.fromJS = function (data) {
|
|
1752
|
+
data = typeof data === 'object' ? data : {};
|
|
1753
|
+
var result = new SaveTestPlanToRepositoryResponse();
|
|
1754
|
+
result.init(data);
|
|
1755
|
+
return result;
|
|
1756
|
+
};
|
|
1757
|
+
SaveTestPlanToRepositoryResponse.prototype.toJSON = function (data) {
|
|
1758
|
+
data = typeof data === 'object' ? data : {};
|
|
1759
|
+
data['TestPlanReference'] = this.testPlanReference ? this.testPlanReference.toJSON() : undefined;
|
|
1760
|
+
return data;
|
|
1761
|
+
};
|
|
1762
|
+
return SaveTestPlanToRepositoryResponse;
|
|
1763
|
+
}());
|
|
1764
|
+
exports.SaveTestPlanToRepositoryResponse = SaveTestPlanToRepositoryResponse;
|
|
1707
1765
|
var SettingsTapPackage = /** @class */ (function () {
|
|
1708
1766
|
function SettingsTapPackage(data) {
|
|
1709
1767
|
if (data) {
|
|
@@ -2333,6 +2391,39 @@ var RunStatus = /** @class */ (function () {
|
|
|
2333
2391
|
return RunStatus;
|
|
2334
2392
|
}());
|
|
2335
2393
|
exports.RunStatus = RunStatus;
|
|
2394
|
+
var EditStatus = /** @class */ (function () {
|
|
2395
|
+
function EditStatus(data) {
|
|
2396
|
+
if (data) {
|
|
2397
|
+
for (var property in data) {
|
|
2398
|
+
if (Object.prototype.hasOwnProperty.call(data, property)) {
|
|
2399
|
+
this[property] = data[property];
|
|
2400
|
+
}
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
}
|
|
2404
|
+
EditStatus.prototype.init = function (_data) {
|
|
2405
|
+
if (_data) {
|
|
2406
|
+
this.undoBufferSize = _data['UndoBufferSize'];
|
|
2407
|
+
this.redoBufferSize = _data['RedoBufferSize'];
|
|
2408
|
+
this.testPlanDirty = _data['TestPlanDirty'];
|
|
2409
|
+
}
|
|
2410
|
+
};
|
|
2411
|
+
EditStatus.fromJS = function (data) {
|
|
2412
|
+
data = typeof data === 'object' ? data : {};
|
|
2413
|
+
var result = new EditStatus();
|
|
2414
|
+
result.init(data);
|
|
2415
|
+
return result;
|
|
2416
|
+
};
|
|
2417
|
+
EditStatus.prototype.toJSON = function (data) {
|
|
2418
|
+
data = typeof data === 'object' ? data : {};
|
|
2419
|
+
data['UndoBufferSize'] = this.undoBufferSize;
|
|
2420
|
+
data['RedoBufferSize'] = this.redoBufferSize;
|
|
2421
|
+
data['TestPlanDirty'] = this.testPlanDirty;
|
|
2422
|
+
return data;
|
|
2423
|
+
};
|
|
2424
|
+
return EditStatus;
|
|
2425
|
+
}());
|
|
2426
|
+
exports.EditStatus = EditStatus;
|
|
2336
2427
|
/** Enumeration containing the verdict types used for Verdict and Verdict properties. */
|
|
2337
2428
|
var Verdict;
|
|
2338
2429
|
(function (Verdict) {
|
|
@@ -3322,11 +3413,27 @@ var StoppedEvent = /** @class */ (function (_super) {
|
|
|
3322
3413
|
exports.StoppedEvent = StoppedEvent;
|
|
3323
3414
|
var TestPlanChangedEvent = /** @class */ (function (_super) {
|
|
3324
3415
|
__extends(TestPlanChangedEvent, _super);
|
|
3325
|
-
function TestPlanChangedEvent() {
|
|
3326
|
-
|
|
3416
|
+
function TestPlanChangedEvent(data) {
|
|
3417
|
+
var _this = _super.call(this, SessionEventName.TestPlanChanged) || this;
|
|
3418
|
+
if (data === null || data === void 0 ? void 0 : data.editStatus) {
|
|
3419
|
+
_this.editStatus = data.editStatus;
|
|
3420
|
+
}
|
|
3421
|
+
return _this;
|
|
3327
3422
|
}
|
|
3328
|
-
TestPlanChangedEvent.
|
|
3329
|
-
|
|
3423
|
+
TestPlanChangedEvent.prototype.init = function (_data) {
|
|
3424
|
+
var data = ensureObject(_data);
|
|
3425
|
+
var payload = data['EditStatus'];
|
|
3426
|
+
this.editStatus = payload ? EditStatus.fromJS(payload) : undefined;
|
|
3427
|
+
};
|
|
3428
|
+
TestPlanChangedEvent.fromJS = function (data) {
|
|
3429
|
+
var result = new TestPlanChangedEvent();
|
|
3430
|
+
result.init(data);
|
|
3431
|
+
return result;
|
|
3432
|
+
};
|
|
3433
|
+
TestPlanChangedEvent.prototype.toJSON = function (data) {
|
|
3434
|
+
var json = ensureObject(data);
|
|
3435
|
+
json['EditStatus'] = this.editStatus ? this.editStatus.toJSON() : undefined;
|
|
3436
|
+
return json;
|
|
3330
3437
|
};
|
|
3331
3438
|
return TestPlanChangedEvent;
|
|
3332
3439
|
}(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, GetTestPlanReferenceResponse, IMetricsConfiguration, Image, Interaction, ListItemType, LogList, MetricsConfiguration, OnTestPlanRun, OnTestStepRun, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SaveTestPlanToRepositoryResponse, 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
|
|
@@ -140,9 +188,9 @@ export declare class SessionClient extends BaseClient {
|
|
|
140
188
|
/**
|
|
141
189
|
* Save currently loaded test plan to a repository
|
|
142
190
|
* @param {RepositoryPackageDefinition} packageReference
|
|
143
|
-
* @return Test plan uploaded.
|
|
191
|
+
* @return Test plan uploaded with reference.
|
|
144
192
|
*/
|
|
145
|
-
saveTestPlanToRepository(packageReference: RepositoryPackageDefinition): Promise<
|
|
193
|
+
saveTestPlanToRepository(packageReference: RepositoryPackageDefinition): Promise<SaveTestPlanToRepositoryResponse>;
|
|
146
194
|
/**
|
|
147
195
|
* Test plan resources opened
|
|
148
196
|
* @return Test plan resources opened.
|
|
@@ -184,6 +232,11 @@ export declare class SessionClient extends BaseClient {
|
|
|
184
232
|
* @return {Promise<void>}
|
|
185
233
|
*/
|
|
186
234
|
setTestPlanName(testPlanName: string): Promise<void>;
|
|
235
|
+
/**
|
|
236
|
+
* Gets the loaded test plan repository reference.
|
|
237
|
+
* @return {Promise<GetTestPlanReferenceResponse>}
|
|
238
|
+
*/
|
|
239
|
+
getTestPlanReference(): Promise<GetTestPlanReferenceResponse>;
|
|
187
240
|
/**
|
|
188
241
|
* Retrieve all validation errors present in the test plan
|
|
189
242
|
* @return Retrieved validation errors for loaded TestPlan
|
|
@@ -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
|
|
@@ -360,10 +438,12 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
360
438
|
/**
|
|
361
439
|
* Save currently loaded test plan to a repository
|
|
362
440
|
* @param {RepositoryPackageDefinition} packageReference
|
|
363
|
-
* @return Test plan uploaded.
|
|
441
|
+
* @return Test plan uploaded with reference.
|
|
364
442
|
*/
|
|
365
443
|
SessionClient.prototype.saveTestPlanToRepository = function (packageReference) {
|
|
366
|
-
return this.request('SaveTestPlanToRepository', packageReference)
|
|
444
|
+
return this.request('SaveTestPlanToRepository', packageReference)
|
|
445
|
+
.then(this.success())
|
|
446
|
+
.catch(this.error());
|
|
367
447
|
};
|
|
368
448
|
/**
|
|
369
449
|
* Test plan resources opened
|
|
@@ -439,6 +519,13 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
439
519
|
SessionClient.prototype.setTestPlanName = function (testPlanName) {
|
|
440
520
|
return this.request('SetTestPlanName', testPlanName).then(this.success()).catch(this.error());
|
|
441
521
|
};
|
|
522
|
+
/**
|
|
523
|
+
* Gets the loaded test plan repository reference.
|
|
524
|
+
* @return {Promise<GetTestPlanReferenceResponse>}
|
|
525
|
+
*/
|
|
526
|
+
SessionClient.prototype.getTestPlanReference = function () {
|
|
527
|
+
return this.request('GetTestPlanReference').then(this.success()).catch(this.error());
|
|
528
|
+
};
|
|
442
529
|
/**
|
|
443
530
|
* Retrieve all validation errors present in the test plan
|
|
444
531
|
* @return Retrieved validation errors for loaded TestPlan
|
|
@@ -748,7 +835,7 @@ var SessionClient = /** @class */ (function (_super) {
|
|
|
748
835
|
_a[DTOs_1.SessionEventName.Heartbeat] = function (payload) { return DTOs_1.HeartbeatEvent.fromJS(payload); },
|
|
749
836
|
_a[DTOs_1.SessionEventName.Stopping] = function () { return DTOs_1.StoppingEvent.fromJS(); },
|
|
750
837
|
_a[DTOs_1.SessionEventName.Stopped] = function () { return DTOs_1.StoppedEvent.fromJS(); },
|
|
751
|
-
_a[DTOs_1.SessionEventName.TestPlanChanged] = function () { return DTOs_1.TestPlanChangedEvent.fromJS(); },
|
|
838
|
+
_a[DTOs_1.SessionEventName.TestPlanChanged] = function (payload) { return DTOs_1.TestPlanChangedEvent.fromJS(payload); },
|
|
752
839
|
_a[DTOs_1.SessionEventName.SessionStateChanged] = function (payload) { return DTOs_1.SessionStateChangedEvent.fromJS(payload); },
|
|
753
840
|
_a[DTOs_1.SessionEventName.SettingsChanged] = function (payload) { return DTOs_1.SettingsChangedEvent.fromJS(payload); },
|
|
754
841
|
_a[DTOs_1.SessionEventName.TestStepChanged] = function (payload) { return DTOs_1.TestStepChangedEvent.fromJS(payload); },
|
package/dist/mjs/DTOs.d.ts
CHANGED
|
@@ -569,6 +569,7 @@ export declare class RepositoryPackageReference implements IRepositoryPackageRef
|
|
|
569
569
|
version?: string | undefined;
|
|
570
570
|
repository?: string | undefined;
|
|
571
571
|
path?: string | undefined;
|
|
572
|
+
pathId?: string | undefined;
|
|
572
573
|
constructor(data?: IRepositoryPackageReference);
|
|
573
574
|
init(_data?: any): void;
|
|
574
575
|
static fromJS(data: any): RepositoryPackageReference;
|
|
@@ -579,6 +580,7 @@ export interface IRepositoryPackageReference {
|
|
|
579
580
|
version?: string | undefined;
|
|
580
581
|
repository?: string | undefined;
|
|
581
582
|
path?: string | undefined;
|
|
583
|
+
pathId?: string | undefined;
|
|
582
584
|
}
|
|
583
585
|
export declare class RepositoryPackageDefinition extends RepositoryPackageReference implements IRepositoryPackageDefinition {
|
|
584
586
|
tags?: string[] | undefined;
|
|
@@ -597,6 +599,26 @@ export declare class RepositorySettingsPackageDefinition extends RepositoryPacka
|
|
|
597
599
|
toJSON(data?: any): any;
|
|
598
600
|
}
|
|
599
601
|
export declare type IRepositorySettingsPackageDefinition = IRepositoryPackageDefinition;
|
|
602
|
+
export declare class GetTestPlanReferenceResponse implements IGetTestPlanReferenceResponse {
|
|
603
|
+
testPlanReference?: RepositoryPackageReference | undefined;
|
|
604
|
+
constructor(data?: IGetTestPlanReferenceResponse);
|
|
605
|
+
init(_data?: any): void;
|
|
606
|
+
static fromJS(data: any): GetTestPlanReferenceResponse;
|
|
607
|
+
toJSON(data?: any): any;
|
|
608
|
+
}
|
|
609
|
+
export interface IGetTestPlanReferenceResponse {
|
|
610
|
+
testPlanReference?: RepositoryPackageReference | undefined;
|
|
611
|
+
}
|
|
612
|
+
export declare class SaveTestPlanToRepositoryResponse implements ISaveTestPlanToRepositoryResponse {
|
|
613
|
+
testPlanReference?: RepositoryPackageReference | undefined;
|
|
614
|
+
constructor(data?: ISaveTestPlanToRepositoryResponse);
|
|
615
|
+
init(_data?: any): void;
|
|
616
|
+
static fromJS(data: any): SaveTestPlanToRepositoryResponse;
|
|
617
|
+
toJSON(data?: any): any;
|
|
618
|
+
}
|
|
619
|
+
export interface ISaveTestPlanToRepositoryResponse {
|
|
620
|
+
testPlanReference?: RepositoryPackageReference | undefined;
|
|
621
|
+
}
|
|
600
622
|
export declare class SettingsTapPackage implements ISettingsTapPackage {
|
|
601
623
|
name?: string | undefined;
|
|
602
624
|
version?: string | undefined;
|
|
@@ -824,6 +846,20 @@ export interface IRunStatus {
|
|
|
824
846
|
sessionState?: SessionState;
|
|
825
847
|
executingSteps?: string[] | undefined;
|
|
826
848
|
}
|
|
849
|
+
export declare class EditStatus implements IEditStatus {
|
|
850
|
+
undoBufferSize?: number;
|
|
851
|
+
redoBufferSize?: number;
|
|
852
|
+
testPlanDirty?: boolean;
|
|
853
|
+
constructor(data?: IEditStatus);
|
|
854
|
+
init(_data?: any): void;
|
|
855
|
+
static fromJS(data: any): EditStatus;
|
|
856
|
+
toJSON(data?: any): any;
|
|
857
|
+
}
|
|
858
|
+
export interface IEditStatus {
|
|
859
|
+
undoBufferSize?: number;
|
|
860
|
+
redoBufferSize?: number;
|
|
861
|
+
testPlanDirty?: boolean;
|
|
862
|
+
}
|
|
827
863
|
/** Enumeration containing the verdict types used for Verdict and Verdict properties. */
|
|
828
864
|
export declare enum Verdict {
|
|
829
865
|
NotSet = "NotSet",
|
|
@@ -1205,8 +1241,13 @@ export declare class StoppedEvent extends SessionEvent {
|
|
|
1205
1241
|
static fromJS(): StoppedEvent;
|
|
1206
1242
|
}
|
|
1207
1243
|
export declare class TestPlanChangedEvent extends SessionEvent {
|
|
1208
|
-
|
|
1209
|
-
|
|
1244
|
+
editStatus?: EditStatus;
|
|
1245
|
+
constructor(data?: {
|
|
1246
|
+
editStatus?: EditStatus;
|
|
1247
|
+
});
|
|
1248
|
+
init(_data: any): void;
|
|
1249
|
+
static fromJS(data: any): TestPlanChangedEvent;
|
|
1250
|
+
toJSON(data?: any): any;
|
|
1210
1251
|
}
|
|
1211
1252
|
export declare class SessionStateChangedEvent extends SessionEvent {
|
|
1212
1253
|
runStatus?: RunStatus | undefined;
|
package/dist/mjs/DTOs.js
CHANGED
|
@@ -1416,6 +1416,7 @@ export class RepositoryPackageReference {
|
|
|
1416
1416
|
this.version = _data['Version'];
|
|
1417
1417
|
this.repository = _data['Repository'];
|
|
1418
1418
|
this.path = _data['Path'];
|
|
1419
|
+
this.pathId = _data['PathId'];
|
|
1419
1420
|
}
|
|
1420
1421
|
}
|
|
1421
1422
|
static fromJS(data) {
|
|
@@ -1430,6 +1431,7 @@ export class RepositoryPackageReference {
|
|
|
1430
1431
|
data['Version'] = this.version;
|
|
1431
1432
|
data['Repository'] = this.repository;
|
|
1432
1433
|
data['Path'] = this.path;
|
|
1434
|
+
data['PathId'] = this.pathId;
|
|
1433
1435
|
return data;
|
|
1434
1436
|
}
|
|
1435
1437
|
}
|
|
@@ -1483,6 +1485,58 @@ export class RepositorySettingsPackageDefinition extends RepositoryPackageDefini
|
|
|
1483
1485
|
return data;
|
|
1484
1486
|
}
|
|
1485
1487
|
}
|
|
1488
|
+
export class GetTestPlanReferenceResponse {
|
|
1489
|
+
constructor(data) {
|
|
1490
|
+
if (data) {
|
|
1491
|
+
for (const property in data) {
|
|
1492
|
+
if (Object.prototype.hasOwnProperty.call(data, property))
|
|
1493
|
+
this[property] = data[property];
|
|
1494
|
+
}
|
|
1495
|
+
}
|
|
1496
|
+
}
|
|
1497
|
+
init(_data) {
|
|
1498
|
+
if (_data) {
|
|
1499
|
+
this.testPlanReference = _data['TestPlanReference'] ? RepositoryPackageReference.fromJS(_data['TestPlanReference']) : undefined;
|
|
1500
|
+
}
|
|
1501
|
+
}
|
|
1502
|
+
static fromJS(data) {
|
|
1503
|
+
data = typeof data === 'object' ? data : {};
|
|
1504
|
+
const result = new GetTestPlanReferenceResponse();
|
|
1505
|
+
result.init(data);
|
|
1506
|
+
return result;
|
|
1507
|
+
}
|
|
1508
|
+
toJSON(data) {
|
|
1509
|
+
data = typeof data === 'object' ? data : {};
|
|
1510
|
+
data['TestPlanReference'] = this.testPlanReference ? this.testPlanReference.toJSON() : undefined;
|
|
1511
|
+
return data;
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
export class SaveTestPlanToRepositoryResponse {
|
|
1515
|
+
constructor(data) {
|
|
1516
|
+
if (data) {
|
|
1517
|
+
for (const property in data) {
|
|
1518
|
+
if (Object.prototype.hasOwnProperty.call(data, property))
|
|
1519
|
+
this[property] = data[property];
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
init(_data) {
|
|
1524
|
+
if (_data) {
|
|
1525
|
+
this.testPlanReference = _data['TestPlanReference'] ? RepositoryPackageReference.fromJS(_data['TestPlanReference']) : undefined;
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
static fromJS(data) {
|
|
1529
|
+
data = typeof data === 'object' ? data : {};
|
|
1530
|
+
const result = new SaveTestPlanToRepositoryResponse();
|
|
1531
|
+
result.init(data);
|
|
1532
|
+
return result;
|
|
1533
|
+
}
|
|
1534
|
+
toJSON(data) {
|
|
1535
|
+
data = typeof data === 'object' ? data : {};
|
|
1536
|
+
data['TestPlanReference'] = this.testPlanReference ? this.testPlanReference.toJSON() : undefined;
|
|
1537
|
+
return data;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1486
1540
|
export class SettingsTapPackage {
|
|
1487
1541
|
constructor(data) {
|
|
1488
1542
|
if (data) {
|
|
@@ -2038,6 +2092,37 @@ export class RunStatus {
|
|
|
2038
2092
|
return data;
|
|
2039
2093
|
}
|
|
2040
2094
|
}
|
|
2095
|
+
export class EditStatus {
|
|
2096
|
+
constructor(data) {
|
|
2097
|
+
if (data) {
|
|
2098
|
+
for (const property in data) {
|
|
2099
|
+
if (Object.prototype.hasOwnProperty.call(data, property)) {
|
|
2100
|
+
this[property] = data[property];
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
init(_data) {
|
|
2106
|
+
if (_data) {
|
|
2107
|
+
this.undoBufferSize = _data['UndoBufferSize'];
|
|
2108
|
+
this.redoBufferSize = _data['RedoBufferSize'];
|
|
2109
|
+
this.testPlanDirty = _data['TestPlanDirty'];
|
|
2110
|
+
}
|
|
2111
|
+
}
|
|
2112
|
+
static fromJS(data) {
|
|
2113
|
+
data = typeof data === 'object' ? data : {};
|
|
2114
|
+
const result = new EditStatus();
|
|
2115
|
+
result.init(data);
|
|
2116
|
+
return result;
|
|
2117
|
+
}
|
|
2118
|
+
toJSON(data) {
|
|
2119
|
+
data = typeof data === 'object' ? data : {};
|
|
2120
|
+
data['UndoBufferSize'] = this.undoBufferSize;
|
|
2121
|
+
data['RedoBufferSize'] = this.redoBufferSize;
|
|
2122
|
+
data['TestPlanDirty'] = this.testPlanDirty;
|
|
2123
|
+
return data;
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2041
2126
|
/** Enumeration containing the verdict types used for Verdict and Verdict properties. */
|
|
2042
2127
|
export var Verdict;
|
|
2043
2128
|
(function (Verdict) {
|
|
@@ -2903,11 +2988,26 @@ export class StoppedEvent extends SessionEvent {
|
|
|
2903
2988
|
}
|
|
2904
2989
|
}
|
|
2905
2990
|
export class TestPlanChangedEvent extends SessionEvent {
|
|
2906
|
-
constructor() {
|
|
2991
|
+
constructor(data) {
|
|
2907
2992
|
super(SessionEventName.TestPlanChanged);
|
|
2993
|
+
if (data === null || data === void 0 ? void 0 : data.editStatus) {
|
|
2994
|
+
this.editStatus = data.editStatus;
|
|
2995
|
+
}
|
|
2908
2996
|
}
|
|
2909
|
-
|
|
2910
|
-
|
|
2997
|
+
init(_data) {
|
|
2998
|
+
const data = ensureObject(_data);
|
|
2999
|
+
const payload = data['EditStatus'];
|
|
3000
|
+
this.editStatus = payload ? EditStatus.fromJS(payload) : undefined;
|
|
3001
|
+
}
|
|
3002
|
+
static fromJS(data) {
|
|
3003
|
+
const result = new TestPlanChangedEvent();
|
|
3004
|
+
result.init(data);
|
|
3005
|
+
return result;
|
|
3006
|
+
}
|
|
3007
|
+
toJSON(data) {
|
|
3008
|
+
const json = ensureObject(data);
|
|
3009
|
+
json['EditStatus'] = this.editStatus ? this.editStatus.toJSON() : undefined;
|
|
3010
|
+
return json;
|
|
2911
3011
|
}
|
|
2912
3012
|
}
|
|
2913
3013
|
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, GetTestPlanReferenceResponse, IMetricsConfiguration, Image, Interaction, ListItemType, LogList, MetricsConfiguration, OnTestPlanRun, OnTestStepRun, Parameter, RepositoryPackageDefinition, RepositoryPackageReference, Resource, Result, RunStatus, SaveTestPlanToRepositoryResponse, 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
|
|
@@ -140,9 +188,9 @@ export declare class SessionClient extends BaseClient {
|
|
|
140
188
|
/**
|
|
141
189
|
* Save currently loaded test plan to a repository
|
|
142
190
|
* @param {RepositoryPackageDefinition} packageReference
|
|
143
|
-
* @return Test plan uploaded.
|
|
191
|
+
* @return Test plan uploaded with reference.
|
|
144
192
|
*/
|
|
145
|
-
saveTestPlanToRepository(packageReference: RepositoryPackageDefinition): Promise<
|
|
193
|
+
saveTestPlanToRepository(packageReference: RepositoryPackageDefinition): Promise<SaveTestPlanToRepositoryResponse>;
|
|
146
194
|
/**
|
|
147
195
|
* Test plan resources opened
|
|
148
196
|
* @return Test plan resources opened.
|
|
@@ -184,6 +232,11 @@ export declare class SessionClient extends BaseClient {
|
|
|
184
232
|
* @return {Promise<void>}
|
|
185
233
|
*/
|
|
186
234
|
setTestPlanName(testPlanName: string): Promise<void>;
|
|
235
|
+
/**
|
|
236
|
+
* Gets the loaded test plan repository reference.
|
|
237
|
+
* @return {Promise<GetTestPlanReferenceResponse>}
|
|
238
|
+
*/
|
|
239
|
+
getTestPlanReference(): Promise<GetTestPlanReferenceResponse>;
|
|
187
240
|
/**
|
|
188
241
|
* Retrieve all validation errors present in the test plan
|
|
189
242
|
* @return Retrieved validation errors for loaded TestPlan
|
|
@@ -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
|
|
@@ -322,10 +400,12 @@ export class SessionClient extends BaseClient {
|
|
|
322
400
|
/**
|
|
323
401
|
* Save currently loaded test plan to a repository
|
|
324
402
|
* @param {RepositoryPackageDefinition} packageReference
|
|
325
|
-
* @return Test plan uploaded.
|
|
403
|
+
* @return Test plan uploaded with reference.
|
|
326
404
|
*/
|
|
327
405
|
saveTestPlanToRepository(packageReference) {
|
|
328
|
-
return this.request('SaveTestPlanToRepository', packageReference)
|
|
406
|
+
return this.request('SaveTestPlanToRepository', packageReference)
|
|
407
|
+
.then(this.success())
|
|
408
|
+
.catch(this.error());
|
|
329
409
|
}
|
|
330
410
|
/**
|
|
331
411
|
* Test plan resources opened
|
|
@@ -401,6 +481,13 @@ export class SessionClient extends BaseClient {
|
|
|
401
481
|
setTestPlanName(testPlanName) {
|
|
402
482
|
return this.request('SetTestPlanName', testPlanName).then(this.success()).catch(this.error());
|
|
403
483
|
}
|
|
484
|
+
/**
|
|
485
|
+
* Gets the loaded test plan repository reference.
|
|
486
|
+
* @return {Promise<GetTestPlanReferenceResponse>}
|
|
487
|
+
*/
|
|
488
|
+
getTestPlanReference() {
|
|
489
|
+
return this.request('GetTestPlanReference').then(this.success()).catch(this.error());
|
|
490
|
+
}
|
|
404
491
|
/**
|
|
405
492
|
* Retrieve all validation errors present in the test plan
|
|
406
493
|
* @return Retrieved validation errors for loaded TestPlan
|
|
@@ -709,7 +796,7 @@ SessionClient.sessionEventFactories = {
|
|
|
709
796
|
[SessionEventName.Heartbeat]: payload => HeartbeatEvent.fromJS(payload),
|
|
710
797
|
[SessionEventName.Stopping]: () => StoppingEvent.fromJS(),
|
|
711
798
|
[SessionEventName.Stopped]: () => StoppedEvent.fromJS(),
|
|
712
|
-
[SessionEventName.TestPlanChanged]:
|
|
799
|
+
[SessionEventName.TestPlanChanged]: payload => TestPlanChangedEvent.fromJS(payload),
|
|
713
800
|
[SessionEventName.SessionStateChanged]: payload => SessionStateChangedEvent.fromJS(payload),
|
|
714
801
|
[SessionEventName.SettingsChanged]: payload => SettingsChangedEvent.fromJS(payload),
|
|
715
802
|
[SessionEventName.TestStepChanged]: payload => TestStepChangedEvent.fromJS(payload),
|