@autifyhq/autify-sdk 0.30.1 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/generated/web/client.d.ts +125 -4
- package/dist/generated/web/client.js +149 -4
- package/dist/generated/web/openapi/api.d.ts +1638 -133
- package/dist/generated/web/openapi/api.js +1131 -48
- package/package.json +1 -1
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* Do not edit the class manually.
|
|
14
14
|
*/
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.
|
|
16
|
+
exports.TestPlanVariableApi = exports.TestPlanVariableApiFactory = exports.TestPlanVariableApiFp = exports.TestPlanVariableApiAxiosParamCreator = exports.ScheduleApi = exports.ScheduleApiFactory = exports.ScheduleApiFp = exports.ScheduleApiAxiosParamCreator = exports.ScenarioApi = exports.ScenarioApiFactory = exports.ScenarioApiFp = exports.ScenarioApiAxiosParamCreator = exports.ResultApi = exports.ResultApiFactory = exports.ResultApiFp = exports.ResultApiAxiosParamCreator = exports.ProjectApi = exports.ProjectApiFactory = exports.ProjectApiFp = exports.ProjectApiAxiosParamCreator = exports.CreditApi = exports.CreditApiFactory = exports.CreditApiFp = exports.CreditApiAxiosParamCreator = exports.CapabilityApi = exports.CapabilityApiFactory = exports.CapabilityApiFp = exports.CapabilityApiAxiosParamCreator = exports.AutifyConnectApi = exports.AutifyConnectApiFactory = exports.AutifyConnectApiFp = exports.AutifyConnectApiAxiosParamCreator = exports.TimezoneEnum = exports.TestPlanResultStatus = exports.TestCaseResultStepUrlEventsInnerTimingEnum = exports.TestCaseResultStepMatchLocatedByEnum = exports.TestCaseResultStepStatusEnum = exports.TestCaseResultStepStepExecutionTypeEnum = exports.TestCaseResultStepOnFailureEnum = exports.TestCaseResultStatus = exports.StepKeywordArgumentTypeEnum = exports.ScenarioStepArgumentOverridesValueArgumentsInnerTypeEnum = exports.ScenarioStepArgumentTypeEnum = exports.ScenarioStepStepExecutionTypeEnum = exports.ScenarioStepOnFailureEnum = exports.ResultStepArgumentTypeEnum = exports.OsTypeEnum = exports.ExecuteScenariosRequestExecutionTypeEnum = exports.DeviceTypeEnum = exports.BrowserTypeEnum = void 0;
|
|
17
|
+
exports.UrlReplacementApi = exports.UrlReplacementApiFactory = exports.UrlReplacementApiFp = exports.UrlReplacementApiAxiosParamCreator = void 0;
|
|
17
18
|
const tslib_1 = require("tslib");
|
|
18
19
|
const axios_1 = tslib_1.__importDefault(require("axios"));
|
|
19
20
|
// URLSearchParams not necessarily used
|
|
@@ -66,6 +67,38 @@ exports.OsTypeEnum = {
|
|
|
66
67
|
Ios: "ios",
|
|
67
68
|
Android: "android",
|
|
68
69
|
};
|
|
70
|
+
exports.ResultStepArgumentTypeEnum = {
|
|
71
|
+
Text: "text",
|
|
72
|
+
Url: "url",
|
|
73
|
+
File: "file",
|
|
74
|
+
Element: "element",
|
|
75
|
+
};
|
|
76
|
+
exports.ScenarioStepOnFailureEnum = {
|
|
77
|
+
Abort: "abort",
|
|
78
|
+
Continue: "continue",
|
|
79
|
+
Ignore: "ignore",
|
|
80
|
+
};
|
|
81
|
+
exports.ScenarioStepStepExecutionTypeEnum = {
|
|
82
|
+
ScenarioStep: "scenario_step",
|
|
83
|
+
CleanupStep: "cleanup_step",
|
|
84
|
+
};
|
|
85
|
+
exports.ScenarioStepArgumentTypeEnum = {
|
|
86
|
+
Text: "text",
|
|
87
|
+
Url: "url",
|
|
88
|
+
File: "file",
|
|
89
|
+
Element: "element",
|
|
90
|
+
StepGroup: "step_group",
|
|
91
|
+
};
|
|
92
|
+
exports.ScenarioStepArgumentOverridesValueArgumentsInnerTypeEnum = {
|
|
93
|
+
Text: "text",
|
|
94
|
+
Url: "url",
|
|
95
|
+
};
|
|
96
|
+
exports.StepKeywordArgumentTypeEnum = {
|
|
97
|
+
Text: "text",
|
|
98
|
+
Url: "url",
|
|
99
|
+
File: "file",
|
|
100
|
+
Element: "element",
|
|
101
|
+
};
|
|
69
102
|
/**
|
|
70
103
|
*
|
|
71
104
|
* @export
|
|
@@ -80,6 +113,28 @@ exports.TestCaseResultStatus = {
|
|
|
80
113
|
InternalError: "internal_error",
|
|
81
114
|
Canceled: "canceled",
|
|
82
115
|
};
|
|
116
|
+
exports.TestCaseResultStepOnFailureEnum = {
|
|
117
|
+
Abort: "abort",
|
|
118
|
+
Continue: "continue",
|
|
119
|
+
Ignore: "ignore",
|
|
120
|
+
};
|
|
121
|
+
exports.TestCaseResultStepStepExecutionTypeEnum = {
|
|
122
|
+
ScenarioStep: "scenario_step",
|
|
123
|
+
CleanupStep: "cleanup_step",
|
|
124
|
+
};
|
|
125
|
+
exports.TestCaseResultStepStatusEnum = {
|
|
126
|
+
Passed: "passed",
|
|
127
|
+
Failed: "failed",
|
|
128
|
+
Skipped: "skipped",
|
|
129
|
+
};
|
|
130
|
+
exports.TestCaseResultStepMatchLocatedByEnum = {
|
|
131
|
+
UserLocator: "user_locator",
|
|
132
|
+
Automatic: "automatic",
|
|
133
|
+
};
|
|
134
|
+
exports.TestCaseResultStepUrlEventsInnerTimingEnum = {
|
|
135
|
+
StepStart: "stepStart",
|
|
136
|
+
StepEnd: "stepEnd",
|
|
137
|
+
};
|
|
83
138
|
/**
|
|
84
139
|
*
|
|
85
140
|
* @export
|
|
@@ -718,6 +773,41 @@ const ProjectApiAxiosParamCreator = function (configuration) {
|
|
|
718
773
|
options: localVarRequestOptions,
|
|
719
774
|
};
|
|
720
775
|
},
|
|
776
|
+
/**
|
|
777
|
+
* List the projects (workspaces) the access token\'s user is a member of, plus their partner\'s workspaces for a partner admin, ordered by id.
|
|
778
|
+
* @param {*} [options] Override http request option.
|
|
779
|
+
* @throws {RequiredError}
|
|
780
|
+
*/
|
|
781
|
+
listProjects: async (options = {}) => {
|
|
782
|
+
const localVarPath = `/projects`;
|
|
783
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
784
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
785
|
+
let baseOptions;
|
|
786
|
+
if (configuration) {
|
|
787
|
+
baseOptions = configuration.baseOptions;
|
|
788
|
+
}
|
|
789
|
+
const localVarRequestOptions = {
|
|
790
|
+
method: "GET",
|
|
791
|
+
...baseOptions,
|
|
792
|
+
...options,
|
|
793
|
+
};
|
|
794
|
+
const localVarHeaderParameter = {};
|
|
795
|
+
const localVarQueryParameter = {};
|
|
796
|
+
// authentication bearerAuth required
|
|
797
|
+
// http bearer authentication required
|
|
798
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
799
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
800
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
801
|
+
localVarRequestOptions.headers = {
|
|
802
|
+
...localVarHeaderParameter,
|
|
803
|
+
...headersFromBaseOptions,
|
|
804
|
+
...options.headers,
|
|
805
|
+
};
|
|
806
|
+
return {
|
|
807
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
808
|
+
options: localVarRequestOptions,
|
|
809
|
+
};
|
|
810
|
+
},
|
|
721
811
|
};
|
|
722
812
|
};
|
|
723
813
|
exports.ProjectApiAxiosParamCreator = ProjectApiAxiosParamCreator;
|
|
@@ -738,6 +828,15 @@ const ProjectApiFp = function (configuration) {
|
|
|
738
828
|
const localVarAxiosArgs = await localVarAxiosParamCreator.getProjectInfo(projectId, options);
|
|
739
829
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
740
830
|
},
|
|
831
|
+
/**
|
|
832
|
+
* List the projects (workspaces) the access token\'s user is a member of, plus their partner\'s workspaces for a partner admin, ordered by id.
|
|
833
|
+
* @param {*} [options] Override http request option.
|
|
834
|
+
* @throws {RequiredError}
|
|
835
|
+
*/
|
|
836
|
+
async listProjects(options) {
|
|
837
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listProjects(options);
|
|
838
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
839
|
+
},
|
|
741
840
|
};
|
|
742
841
|
};
|
|
743
842
|
exports.ProjectApiFp = ProjectApiFp;
|
|
@@ -759,6 +858,16 @@ const ProjectApiFactory = function (configuration, basePath, axios) {
|
|
|
759
858
|
.getProjectInfo(projectId, options)
|
|
760
859
|
.then((request) => request(axios, basePath));
|
|
761
860
|
},
|
|
861
|
+
/**
|
|
862
|
+
* List the projects (workspaces) the access token\'s user is a member of, plus their partner\'s workspaces for a partner admin, ordered by id.
|
|
863
|
+
* @param {*} [options] Override http request option.
|
|
864
|
+
* @throws {RequiredError}
|
|
865
|
+
*/
|
|
866
|
+
listProjects(options) {
|
|
867
|
+
return localVarFp
|
|
868
|
+
.listProjects(options)
|
|
869
|
+
.then((request) => request(axios, basePath));
|
|
870
|
+
},
|
|
762
871
|
};
|
|
763
872
|
};
|
|
764
873
|
exports.ProjectApiFactory = ProjectApiFactory;
|
|
@@ -781,6 +890,17 @@ class ProjectApi extends base_1.BaseAPI {
|
|
|
781
890
|
.getProjectInfo(projectId, options)
|
|
782
891
|
.then((request) => request(this.axios, this.basePath));
|
|
783
892
|
}
|
|
893
|
+
/**
|
|
894
|
+
* List the projects (workspaces) the access token\'s user is a member of, plus their partner\'s workspaces for a partner admin, ordered by id.
|
|
895
|
+
* @param {*} [options] Override http request option.
|
|
896
|
+
* @throws {RequiredError}
|
|
897
|
+
* @memberof ProjectApi
|
|
898
|
+
*/
|
|
899
|
+
listProjects(options) {
|
|
900
|
+
return (0, exports.ProjectApiFp)(this.configuration)
|
|
901
|
+
.listProjects(options)
|
|
902
|
+
.then((request) => request(this.axios, this.basePath));
|
|
903
|
+
}
|
|
784
904
|
}
|
|
785
905
|
exports.ProjectApi = ProjectApi;
|
|
786
906
|
/**
|
|
@@ -795,10 +915,11 @@ const ResultApiAxiosParamCreator = function (configuration) {
|
|
|
795
915
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
796
916
|
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
797
917
|
* @param {boolean} [getDetails] The flag to get details of the test case result.
|
|
918
|
+
* @param {Array<'failed' | 'internal_error' | 'review_needed'>} [statuses] Return only the test case results matching any of these filters, the same ones the result page offers. `failed` matches failed and internal-error test cases, `internal_error` only internal errors, and `review_needed` test cases with element warnings to review. For example `statuses=failed,review_needed`. Omit to return every test case result.
|
|
798
919
|
* @param {*} [options] Override http request option.
|
|
799
920
|
* @throws {RequiredError}
|
|
800
921
|
*/
|
|
801
|
-
describeResult: async (projectId, resultId, getDetails, options = {}) => {
|
|
922
|
+
describeResult: async (projectId, resultId, getDetails, statuses, options = {}) => {
|
|
802
923
|
// verify required parameter 'projectId' is not null or undefined
|
|
803
924
|
(0, common_1.assertParamExists)("describeResult", "projectId", projectId);
|
|
804
925
|
// verify required parameter 'resultId' is not null or undefined
|
|
@@ -825,6 +946,53 @@ const ResultApiAxiosParamCreator = function (configuration) {
|
|
|
825
946
|
if (getDetails !== undefined) {
|
|
826
947
|
localVarQueryParameter["get_details"] = getDetails;
|
|
827
948
|
}
|
|
949
|
+
if (statuses) {
|
|
950
|
+
localVarQueryParameter["statuses"] = statuses.join(base_1.COLLECTION_FORMATS.csv);
|
|
951
|
+
}
|
|
952
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
953
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
954
|
+
localVarRequestOptions.headers = {
|
|
955
|
+
...localVarHeaderParameter,
|
|
956
|
+
...headersFromBaseOptions,
|
|
957
|
+
...options.headers,
|
|
958
|
+
};
|
|
959
|
+
return {
|
|
960
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
961
|
+
options: localVarRequestOptions,
|
|
962
|
+
};
|
|
963
|
+
},
|
|
964
|
+
/**
|
|
965
|
+
* Get the step-by-step breakdown of a single test case result, including the element locators Autify resolved for each step. A "test case result" is the execution of one scenario on one capability. You can obtain its ID from the `test_plan_capability_results[].test_case_results[].id` field returned by `describeResult`. Use this to see which step failed and why, and to read back the locators Autify generated for an element, which are usually better than a selector you would write by hand. To see what the page looked like, fetch a step\'s `screenshot_url`. On a failed step, compare its screenshot with the one from the step before it. Note: a step reports its keyword as `action_type`, the same enum `listStepKeywords` and `describeScenario` use, rather than as a name. The localized label the UI shows appears only in `describeResult` (`get_details`). Values typed into a password field are returned as `******`.
|
|
966
|
+
* @summary Get the steps and element locators of a test case result.
|
|
967
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
968
|
+
* @param {number} testCaseResultId The ID of the test case result. Obtainable from the `test_case_results[].id` field of `describeResult`.
|
|
969
|
+
* @param {*} [options] Override http request option.
|
|
970
|
+
* @throws {RequiredError}
|
|
971
|
+
*/
|
|
972
|
+
describeTestCaseResult: async (projectId, testCaseResultId, options = {}) => {
|
|
973
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
974
|
+
(0, common_1.assertParamExists)("describeTestCaseResult", "projectId", projectId);
|
|
975
|
+
// verify required parameter 'testCaseResultId' is not null or undefined
|
|
976
|
+
(0, common_1.assertParamExists)("describeTestCaseResult", "testCaseResultId", testCaseResultId);
|
|
977
|
+
const localVarPath = `/projects/{project_id}/test_case_results/{test_case_result_id}`
|
|
978
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
979
|
+
.replace(`{${"test_case_result_id"}}`, encodeURIComponent(String(testCaseResultId)));
|
|
980
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
981
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
982
|
+
let baseOptions;
|
|
983
|
+
if (configuration) {
|
|
984
|
+
baseOptions = configuration.baseOptions;
|
|
985
|
+
}
|
|
986
|
+
const localVarRequestOptions = {
|
|
987
|
+
method: "GET",
|
|
988
|
+
...baseOptions,
|
|
989
|
+
...options,
|
|
990
|
+
};
|
|
991
|
+
const localVarHeaderParameter = {};
|
|
992
|
+
const localVarQueryParameter = {};
|
|
993
|
+
// authentication bearerAuth required
|
|
994
|
+
// http bearer authentication required
|
|
995
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
828
996
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
829
997
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
830
998
|
localVarRequestOptions.headers = {
|
|
@@ -888,6 +1056,102 @@ const ResultApiAxiosParamCreator = function (configuration) {
|
|
|
888
1056
|
options: localVarRequestOptions,
|
|
889
1057
|
};
|
|
890
1058
|
},
|
|
1059
|
+
/**
|
|
1060
|
+
* List the test results of a single scenario, newest first. Each entry is one execution of that scenario on one capability, so a scenario run against three browsers contributes three entries. Use this to see how one scenario has been doing over time, which `listResults` cannot answer: that endpoint returns whole test plan executions and is filterable only by test plan. `review_needed` is the number of "Review needed" element warnings raised by that execution. A count that climbs over recent results means the scenario\'s element locators are drifting.
|
|
1061
|
+
* @summary List the test results of one scenario.
|
|
1062
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1063
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1064
|
+
* @param {number} [page] The number of page returns.
|
|
1065
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
1066
|
+
* @param {*} [options] Override http request option.
|
|
1067
|
+
* @throws {RequiredError}
|
|
1068
|
+
*/
|
|
1069
|
+
listScenarioResults: async (projectId, scenarioId, page, perPage, options = {}) => {
|
|
1070
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1071
|
+
(0, common_1.assertParamExists)("listScenarioResults", "projectId", projectId);
|
|
1072
|
+
// verify required parameter 'scenarioId' is not null or undefined
|
|
1073
|
+
(0, common_1.assertParamExists)("listScenarioResults", "scenarioId", scenarioId);
|
|
1074
|
+
const localVarPath = `/projects/{project_id}/scenarios/{scenario_id}/results`
|
|
1075
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1076
|
+
.replace(`{${"scenario_id"}}`, encodeURIComponent(String(scenarioId)));
|
|
1077
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1078
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1079
|
+
let baseOptions;
|
|
1080
|
+
if (configuration) {
|
|
1081
|
+
baseOptions = configuration.baseOptions;
|
|
1082
|
+
}
|
|
1083
|
+
const localVarRequestOptions = {
|
|
1084
|
+
method: "GET",
|
|
1085
|
+
...baseOptions,
|
|
1086
|
+
...options,
|
|
1087
|
+
};
|
|
1088
|
+
const localVarHeaderParameter = {};
|
|
1089
|
+
const localVarQueryParameter = {};
|
|
1090
|
+
// authentication bearerAuth required
|
|
1091
|
+
// http bearer authentication required
|
|
1092
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1093
|
+
if (page !== undefined) {
|
|
1094
|
+
localVarQueryParameter["page"] = page;
|
|
1095
|
+
}
|
|
1096
|
+
if (perPage !== undefined) {
|
|
1097
|
+
localVarQueryParameter["per_page"] = perPage;
|
|
1098
|
+
}
|
|
1099
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1100
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1101
|
+
localVarRequestOptions.headers = {
|
|
1102
|
+
...localVarHeaderParameter,
|
|
1103
|
+
...headersFromBaseOptions,
|
|
1104
|
+
...options.headers,
|
|
1105
|
+
};
|
|
1106
|
+
return {
|
|
1107
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1108
|
+
options: localVarRequestOptions,
|
|
1109
|
+
};
|
|
1110
|
+
},
|
|
1111
|
+
/**
|
|
1112
|
+
* Start a new test result that reruns every test case of this result that failed or ended in an internal error, the same rerun the "Rerun failed tests" button starts. Each test case runs with the data table row and the imported variable values it ran with originally, and the new result records this one as the result it reruns. It reruns even if someone edited a failed scenario since, so you can rerun the test cases to check your fix. Prefer this over `executeScenarios` when you are fixing the failures of a test plan\'s result. The rerun belongs to the test plan and runs with the plan\'s capabilities and settings, so the plan\'s results record its passes. `executeScenarios` starts a result outside the test plan, and the plan\'s latest result stays failed. To rerun only some of the failed scenarios, use `executeScenarios` instead. That starts a separate result, without the original\'s data table rows or imported values. Poll the returned `result_id` with `describeResult` to follow the rerun.
|
|
1113
|
+
* @summary Rerun the failed test cases of a test result.
|
|
1114
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1115
|
+
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1116
|
+
* @param {*} [options] Override http request option.
|
|
1117
|
+
* @throws {RequiredError}
|
|
1118
|
+
*/
|
|
1119
|
+
rerunFailedTestCases: async (projectId, resultId, options = {}) => {
|
|
1120
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1121
|
+
(0, common_1.assertParamExists)("rerunFailedTestCases", "projectId", projectId);
|
|
1122
|
+
// verify required parameter 'resultId' is not null or undefined
|
|
1123
|
+
(0, common_1.assertParamExists)("rerunFailedTestCases", "resultId", resultId);
|
|
1124
|
+
const localVarPath = `/projects/{project_id}/results/{result_id}/rerun`
|
|
1125
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1126
|
+
.replace(`{${"result_id"}}`, encodeURIComponent(String(resultId)));
|
|
1127
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1128
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1129
|
+
let baseOptions;
|
|
1130
|
+
if (configuration) {
|
|
1131
|
+
baseOptions = configuration.baseOptions;
|
|
1132
|
+
}
|
|
1133
|
+
const localVarRequestOptions = {
|
|
1134
|
+
method: "POST",
|
|
1135
|
+
...baseOptions,
|
|
1136
|
+
...options,
|
|
1137
|
+
};
|
|
1138
|
+
const localVarHeaderParameter = {};
|
|
1139
|
+
const localVarQueryParameter = {};
|
|
1140
|
+
// authentication bearerAuth required
|
|
1141
|
+
// http bearer authentication required
|
|
1142
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1143
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1144
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1145
|
+
localVarRequestOptions.headers = {
|
|
1146
|
+
...localVarHeaderParameter,
|
|
1147
|
+
...headersFromBaseOptions,
|
|
1148
|
+
...options.headers,
|
|
1149
|
+
};
|
|
1150
|
+
return {
|
|
1151
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1152
|
+
options: localVarRequestOptions,
|
|
1153
|
+
};
|
|
1154
|
+
},
|
|
891
1155
|
};
|
|
892
1156
|
};
|
|
893
1157
|
exports.ResultApiAxiosParamCreator = ResultApiAxiosParamCreator;
|
|
@@ -904,11 +1168,24 @@ const ResultApiFp = function (configuration) {
|
|
|
904
1168
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
905
1169
|
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
906
1170
|
* @param {boolean} [getDetails] The flag to get details of the test case result.
|
|
1171
|
+
* @param {Array<'failed' | 'internal_error' | 'review_needed'>} [statuses] Return only the test case results matching any of these filters, the same ones the result page offers. `failed` matches failed and internal-error test cases, `internal_error` only internal errors, and `review_needed` test cases with element warnings to review. For example `statuses=failed,review_needed`. Omit to return every test case result.
|
|
1172
|
+
* @param {*} [options] Override http request option.
|
|
1173
|
+
* @throws {RequiredError}
|
|
1174
|
+
*/
|
|
1175
|
+
async describeResult(projectId, resultId, getDetails, statuses, options) {
|
|
1176
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.describeResult(projectId, resultId, getDetails, statuses, options);
|
|
1177
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1178
|
+
},
|
|
1179
|
+
/**
|
|
1180
|
+
* Get the step-by-step breakdown of a single test case result, including the element locators Autify resolved for each step. A "test case result" is the execution of one scenario on one capability. You can obtain its ID from the `test_plan_capability_results[].test_case_results[].id` field returned by `describeResult`. Use this to see which step failed and why, and to read back the locators Autify generated for an element, which are usually better than a selector you would write by hand. To see what the page looked like, fetch a step\'s `screenshot_url`. On a failed step, compare its screenshot with the one from the step before it. Note: a step reports its keyword as `action_type`, the same enum `listStepKeywords` and `describeScenario` use, rather than as a name. The localized label the UI shows appears only in `describeResult` (`get_details`). Values typed into a password field are returned as `******`.
|
|
1181
|
+
* @summary Get the steps and element locators of a test case result.
|
|
1182
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1183
|
+
* @param {number} testCaseResultId The ID of the test case result. Obtainable from the `test_case_results[].id` field of `describeResult`.
|
|
907
1184
|
* @param {*} [options] Override http request option.
|
|
908
1185
|
* @throws {RequiredError}
|
|
909
1186
|
*/
|
|
910
|
-
async
|
|
911
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.
|
|
1187
|
+
async describeTestCaseResult(projectId, testCaseResultId, options) {
|
|
1188
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.describeTestCaseResult(projectId, testCaseResultId, options);
|
|
912
1189
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
913
1190
|
},
|
|
914
1191
|
/**
|
|
@@ -925,6 +1202,32 @@ const ResultApiFp = function (configuration) {
|
|
|
925
1202
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listResults(projectId, page, perPage, testPlanId, options);
|
|
926
1203
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
927
1204
|
},
|
|
1205
|
+
/**
|
|
1206
|
+
* List the test results of a single scenario, newest first. Each entry is one execution of that scenario on one capability, so a scenario run against three browsers contributes three entries. Use this to see how one scenario has been doing over time, which `listResults` cannot answer: that endpoint returns whole test plan executions and is filterable only by test plan. `review_needed` is the number of "Review needed" element warnings raised by that execution. A count that climbs over recent results means the scenario\'s element locators are drifting.
|
|
1207
|
+
* @summary List the test results of one scenario.
|
|
1208
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1209
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1210
|
+
* @param {number} [page] The number of page returns.
|
|
1211
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
1212
|
+
* @param {*} [options] Override http request option.
|
|
1213
|
+
* @throws {RequiredError}
|
|
1214
|
+
*/
|
|
1215
|
+
async listScenarioResults(projectId, scenarioId, page, perPage, options) {
|
|
1216
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listScenarioResults(projectId, scenarioId, page, perPage, options);
|
|
1217
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1218
|
+
},
|
|
1219
|
+
/**
|
|
1220
|
+
* Start a new test result that reruns every test case of this result that failed or ended in an internal error, the same rerun the "Rerun failed tests" button starts. Each test case runs with the data table row and the imported variable values it ran with originally, and the new result records this one as the result it reruns. It reruns even if someone edited a failed scenario since, so you can rerun the test cases to check your fix. Prefer this over `executeScenarios` when you are fixing the failures of a test plan\'s result. The rerun belongs to the test plan and runs with the plan\'s capabilities and settings, so the plan\'s results record its passes. `executeScenarios` starts a result outside the test plan, and the plan\'s latest result stays failed. To rerun only some of the failed scenarios, use `executeScenarios` instead. That starts a separate result, without the original\'s data table rows or imported values. Poll the returned `result_id` with `describeResult` to follow the rerun.
|
|
1221
|
+
* @summary Rerun the failed test cases of a test result.
|
|
1222
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1223
|
+
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1224
|
+
* @param {*} [options] Override http request option.
|
|
1225
|
+
* @throws {RequiredError}
|
|
1226
|
+
*/
|
|
1227
|
+
async rerunFailedTestCases(projectId, resultId, options) {
|
|
1228
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.rerunFailedTestCases(projectId, resultId, options);
|
|
1229
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1230
|
+
},
|
|
928
1231
|
};
|
|
929
1232
|
};
|
|
930
1233
|
exports.ResultApiFp = ResultApiFp;
|
|
@@ -941,12 +1244,26 @@ const ResultApiFactory = function (configuration, basePath, axios) {
|
|
|
941
1244
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
942
1245
|
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
943
1246
|
* @param {boolean} [getDetails] The flag to get details of the test case result.
|
|
1247
|
+
* @param {Array<'failed' | 'internal_error' | 'review_needed'>} [statuses] Return only the test case results matching any of these filters, the same ones the result page offers. `failed` matches failed and internal-error test cases, `internal_error` only internal errors, and `review_needed` test cases with element warnings to review. For example `statuses=failed,review_needed`. Omit to return every test case result.
|
|
1248
|
+
* @param {*} [options] Override http request option.
|
|
1249
|
+
* @throws {RequiredError}
|
|
1250
|
+
*/
|
|
1251
|
+
describeResult(projectId, resultId, getDetails, statuses, options) {
|
|
1252
|
+
return localVarFp
|
|
1253
|
+
.describeResult(projectId, resultId, getDetails, statuses, options)
|
|
1254
|
+
.then((request) => request(axios, basePath));
|
|
1255
|
+
},
|
|
1256
|
+
/**
|
|
1257
|
+
* Get the step-by-step breakdown of a single test case result, including the element locators Autify resolved for each step. A "test case result" is the execution of one scenario on one capability. You can obtain its ID from the `test_plan_capability_results[].test_case_results[].id` field returned by `describeResult`. Use this to see which step failed and why, and to read back the locators Autify generated for an element, which are usually better than a selector you would write by hand. To see what the page looked like, fetch a step\'s `screenshot_url`. On a failed step, compare its screenshot with the one from the step before it. Note: a step reports its keyword as `action_type`, the same enum `listStepKeywords` and `describeScenario` use, rather than as a name. The localized label the UI shows appears only in `describeResult` (`get_details`). Values typed into a password field are returned as `******`.
|
|
1258
|
+
* @summary Get the steps and element locators of a test case result.
|
|
1259
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1260
|
+
* @param {number} testCaseResultId The ID of the test case result. Obtainable from the `test_case_results[].id` field of `describeResult`.
|
|
944
1261
|
* @param {*} [options] Override http request option.
|
|
945
1262
|
* @throws {RequiredError}
|
|
946
1263
|
*/
|
|
947
|
-
|
|
1264
|
+
describeTestCaseResult(projectId, testCaseResultId, options) {
|
|
948
1265
|
return localVarFp
|
|
949
|
-
.
|
|
1266
|
+
.describeTestCaseResult(projectId, testCaseResultId, options)
|
|
950
1267
|
.then((request) => request(axios, basePath));
|
|
951
1268
|
},
|
|
952
1269
|
/**
|
|
@@ -964,6 +1281,34 @@ const ResultApiFactory = function (configuration, basePath, axios) {
|
|
|
964
1281
|
.listResults(projectId, page, perPage, testPlanId, options)
|
|
965
1282
|
.then((request) => request(axios, basePath));
|
|
966
1283
|
},
|
|
1284
|
+
/**
|
|
1285
|
+
* List the test results of a single scenario, newest first. Each entry is one execution of that scenario on one capability, so a scenario run against three browsers contributes three entries. Use this to see how one scenario has been doing over time, which `listResults` cannot answer: that endpoint returns whole test plan executions and is filterable only by test plan. `review_needed` is the number of "Review needed" element warnings raised by that execution. A count that climbs over recent results means the scenario\'s element locators are drifting.
|
|
1286
|
+
* @summary List the test results of one scenario.
|
|
1287
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1288
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1289
|
+
* @param {number} [page] The number of page returns.
|
|
1290
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
1291
|
+
* @param {*} [options] Override http request option.
|
|
1292
|
+
* @throws {RequiredError}
|
|
1293
|
+
*/
|
|
1294
|
+
listScenarioResults(projectId, scenarioId, page, perPage, options) {
|
|
1295
|
+
return localVarFp
|
|
1296
|
+
.listScenarioResults(projectId, scenarioId, page, perPage, options)
|
|
1297
|
+
.then((request) => request(axios, basePath));
|
|
1298
|
+
},
|
|
1299
|
+
/**
|
|
1300
|
+
* Start a new test result that reruns every test case of this result that failed or ended in an internal error, the same rerun the "Rerun failed tests" button starts. Each test case runs with the data table row and the imported variable values it ran with originally, and the new result records this one as the result it reruns. It reruns even if someone edited a failed scenario since, so you can rerun the test cases to check your fix. Prefer this over `executeScenarios` when you are fixing the failures of a test plan\'s result. The rerun belongs to the test plan and runs with the plan\'s capabilities and settings, so the plan\'s results record its passes. `executeScenarios` starts a result outside the test plan, and the plan\'s latest result stays failed. To rerun only some of the failed scenarios, use `executeScenarios` instead. That starts a separate result, without the original\'s data table rows or imported values. Poll the returned `result_id` with `describeResult` to follow the rerun.
|
|
1301
|
+
* @summary Rerun the failed test cases of a test result.
|
|
1302
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1303
|
+
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1304
|
+
* @param {*} [options] Override http request option.
|
|
1305
|
+
* @throws {RequiredError}
|
|
1306
|
+
*/
|
|
1307
|
+
rerunFailedTestCases(projectId, resultId, options) {
|
|
1308
|
+
return localVarFp
|
|
1309
|
+
.rerunFailedTestCases(projectId, resultId, options)
|
|
1310
|
+
.then((request) => request(axios, basePath));
|
|
1311
|
+
},
|
|
967
1312
|
};
|
|
968
1313
|
};
|
|
969
1314
|
exports.ResultApiFactory = ResultApiFactory;
|
|
@@ -980,13 +1325,28 @@ class ResultApi extends base_1.BaseAPI {
|
|
|
980
1325
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
981
1326
|
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
982
1327
|
* @param {boolean} [getDetails] The flag to get details of the test case result.
|
|
1328
|
+
* @param {Array<'failed' | 'internal_error' | 'review_needed'>} [statuses] Return only the test case results matching any of these filters, the same ones the result page offers. `failed` matches failed and internal-error test cases, `internal_error` only internal errors, and `review_needed` test cases with element warnings to review. For example `statuses=failed,review_needed`. Omit to return every test case result.
|
|
983
1329
|
* @param {*} [options] Override http request option.
|
|
984
1330
|
* @throws {RequiredError}
|
|
985
1331
|
* @memberof ResultApi
|
|
986
1332
|
*/
|
|
987
|
-
describeResult(projectId, resultId, getDetails, options) {
|
|
1333
|
+
describeResult(projectId, resultId, getDetails, statuses, options) {
|
|
988
1334
|
return (0, exports.ResultApiFp)(this.configuration)
|
|
989
|
-
.describeResult(projectId, resultId, getDetails, options)
|
|
1335
|
+
.describeResult(projectId, resultId, getDetails, statuses, options)
|
|
1336
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1337
|
+
}
|
|
1338
|
+
/**
|
|
1339
|
+
* Get the step-by-step breakdown of a single test case result, including the element locators Autify resolved for each step. A "test case result" is the execution of one scenario on one capability. You can obtain its ID from the `test_plan_capability_results[].test_case_results[].id` field returned by `describeResult`. Use this to see which step failed and why, and to read back the locators Autify generated for an element, which are usually better than a selector you would write by hand. To see what the page looked like, fetch a step\'s `screenshot_url`. On a failed step, compare its screenshot with the one from the step before it. Note: a step reports its keyword as `action_type`, the same enum `listStepKeywords` and `describeScenario` use, rather than as a name. The localized label the UI shows appears only in `describeResult` (`get_details`). Values typed into a password field are returned as `******`.
|
|
1340
|
+
* @summary Get the steps and element locators of a test case result.
|
|
1341
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1342
|
+
* @param {number} testCaseResultId The ID of the test case result. Obtainable from the `test_case_results[].id` field of `describeResult`.
|
|
1343
|
+
* @param {*} [options] Override http request option.
|
|
1344
|
+
* @throws {RequiredError}
|
|
1345
|
+
* @memberof ResultApi
|
|
1346
|
+
*/
|
|
1347
|
+
describeTestCaseResult(projectId, testCaseResultId, options) {
|
|
1348
|
+
return (0, exports.ResultApiFp)(this.configuration)
|
|
1349
|
+
.describeTestCaseResult(projectId, testCaseResultId, options)
|
|
990
1350
|
.then((request) => request(this.axios, this.basePath));
|
|
991
1351
|
}
|
|
992
1352
|
/**
|
|
@@ -1005,16 +1365,134 @@ class ResultApi extends base_1.BaseAPI {
|
|
|
1005
1365
|
.listResults(projectId, page, perPage, testPlanId, options)
|
|
1006
1366
|
.then((request) => request(this.axios, this.basePath));
|
|
1007
1367
|
}
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1368
|
+
/**
|
|
1369
|
+
* List the test results of a single scenario, newest first. Each entry is one execution of that scenario on one capability, so a scenario run against three browsers contributes three entries. Use this to see how one scenario has been doing over time, which `listResults` cannot answer: that endpoint returns whole test plan executions and is filterable only by test plan. `review_needed` is the number of "Review needed" element warnings raised by that execution. A count that climbs over recent results means the scenario\'s element locators are drifting.
|
|
1370
|
+
* @summary List the test results of one scenario.
|
|
1371
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1372
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1373
|
+
* @param {number} [page] The number of page returns.
|
|
1374
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
1375
|
+
* @param {*} [options] Override http request option.
|
|
1376
|
+
* @throws {RequiredError}
|
|
1377
|
+
* @memberof ResultApi
|
|
1378
|
+
*/
|
|
1379
|
+
listScenarioResults(projectId, scenarioId, page, perPage, options) {
|
|
1380
|
+
return (0, exports.ResultApiFp)(this.configuration)
|
|
1381
|
+
.listScenarioResults(projectId, scenarioId, page, perPage, options)
|
|
1382
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* Start a new test result that reruns every test case of this result that failed or ended in an internal error, the same rerun the "Rerun failed tests" button starts. Each test case runs with the data table row and the imported variable values it ran with originally, and the new result records this one as the result it reruns. It reruns even if someone edited a failed scenario since, so you can rerun the test cases to check your fix. Prefer this over `executeScenarios` when you are fixing the failures of a test plan\'s result. The rerun belongs to the test plan and runs with the plan\'s capabilities and settings, so the plan\'s results record its passes. `executeScenarios` starts a result outside the test plan, and the plan\'s latest result stays failed. To rerun only some of the failed scenarios, use `executeScenarios` instead. That starts a separate result, without the original\'s data table rows or imported values. Poll the returned `result_id` with `describeResult` to follow the rerun.
|
|
1386
|
+
* @summary Rerun the failed test cases of a test result.
|
|
1387
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1388
|
+
* @param {number} resultId For example, 4 for the following URL: https://app.autify.com/projects/1/results/4
|
|
1389
|
+
* @param {*} [options] Override http request option.
|
|
1390
|
+
* @throws {RequiredError}
|
|
1391
|
+
* @memberof ResultApi
|
|
1392
|
+
*/
|
|
1393
|
+
rerunFailedTestCases(projectId, resultId, options) {
|
|
1394
|
+
return (0, exports.ResultApiFp)(this.configuration)
|
|
1395
|
+
.rerunFailedTestCases(projectId, resultId, options)
|
|
1396
|
+
.then((request) => request(this.axios, this.basePath));
|
|
1397
|
+
}
|
|
1398
|
+
}
|
|
1399
|
+
exports.ResultApi = ResultApi;
|
|
1400
|
+
/**
|
|
1401
|
+
* ScenarioApi - axios parameter creator
|
|
1402
|
+
* @export
|
|
1403
|
+
*/
|
|
1404
|
+
const ScenarioApiAxiosParamCreator = function (configuration) {
|
|
1015
1405
|
return {
|
|
1016
1406
|
/**
|
|
1017
|
-
*
|
|
1407
|
+
* Create an empty scenario, ready to be given steps. The scenario is created with no steps. Add them with `replaceScenarioSteps`, sending the `version_token` this call returns.
|
|
1408
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
1409
|
+
* @param {CreateScenarioRequest} [createScenarioRequest] The scenario to create
|
|
1410
|
+
* @param {*} [options] Override http request option.
|
|
1411
|
+
* @throws {RequiredError}
|
|
1412
|
+
*/
|
|
1413
|
+
createScenario: async (projectId, createScenarioRequest, options = {}) => {
|
|
1414
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1415
|
+
(0, common_1.assertParamExists)("createScenario", "projectId", projectId);
|
|
1416
|
+
const localVarPath = `/projects/{project_id}/scenarios`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
|
|
1417
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1418
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1419
|
+
let baseOptions;
|
|
1420
|
+
if (configuration) {
|
|
1421
|
+
baseOptions = configuration.baseOptions;
|
|
1422
|
+
}
|
|
1423
|
+
const localVarRequestOptions = {
|
|
1424
|
+
method: "POST",
|
|
1425
|
+
...baseOptions,
|
|
1426
|
+
...options,
|
|
1427
|
+
};
|
|
1428
|
+
const localVarHeaderParameter = {};
|
|
1429
|
+
const localVarQueryParameter = {};
|
|
1430
|
+
// authentication bearerAuth required
|
|
1431
|
+
// http bearer authentication required
|
|
1432
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1433
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1434
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1435
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1436
|
+
localVarRequestOptions.headers = {
|
|
1437
|
+
...localVarHeaderParameter,
|
|
1438
|
+
...headersFromBaseOptions,
|
|
1439
|
+
...options.headers,
|
|
1440
|
+
};
|
|
1441
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(createScenarioRequest, localVarRequestOptions, configuration);
|
|
1442
|
+
return {
|
|
1443
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1444
|
+
options: localVarRequestOptions,
|
|
1445
|
+
};
|
|
1446
|
+
},
|
|
1447
|
+
/**
|
|
1448
|
+
* Delete a scenario and remove it from every test plan that includes it. This can\'t be undone through the API. Autify support can restore a deleted scenario, but it won\'t rejoin its test plans. Confirm with the user before deleting. Step groups can\'t be deleted here. A step group\'s id gets 404.
|
|
1449
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1450
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1451
|
+
* @param {string} [versionToken] The version of the scenario you are deleting, as returned by `version_token` when you read it. If anyone changed the scenario's name, description, labels or steps since then, you get 412 and the scenario stays. Sending an empty value is an error.
|
|
1452
|
+
* @param {*} [options] Override http request option.
|
|
1453
|
+
* @throws {RequiredError}
|
|
1454
|
+
*/
|
|
1455
|
+
deleteScenario: async (projectId, scenarioId, versionToken, options = {}) => {
|
|
1456
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1457
|
+
(0, common_1.assertParamExists)("deleteScenario", "projectId", projectId);
|
|
1458
|
+
// verify required parameter 'scenarioId' is not null or undefined
|
|
1459
|
+
(0, common_1.assertParamExists)("deleteScenario", "scenarioId", scenarioId);
|
|
1460
|
+
const localVarPath = `/projects/{project_id}/scenarios/{scenario_id}`
|
|
1461
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1462
|
+
.replace(`{${"scenario_id"}}`, encodeURIComponent(String(scenarioId)));
|
|
1463
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1464
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1465
|
+
let baseOptions;
|
|
1466
|
+
if (configuration) {
|
|
1467
|
+
baseOptions = configuration.baseOptions;
|
|
1468
|
+
}
|
|
1469
|
+
const localVarRequestOptions = {
|
|
1470
|
+
method: "DELETE",
|
|
1471
|
+
...baseOptions,
|
|
1472
|
+
...options,
|
|
1473
|
+
};
|
|
1474
|
+
const localVarHeaderParameter = {};
|
|
1475
|
+
const localVarQueryParameter = {};
|
|
1476
|
+
// authentication bearerAuth required
|
|
1477
|
+
// http bearer authentication required
|
|
1478
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1479
|
+
if (versionToken !== undefined) {
|
|
1480
|
+
localVarQueryParameter["version_token"] = versionToken;
|
|
1481
|
+
}
|
|
1482
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1483
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1484
|
+
localVarRequestOptions.headers = {
|
|
1485
|
+
...localVarHeaderParameter,
|
|
1486
|
+
...headersFromBaseOptions,
|
|
1487
|
+
...options.headers,
|
|
1488
|
+
};
|
|
1489
|
+
return {
|
|
1490
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1491
|
+
options: localVarRequestOptions,
|
|
1492
|
+
};
|
|
1493
|
+
},
|
|
1494
|
+
/**
|
|
1495
|
+
* Get a scenario, with its steps, data table and variables. Each step names its keyword by the canonical English name that `listStepKeywords` publishes, and lists its arguments in that keyword\'s argument order. An argument that targets an element carries the locators Autify matches it by, rather than a placeholder. An `Execute Javascript` step lists its function arguments after its keyword\'s arguments, as `text` arguments named the way its code refers to them. A function argument that shares a name with one of the keyword\'s arguments is left out. An element whose `user_locator_heals` is true treats `user_locator` as a seed: Autify learns the element from it on the next passing run and matches it automatically after that. Its `seed_locator` is the selector Autify last learned from, and equals `user_locator` once that has happened. An element whose `user_locator_heals` is false uses `user_locator` as a pin on every run. `replaceScenarioSteps` sets it. An `Execute Step Group` step is reported as a reference to its step group rather than expanded in place; read the group itself with this endpoint, using the `step_group_id` from the step\'s argument. The values this call site substitutes into the group come back beside it, in `overrides`. A step recorded on a password field is masked: values typed into it are returned as `******` and the element\'s `candidate_locators` are withheld, as on `describeTestCaseResult`.
|
|
1018
1496
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1019
1497
|
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1020
1498
|
* @param {*} [options] Override http request option.
|
|
@@ -1022,12 +1500,276 @@ const ScenarioApiAxiosParamCreator = function (configuration) {
|
|
|
1022
1500
|
*/
|
|
1023
1501
|
describeScenario: async (projectId, scenarioId, options = {}) => {
|
|
1024
1502
|
// verify required parameter 'projectId' is not null or undefined
|
|
1025
|
-
(0, common_1.assertParamExists)("describeScenario", "projectId", projectId);
|
|
1026
|
-
// verify required parameter 'scenarioId' is not null or undefined
|
|
1027
|
-
(0, common_1.assertParamExists)("describeScenario", "scenarioId", scenarioId);
|
|
1028
|
-
const localVarPath = `/projects/{project_id}/scenarios/{scenario_id}`
|
|
1029
|
-
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1030
|
-
.replace(`{${"scenario_id"}}`, encodeURIComponent(String(scenarioId)));
|
|
1503
|
+
(0, common_1.assertParamExists)("describeScenario", "projectId", projectId);
|
|
1504
|
+
// verify required parameter 'scenarioId' is not null or undefined
|
|
1505
|
+
(0, common_1.assertParamExists)("describeScenario", "scenarioId", scenarioId);
|
|
1506
|
+
const localVarPath = `/projects/{project_id}/scenarios/{scenario_id}`
|
|
1507
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1508
|
+
.replace(`{${"scenario_id"}}`, encodeURIComponent(String(scenarioId)));
|
|
1509
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1510
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1511
|
+
let baseOptions;
|
|
1512
|
+
if (configuration) {
|
|
1513
|
+
baseOptions = configuration.baseOptions;
|
|
1514
|
+
}
|
|
1515
|
+
const localVarRequestOptions = {
|
|
1516
|
+
method: "GET",
|
|
1517
|
+
...baseOptions,
|
|
1518
|
+
...options,
|
|
1519
|
+
};
|
|
1520
|
+
const localVarHeaderParameter = {};
|
|
1521
|
+
const localVarQueryParameter = {};
|
|
1522
|
+
// authentication bearerAuth required
|
|
1523
|
+
// http bearer authentication required
|
|
1524
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1525
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1526
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1527
|
+
localVarRequestOptions.headers = {
|
|
1528
|
+
...localVarHeaderParameter,
|
|
1529
|
+
...headersFromBaseOptions,
|
|
1530
|
+
...options.headers,
|
|
1531
|
+
};
|
|
1532
|
+
return {
|
|
1533
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1534
|
+
options: localVarRequestOptions,
|
|
1535
|
+
};
|
|
1536
|
+
},
|
|
1537
|
+
/**
|
|
1538
|
+
* Get the steps, data table and variables a scenario held at one entry of its history, as listed by `listScenarioHistories`. They come back in the same shape `describeScenario` returns, so an entry can be compared field by field with the scenario as it is now or with another entry. Password masking applies as it does there. Five things differ, because an entry records values rather than the rows they lived in: - An element argument\'s `element_id`, `user_locator_heals` and `seed_locator` are always null, because an entry records none of them. Its `user_locator` and `candidate_locators` are the ones the element had at that save. - A step\'s `id` is the id it had at that save, which may no longer exist in the scenario. It is null on entries saved before late July 2024, when entries started recording step ids. - An `Execute Step Group` step\'s `overrides` are read against the step group as it is now, so an override on a step since removed from the group is not reported. - An export variable set by a step inside a step group resolves its `step_id` against that group as it is now. When more than one called group assigns the same identifier, the step with the lowest id wins. - An entry records the scenario\'s name at that save but not its description or labels, and a later rename does not move it.
|
|
1539
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1540
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1541
|
+
* @param {number} historyId The `id` of an entry `listScenarioHistories` returned for this scenario.
|
|
1542
|
+
* @param {*} [options] Override http request option.
|
|
1543
|
+
* @throws {RequiredError}
|
|
1544
|
+
*/
|
|
1545
|
+
describeScenarioHistory: async (projectId, scenarioId, historyId, options = {}) => {
|
|
1546
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1547
|
+
(0, common_1.assertParamExists)("describeScenarioHistory", "projectId", projectId);
|
|
1548
|
+
// verify required parameter 'scenarioId' is not null or undefined
|
|
1549
|
+
(0, common_1.assertParamExists)("describeScenarioHistory", "scenarioId", scenarioId);
|
|
1550
|
+
// verify required parameter 'historyId' is not null or undefined
|
|
1551
|
+
(0, common_1.assertParamExists)("describeScenarioHistory", "historyId", historyId);
|
|
1552
|
+
const localVarPath = `/projects/{project_id}/scenarios/{scenario_id}/histories/{history_id}`
|
|
1553
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1554
|
+
.replace(`{${"scenario_id"}}`, encodeURIComponent(String(scenarioId)))
|
|
1555
|
+
.replace(`{${"history_id"}}`, encodeURIComponent(String(historyId)));
|
|
1556
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1557
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1558
|
+
let baseOptions;
|
|
1559
|
+
if (configuration) {
|
|
1560
|
+
baseOptions = configuration.baseOptions;
|
|
1561
|
+
}
|
|
1562
|
+
const localVarRequestOptions = {
|
|
1563
|
+
method: "GET",
|
|
1564
|
+
...baseOptions,
|
|
1565
|
+
...options,
|
|
1566
|
+
};
|
|
1567
|
+
const localVarHeaderParameter = {};
|
|
1568
|
+
const localVarQueryParameter = {};
|
|
1569
|
+
// authentication bearerAuth required
|
|
1570
|
+
// http bearer authentication required
|
|
1571
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1572
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1573
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1574
|
+
localVarRequestOptions.headers = {
|
|
1575
|
+
...localVarHeaderParameter,
|
|
1576
|
+
...headersFromBaseOptions,
|
|
1577
|
+
...options.headers,
|
|
1578
|
+
};
|
|
1579
|
+
return {
|
|
1580
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1581
|
+
options: localVarRequestOptions,
|
|
1582
|
+
};
|
|
1583
|
+
},
|
|
1584
|
+
/**
|
|
1585
|
+
* Duplicate a scenario.
|
|
1586
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1587
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1588
|
+
* @param {*} [options] Override http request option.
|
|
1589
|
+
* @throws {RequiredError}
|
|
1590
|
+
*/
|
|
1591
|
+
duplicateScenario: async (projectId, scenarioId, options = {}) => {
|
|
1592
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1593
|
+
(0, common_1.assertParamExists)("duplicateScenario", "projectId", projectId);
|
|
1594
|
+
// verify required parameter 'scenarioId' is not null or undefined
|
|
1595
|
+
(0, common_1.assertParamExists)("duplicateScenario", "scenarioId", scenarioId);
|
|
1596
|
+
const localVarPath = `/projects/{project_id}/scenarios/{scenario_id}/duplications`
|
|
1597
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1598
|
+
.replace(`{${"scenario_id"}}`, encodeURIComponent(String(scenarioId)));
|
|
1599
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1600
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1601
|
+
let baseOptions;
|
|
1602
|
+
if (configuration) {
|
|
1603
|
+
baseOptions = configuration.baseOptions;
|
|
1604
|
+
}
|
|
1605
|
+
const localVarRequestOptions = {
|
|
1606
|
+
method: "POST",
|
|
1607
|
+
...baseOptions,
|
|
1608
|
+
...options,
|
|
1609
|
+
};
|
|
1610
|
+
const localVarHeaderParameter = {};
|
|
1611
|
+
const localVarQueryParameter = {};
|
|
1612
|
+
// authentication bearerAuth required
|
|
1613
|
+
// http bearer authentication required
|
|
1614
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1615
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1616
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1617
|
+
localVarRequestOptions.headers = {
|
|
1618
|
+
...localVarHeaderParameter,
|
|
1619
|
+
...headersFromBaseOptions,
|
|
1620
|
+
...options.headers,
|
|
1621
|
+
};
|
|
1622
|
+
return {
|
|
1623
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1624
|
+
options: localVarRequestOptions,
|
|
1625
|
+
};
|
|
1626
|
+
},
|
|
1627
|
+
/**
|
|
1628
|
+
* You can execute any scenarios in your workspace using any execution environments (which is called "capabilities" here).
|
|
1629
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
1630
|
+
* @param {ExecuteScenariosRequest} executeScenariosRequest The scenarios and settings to execute
|
|
1631
|
+
* @param {*} [options] Override http request option.
|
|
1632
|
+
* @throws {RequiredError}
|
|
1633
|
+
*/
|
|
1634
|
+
executeScenarios: async (projectId, executeScenariosRequest, options = {}) => {
|
|
1635
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1636
|
+
(0, common_1.assertParamExists)("executeScenarios", "projectId", projectId);
|
|
1637
|
+
// verify required parameter 'executeScenariosRequest' is not null or undefined
|
|
1638
|
+
(0, common_1.assertParamExists)("executeScenarios", "executeScenariosRequest", executeScenariosRequest);
|
|
1639
|
+
const localVarPath = `/projects/{project_id}/execute_scenarios`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
|
|
1640
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1641
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1642
|
+
let baseOptions;
|
|
1643
|
+
if (configuration) {
|
|
1644
|
+
baseOptions = configuration.baseOptions;
|
|
1645
|
+
}
|
|
1646
|
+
const localVarRequestOptions = {
|
|
1647
|
+
method: "POST",
|
|
1648
|
+
...baseOptions,
|
|
1649
|
+
...options,
|
|
1650
|
+
};
|
|
1651
|
+
const localVarHeaderParameter = {};
|
|
1652
|
+
const localVarQueryParameter = {};
|
|
1653
|
+
// authentication bearerAuth required
|
|
1654
|
+
// http bearer authentication required
|
|
1655
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1656
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1657
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1658
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1659
|
+
localVarRequestOptions.headers = {
|
|
1660
|
+
...localVarHeaderParameter,
|
|
1661
|
+
...headersFromBaseOptions,
|
|
1662
|
+
...options.headers,
|
|
1663
|
+
};
|
|
1664
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(executeScenariosRequest, localVarRequestOptions, configuration);
|
|
1665
|
+
return {
|
|
1666
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1667
|
+
options: localVarRequestOptions,
|
|
1668
|
+
};
|
|
1669
|
+
},
|
|
1670
|
+
/**
|
|
1671
|
+
* List a scenario\'s history, newest first. Each save of the scenario\'s steps in the scenario editor records the whole scenario as it stood after that save, as one entry, and so does creating it by import, copy or `duplicateScenario`. An editor save\'s entry is written a moment after the save, not with it; the others are written with it. Changing only the name, description or labels, which is all `updateScenario` changes, records no entry. Use this to see when a scenario\'s steps changed and who changed them, then read an entry with `describeScenarioHistory` to see what it held. Comparing two entries shows what a save changed. `latest` is true on the entry recorded by the most recent save of the steps, and holds the steps as last saved. The entry listed after it is the version before that save. A passing run, or a locator update made from a test result, changes an element\'s candidate locators without recording an entry, so `describeScenario` can differ from `latest` there.
|
|
1672
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1673
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1674
|
+
* @param {number} [page] The number of page returns.
|
|
1675
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
1676
|
+
* @param {*} [options] Override http request option.
|
|
1677
|
+
* @throws {RequiredError}
|
|
1678
|
+
*/
|
|
1679
|
+
listScenarioHistories: async (projectId, scenarioId, page, perPage, options = {}) => {
|
|
1680
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1681
|
+
(0, common_1.assertParamExists)("listScenarioHistories", "projectId", projectId);
|
|
1682
|
+
// verify required parameter 'scenarioId' is not null or undefined
|
|
1683
|
+
(0, common_1.assertParamExists)("listScenarioHistories", "scenarioId", scenarioId);
|
|
1684
|
+
const localVarPath = `/projects/{project_id}/scenarios/{scenario_id}/histories`
|
|
1685
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1686
|
+
.replace(`{${"scenario_id"}}`, encodeURIComponent(String(scenarioId)));
|
|
1687
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1688
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1689
|
+
let baseOptions;
|
|
1690
|
+
if (configuration) {
|
|
1691
|
+
baseOptions = configuration.baseOptions;
|
|
1692
|
+
}
|
|
1693
|
+
const localVarRequestOptions = {
|
|
1694
|
+
method: "GET",
|
|
1695
|
+
...baseOptions,
|
|
1696
|
+
...options,
|
|
1697
|
+
};
|
|
1698
|
+
const localVarHeaderParameter = {};
|
|
1699
|
+
const localVarQueryParameter = {};
|
|
1700
|
+
// authentication bearerAuth required
|
|
1701
|
+
// http bearer authentication required
|
|
1702
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1703
|
+
if (page !== undefined) {
|
|
1704
|
+
localVarQueryParameter["page"] = page;
|
|
1705
|
+
}
|
|
1706
|
+
if (perPage !== undefined) {
|
|
1707
|
+
localVarQueryParameter["per_page"] = perPage;
|
|
1708
|
+
}
|
|
1709
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1710
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1711
|
+
localVarRequestOptions.headers = {
|
|
1712
|
+
...localVarHeaderParameter,
|
|
1713
|
+
...headersFromBaseOptions,
|
|
1714
|
+
...options.headers,
|
|
1715
|
+
};
|
|
1716
|
+
return {
|
|
1717
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1718
|
+
options: localVarRequestOptions,
|
|
1719
|
+
};
|
|
1720
|
+
},
|
|
1721
|
+
/**
|
|
1722
|
+
* List scenarios.
|
|
1723
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
1724
|
+
* @param {number} [page] The number of page returns.
|
|
1725
|
+
* @param {*} [options] Override http request option.
|
|
1726
|
+
* @throws {RequiredError}
|
|
1727
|
+
*/
|
|
1728
|
+
listScenarios: async (projectId, page, options = {}) => {
|
|
1729
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1730
|
+
(0, common_1.assertParamExists)("listScenarios", "projectId", projectId);
|
|
1731
|
+
const localVarPath = `/projects/{project_id}/scenarios`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
|
|
1732
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1733
|
+
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1734
|
+
let baseOptions;
|
|
1735
|
+
if (configuration) {
|
|
1736
|
+
baseOptions = configuration.baseOptions;
|
|
1737
|
+
}
|
|
1738
|
+
const localVarRequestOptions = {
|
|
1739
|
+
method: "GET",
|
|
1740
|
+
...baseOptions,
|
|
1741
|
+
...options,
|
|
1742
|
+
};
|
|
1743
|
+
const localVarHeaderParameter = {};
|
|
1744
|
+
const localVarQueryParameter = {};
|
|
1745
|
+
// authentication bearerAuth required
|
|
1746
|
+
// http bearer authentication required
|
|
1747
|
+
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1748
|
+
if (page !== undefined) {
|
|
1749
|
+
localVarQueryParameter["page"] = page;
|
|
1750
|
+
}
|
|
1751
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1752
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1753
|
+
localVarRequestOptions.headers = {
|
|
1754
|
+
...localVarHeaderParameter,
|
|
1755
|
+
...headersFromBaseOptions,
|
|
1756
|
+
...options.headers,
|
|
1757
|
+
};
|
|
1758
|
+
return {
|
|
1759
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1760
|
+
options: localVarRequestOptions,
|
|
1761
|
+
};
|
|
1762
|
+
},
|
|
1763
|
+
/**
|
|
1764
|
+
* List every step keyword an Autify NoCode Web scenario can be built from, with the ordered argument signature of each. Supply a step\'s arguments in the order `arguments` gives them. A keyword whose `included_in_plan` is false is not part of this workspace\'s plan, and writing a step that uses it is rejected; every keyword is listed either way, so the whole vocabulary is visible. `keyword` is the canonical English name and is what the rest of the API expects, whatever language the workspace is set to.
|
|
1765
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
1766
|
+
* @param {*} [options] Override http request option.
|
|
1767
|
+
* @throws {RequiredError}
|
|
1768
|
+
*/
|
|
1769
|
+
listStepKeywords: async (projectId, options = {}) => {
|
|
1770
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
1771
|
+
(0, common_1.assertParamExists)("listStepKeywords", "projectId", projectId);
|
|
1772
|
+
const localVarPath = `/projects/{project_id}/step_keywords`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
|
|
1031
1773
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1032
1774
|
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1033
1775
|
let baseOptions;
|
|
@@ -1057,18 +1799,21 @@ const ScenarioApiAxiosParamCreator = function (configuration) {
|
|
|
1057
1799
|
};
|
|
1058
1800
|
},
|
|
1059
1801
|
/**
|
|
1060
|
-
*
|
|
1802
|
+
* Replace a scenario\'s steps. Send the whole list in the order the steps should run; one call adds, edits, removes and reorders steps. A step that carries an `id` from `describeScenario` is that existing step. A step without an `id` is added. An existing step whose `id` is not in the list is removed, so send `[]` to remove every step. Each step and each of its arguments is a JSON merge patch against what `describeScenario` returned. A field you send that differs from the current value is changed, a field you leave out is kept, and `null` clears it. So `{"id": 12}` keeps step 12 exactly as it is, at its new position, and sending the read back unchanged changes nothing. Arguments are matched by `name`, as `listStepKeywords` names them, so send only the arguments you change. An `Execute Javascript` step\'s function arguments are matched by the names `describeScenario` reports for them. Send a name the step lacks to add a function argument, and `"value": null` to remove one. To rename one, remove the old name and add the new one in the same request. A new step needs an `action_type` from `listStepKeywords` and that keyword\'s required arguments. Sending a different `action_type` for an existing step rewrites it for the new keyword, keeping its `id` and carrying over the arguments whose names the two keywords share. When you write a `user_locator`, send `user_locator_heals: true` with it unless the step must use that exact selector on every run. Autify then finds the element by your selector on the next passing run, learns the element from that run and matches it from then on the way it matches a recorded step, so a later page change does not break the step. Your selector only has to pick out the element on the page as it is now. Left false, the selector is a pin, and the step fails once the selector stops matching. Read the scenario again from the response: it has the new steps\' ids and the `version_token` for your next write.
|
|
1061
1803
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1062
1804
|
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1805
|
+
* @param {ReplaceScenarioStepsRequest} replaceScenarioStepsRequest The scenario's steps, in the order they should run
|
|
1063
1806
|
* @param {*} [options] Override http request option.
|
|
1064
1807
|
* @throws {RequiredError}
|
|
1065
1808
|
*/
|
|
1066
|
-
|
|
1809
|
+
replaceScenarioSteps: async (projectId, scenarioId, replaceScenarioStepsRequest, options = {}) => {
|
|
1067
1810
|
// verify required parameter 'projectId' is not null or undefined
|
|
1068
|
-
(0, common_1.assertParamExists)("
|
|
1811
|
+
(0, common_1.assertParamExists)("replaceScenarioSteps", "projectId", projectId);
|
|
1069
1812
|
// verify required parameter 'scenarioId' is not null or undefined
|
|
1070
|
-
(0, common_1.assertParamExists)("
|
|
1071
|
-
|
|
1813
|
+
(0, common_1.assertParamExists)("replaceScenarioSteps", "scenarioId", scenarioId);
|
|
1814
|
+
// verify required parameter 'replaceScenarioStepsRequest' is not null or undefined
|
|
1815
|
+
(0, common_1.assertParamExists)("replaceScenarioSteps", "replaceScenarioStepsRequest", replaceScenarioStepsRequest);
|
|
1816
|
+
const localVarPath = `/projects/{project_id}/scenarios/{scenario_id}/steps`
|
|
1072
1817
|
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1073
1818
|
.replace(`{${"scenario_id"}}`, encodeURIComponent(String(scenarioId)));
|
|
1074
1819
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
@@ -1078,7 +1823,7 @@ const ScenarioApiAxiosParamCreator = function (configuration) {
|
|
|
1078
1823
|
baseOptions = configuration.baseOptions;
|
|
1079
1824
|
}
|
|
1080
1825
|
const localVarRequestOptions = {
|
|
1081
|
-
method: "
|
|
1826
|
+
method: "PUT",
|
|
1082
1827
|
...baseOptions,
|
|
1083
1828
|
...options,
|
|
1084
1829
|
};
|
|
@@ -1087,6 +1832,7 @@ const ScenarioApiAxiosParamCreator = function (configuration) {
|
|
|
1087
1832
|
// authentication bearerAuth required
|
|
1088
1833
|
// http bearer authentication required
|
|
1089
1834
|
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1835
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1090
1836
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1091
1837
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1092
1838
|
localVarRequestOptions.headers = {
|
|
@@ -1094,24 +1840,32 @@ const ScenarioApiAxiosParamCreator = function (configuration) {
|
|
|
1094
1840
|
...headersFromBaseOptions,
|
|
1095
1841
|
...options.headers,
|
|
1096
1842
|
};
|
|
1843
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(replaceScenarioStepsRequest, localVarRequestOptions, configuration);
|
|
1097
1844
|
return {
|
|
1098
1845
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1099
1846
|
options: localVarRequestOptions,
|
|
1100
1847
|
};
|
|
1101
1848
|
},
|
|
1102
1849
|
/**
|
|
1103
|
-
*
|
|
1104
|
-
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
1105
|
-
* @param {
|
|
1850
|
+
* Restore a scenario to one entry of its history, as listed by `listScenarioHistories`. The scenario is overwritten with what the entry holds: its name, steps, data table, variables, options and resolution. Its description and labels are kept, because an entry does not record them. Steps come back as they were at that save, recorded steps included: - A step still in the scenario keeps its `id`. A step removed since comes back under the `id` it had. A step added since is removed. Entries saved before late July 2024 record no step ids, so their steps get new ones. - An element comes back with the `candidate_locators` it had at that save, so whatever Autify learned about it from runs since then is lost. Its `user_locator_heals` goes back to false and its `seed_locator` is cleared, because an entry records neither. Restoring an entry that already matches the scenario changes nothing and returns the same `version_token`. Any other restore records a new entry in `listScenarioHistories`, so it can be undone by restoring the entry listed after it. When the scenario as it stands has no entry yet, because the entry for a recent write is still being saved, the restore records that state first. Read the scenario from the response: it has the restored steps and the `version_token` for your next write.
|
|
1851
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1852
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1853
|
+
* @param {number} historyId The `id` of an entry `listScenarioHistories` returned for this scenario.
|
|
1854
|
+
* @param {RestoreScenarioHistoryRequest} [restoreScenarioHistoryRequest]
|
|
1106
1855
|
* @param {*} [options] Override http request option.
|
|
1107
1856
|
* @throws {RequiredError}
|
|
1108
1857
|
*/
|
|
1109
|
-
|
|
1858
|
+
restoreScenarioHistory: async (projectId, scenarioId, historyId, restoreScenarioHistoryRequest, options = {}) => {
|
|
1110
1859
|
// verify required parameter 'projectId' is not null or undefined
|
|
1111
|
-
(0, common_1.assertParamExists)("
|
|
1112
|
-
// verify required parameter '
|
|
1113
|
-
(0, common_1.assertParamExists)("
|
|
1114
|
-
|
|
1860
|
+
(0, common_1.assertParamExists)("restoreScenarioHistory", "projectId", projectId);
|
|
1861
|
+
// verify required parameter 'scenarioId' is not null or undefined
|
|
1862
|
+
(0, common_1.assertParamExists)("restoreScenarioHistory", "scenarioId", scenarioId);
|
|
1863
|
+
// verify required parameter 'historyId' is not null or undefined
|
|
1864
|
+
(0, common_1.assertParamExists)("restoreScenarioHistory", "historyId", historyId);
|
|
1865
|
+
const localVarPath = `/projects/{project_id}/scenarios/{scenario_id}/histories/{history_id}/restore`
|
|
1866
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)))
|
|
1867
|
+
.replace(`{${"scenario_id"}}`, encodeURIComponent(String(scenarioId)))
|
|
1868
|
+
.replace(`{${"history_id"}}`, encodeURIComponent(String(historyId)));
|
|
1115
1869
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1116
1870
|
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1117
1871
|
let baseOptions;
|
|
@@ -1136,23 +1890,28 @@ const ScenarioApiAxiosParamCreator = function (configuration) {
|
|
|
1136
1890
|
...headersFromBaseOptions,
|
|
1137
1891
|
...options.headers,
|
|
1138
1892
|
};
|
|
1139
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(
|
|
1893
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(restoreScenarioHistoryRequest, localVarRequestOptions, configuration);
|
|
1140
1894
|
return {
|
|
1141
1895
|
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1142
1896
|
options: localVarRequestOptions,
|
|
1143
1897
|
};
|
|
1144
1898
|
},
|
|
1145
1899
|
/**
|
|
1146
|
-
*
|
|
1900
|
+
* Find the steps in a project whose arguments contain some text, without reading every scenario. The search covers every live step of every scenario and step group in the project, ignoring case. It matches the value of a `text` or `url` argument, including an `Execute Javascript` step\'s function arguments, and a value an `Execute Step Group` step substitutes into its group, as `describeScenario` reports it in `overrides`. With `match_on=locators` it matches an element\'s `user_locator` instead; with no `match_on` it matches both. Step names, memos, `seed_locator`, `candidate_locators`, file names, data tables and variables are not searched. A step recorded on a password field is never matched, by its value or its locator, and neither is a value a call site substitutes into one. Each result is one step, in the order of its scenario or step group and then of its position there. A match inside a step group lists the scenarios that run the group in `executed_by`, so a change to the group reaches all of them. To change a scenario\'s step, read the scenario with `describeScenario` for its `version_token`, then send the steps with `replaceScenarioSteps`.
|
|
1147
1901
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
1902
|
+
* @param {string} q The text to find. It matches anywhere in a value, ignoring case; `%` and `_` are matched literally.
|
|
1903
|
+
* @param {'values' | 'locators'} [matchOn] `values` matches argument values only and `locators` matches `user_locator` only. Leave it out to match both.
|
|
1148
1904
|
* @param {number} [page] The number of page returns.
|
|
1905
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
1149
1906
|
* @param {*} [options] Override http request option.
|
|
1150
1907
|
* @throws {RequiredError}
|
|
1151
1908
|
*/
|
|
1152
|
-
|
|
1909
|
+
searchSteps: async (projectId, q, matchOn, page, perPage, options = {}) => {
|
|
1153
1910
|
// verify required parameter 'projectId' is not null or undefined
|
|
1154
|
-
(0, common_1.assertParamExists)("
|
|
1155
|
-
|
|
1911
|
+
(0, common_1.assertParamExists)("searchSteps", "projectId", projectId);
|
|
1912
|
+
// verify required parameter 'q' is not null or undefined
|
|
1913
|
+
(0, common_1.assertParamExists)("searchSteps", "q", q);
|
|
1914
|
+
const localVarPath = `/projects/{project_id}/steps/search`.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
|
|
1156
1915
|
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1157
1916
|
const localVarUrlObj = new url_1.URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1158
1917
|
let baseOptions;
|
|
@@ -1169,9 +1928,18 @@ const ScenarioApiAxiosParamCreator = function (configuration) {
|
|
|
1169
1928
|
// authentication bearerAuth required
|
|
1170
1929
|
// http bearer authentication required
|
|
1171
1930
|
await (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
|
|
1931
|
+
if (q !== undefined) {
|
|
1932
|
+
localVarQueryParameter["q"] = q;
|
|
1933
|
+
}
|
|
1934
|
+
if (matchOn !== undefined) {
|
|
1935
|
+
localVarQueryParameter["match_on"] = matchOn;
|
|
1936
|
+
}
|
|
1172
1937
|
if (page !== undefined) {
|
|
1173
1938
|
localVarQueryParameter["page"] = page;
|
|
1174
1939
|
}
|
|
1940
|
+
if (perPage !== undefined) {
|
|
1941
|
+
localVarQueryParameter["per_page"] = perPage;
|
|
1942
|
+
}
|
|
1175
1943
|
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1176
1944
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1177
1945
|
localVarRequestOptions.headers = {
|
|
@@ -1243,7 +2011,30 @@ const ScenarioApiFp = function (configuration) {
|
|
|
1243
2011
|
const localVarAxiosParamCreator = (0, exports.ScenarioApiAxiosParamCreator)(configuration);
|
|
1244
2012
|
return {
|
|
1245
2013
|
/**
|
|
1246
|
-
*
|
|
2014
|
+
* Create an empty scenario, ready to be given steps. The scenario is created with no steps. Add them with `replaceScenarioSteps`, sending the `version_token` this call returns.
|
|
2015
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
2016
|
+
* @param {CreateScenarioRequest} [createScenarioRequest] The scenario to create
|
|
2017
|
+
* @param {*} [options] Override http request option.
|
|
2018
|
+
* @throws {RequiredError}
|
|
2019
|
+
*/
|
|
2020
|
+
async createScenario(projectId, createScenarioRequest, options) {
|
|
2021
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createScenario(projectId, createScenarioRequest, options);
|
|
2022
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2023
|
+
},
|
|
2024
|
+
/**
|
|
2025
|
+
* Delete a scenario and remove it from every test plan that includes it. This can\'t be undone through the API. Autify support can restore a deleted scenario, but it won\'t rejoin its test plans. Confirm with the user before deleting. Step groups can\'t be deleted here. A step group\'s id gets 404.
|
|
2026
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2027
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2028
|
+
* @param {string} [versionToken] The version of the scenario you are deleting, as returned by `version_token` when you read it. If anyone changed the scenario's name, description, labels or steps since then, you get 412 and the scenario stays. Sending an empty value is an error.
|
|
2029
|
+
* @param {*} [options] Override http request option.
|
|
2030
|
+
* @throws {RequiredError}
|
|
2031
|
+
*/
|
|
2032
|
+
async deleteScenario(projectId, scenarioId, versionToken, options) {
|
|
2033
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteScenario(projectId, scenarioId, versionToken, options);
|
|
2034
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2035
|
+
},
|
|
2036
|
+
/**
|
|
2037
|
+
* Get a scenario, with its steps, data table and variables. Each step names its keyword by the canonical English name that `listStepKeywords` publishes, and lists its arguments in that keyword\'s argument order. An argument that targets an element carries the locators Autify matches it by, rather than a placeholder. An `Execute Javascript` step lists its function arguments after its keyword\'s arguments, as `text` arguments named the way its code refers to them. A function argument that shares a name with one of the keyword\'s arguments is left out. An element whose `user_locator_heals` is true treats `user_locator` as a seed: Autify learns the element from it on the next passing run and matches it automatically after that. Its `seed_locator` is the selector Autify last learned from, and equals `user_locator` once that has happened. An element whose `user_locator_heals` is false uses `user_locator` as a pin on every run. `replaceScenarioSteps` sets it. An `Execute Step Group` step is reported as a reference to its step group rather than expanded in place; read the group itself with this endpoint, using the `step_group_id` from the step\'s argument. The values this call site substitutes into the group come back beside it, in `overrides`. A step recorded on a password field is masked: values typed into it are returned as `******` and the element\'s `candidate_locators` are withheld, as on `describeTestCaseResult`.
|
|
1247
2038
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1248
2039
|
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1249
2040
|
* @param {*} [options] Override http request option.
|
|
@@ -1253,6 +2044,18 @@ const ScenarioApiFp = function (configuration) {
|
|
|
1253
2044
|
const localVarAxiosArgs = await localVarAxiosParamCreator.describeScenario(projectId, scenarioId, options);
|
|
1254
2045
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1255
2046
|
},
|
|
2047
|
+
/**
|
|
2048
|
+
* Get the steps, data table and variables a scenario held at one entry of its history, as listed by `listScenarioHistories`. They come back in the same shape `describeScenario` returns, so an entry can be compared field by field with the scenario as it is now or with another entry. Password masking applies as it does there. Five things differ, because an entry records values rather than the rows they lived in: - An element argument\'s `element_id`, `user_locator_heals` and `seed_locator` are always null, because an entry records none of them. Its `user_locator` and `candidate_locators` are the ones the element had at that save. - A step\'s `id` is the id it had at that save, which may no longer exist in the scenario. It is null on entries saved before late July 2024, when entries started recording step ids. - An `Execute Step Group` step\'s `overrides` are read against the step group as it is now, so an override on a step since removed from the group is not reported. - An export variable set by a step inside a step group resolves its `step_id` against that group as it is now. When more than one called group assigns the same identifier, the step with the lowest id wins. - An entry records the scenario\'s name at that save but not its description or labels, and a later rename does not move it.
|
|
2049
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2050
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2051
|
+
* @param {number} historyId The `id` of an entry `listScenarioHistories` returned for this scenario.
|
|
2052
|
+
* @param {*} [options] Override http request option.
|
|
2053
|
+
* @throws {RequiredError}
|
|
2054
|
+
*/
|
|
2055
|
+
async describeScenarioHistory(projectId, scenarioId, historyId, options) {
|
|
2056
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.describeScenarioHistory(projectId, scenarioId, historyId, options);
|
|
2057
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2058
|
+
},
|
|
1256
2059
|
/**
|
|
1257
2060
|
* Duplicate a scenario.
|
|
1258
2061
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
@@ -1275,6 +2078,19 @@ const ScenarioApiFp = function (configuration) {
|
|
|
1275
2078
|
const localVarAxiosArgs = await localVarAxiosParamCreator.executeScenarios(projectId, executeScenariosRequest, options);
|
|
1276
2079
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1277
2080
|
},
|
|
2081
|
+
/**
|
|
2082
|
+
* List a scenario\'s history, newest first. Each save of the scenario\'s steps in the scenario editor records the whole scenario as it stood after that save, as one entry, and so does creating it by import, copy or `duplicateScenario`. An editor save\'s entry is written a moment after the save, not with it; the others are written with it. Changing only the name, description or labels, which is all `updateScenario` changes, records no entry. Use this to see when a scenario\'s steps changed and who changed them, then read an entry with `describeScenarioHistory` to see what it held. Comparing two entries shows what a save changed. `latest` is true on the entry recorded by the most recent save of the steps, and holds the steps as last saved. The entry listed after it is the version before that save. A passing run, or a locator update made from a test result, changes an element\'s candidate locators without recording an entry, so `describeScenario` can differ from `latest` there.
|
|
2083
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2084
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2085
|
+
* @param {number} [page] The number of page returns.
|
|
2086
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
2087
|
+
* @param {*} [options] Override http request option.
|
|
2088
|
+
* @throws {RequiredError}
|
|
2089
|
+
*/
|
|
2090
|
+
async listScenarioHistories(projectId, scenarioId, page, perPage, options) {
|
|
2091
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listScenarioHistories(projectId, scenarioId, page, perPage, options);
|
|
2092
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2093
|
+
},
|
|
1278
2094
|
/**
|
|
1279
2095
|
* List scenarios.
|
|
1280
2096
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
@@ -1286,6 +2102,55 @@ const ScenarioApiFp = function (configuration) {
|
|
|
1286
2102
|
const localVarAxiosArgs = await localVarAxiosParamCreator.listScenarios(projectId, page, options);
|
|
1287
2103
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
1288
2104
|
},
|
|
2105
|
+
/**
|
|
2106
|
+
* List every step keyword an Autify NoCode Web scenario can be built from, with the ordered argument signature of each. Supply a step\'s arguments in the order `arguments` gives them. A keyword whose `included_in_plan` is false is not part of this workspace\'s plan, and writing a step that uses it is rejected; every keyword is listed either way, so the whole vocabulary is visible. `keyword` is the canonical English name and is what the rest of the API expects, whatever language the workspace is set to.
|
|
2107
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
2108
|
+
* @param {*} [options] Override http request option.
|
|
2109
|
+
* @throws {RequiredError}
|
|
2110
|
+
*/
|
|
2111
|
+
async listStepKeywords(projectId, options) {
|
|
2112
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.listStepKeywords(projectId, options);
|
|
2113
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2114
|
+
},
|
|
2115
|
+
/**
|
|
2116
|
+
* Replace a scenario\'s steps. Send the whole list in the order the steps should run; one call adds, edits, removes and reorders steps. A step that carries an `id` from `describeScenario` is that existing step. A step without an `id` is added. An existing step whose `id` is not in the list is removed, so send `[]` to remove every step. Each step and each of its arguments is a JSON merge patch against what `describeScenario` returned. A field you send that differs from the current value is changed, a field you leave out is kept, and `null` clears it. So `{"id": 12}` keeps step 12 exactly as it is, at its new position, and sending the read back unchanged changes nothing. Arguments are matched by `name`, as `listStepKeywords` names them, so send only the arguments you change. An `Execute Javascript` step\'s function arguments are matched by the names `describeScenario` reports for them. Send a name the step lacks to add a function argument, and `"value": null` to remove one. To rename one, remove the old name and add the new one in the same request. A new step needs an `action_type` from `listStepKeywords` and that keyword\'s required arguments. Sending a different `action_type` for an existing step rewrites it for the new keyword, keeping its `id` and carrying over the arguments whose names the two keywords share. When you write a `user_locator`, send `user_locator_heals: true` with it unless the step must use that exact selector on every run. Autify then finds the element by your selector on the next passing run, learns the element from that run and matches it from then on the way it matches a recorded step, so a later page change does not break the step. Your selector only has to pick out the element on the page as it is now. Left false, the selector is a pin, and the step fails once the selector stops matching. Read the scenario again from the response: it has the new steps\' ids and the `version_token` for your next write.
|
|
2117
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2118
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2119
|
+
* @param {ReplaceScenarioStepsRequest} replaceScenarioStepsRequest The scenario's steps, in the order they should run
|
|
2120
|
+
* @param {*} [options] Override http request option.
|
|
2121
|
+
* @throws {RequiredError}
|
|
2122
|
+
*/
|
|
2123
|
+
async replaceScenarioSteps(projectId, scenarioId, replaceScenarioStepsRequest, options) {
|
|
2124
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.replaceScenarioSteps(projectId, scenarioId, replaceScenarioStepsRequest, options);
|
|
2125
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2126
|
+
},
|
|
2127
|
+
/**
|
|
2128
|
+
* Restore a scenario to one entry of its history, as listed by `listScenarioHistories`. The scenario is overwritten with what the entry holds: its name, steps, data table, variables, options and resolution. Its description and labels are kept, because an entry does not record them. Steps come back as they were at that save, recorded steps included: - A step still in the scenario keeps its `id`. A step removed since comes back under the `id` it had. A step added since is removed. Entries saved before late July 2024 record no step ids, so their steps get new ones. - An element comes back with the `candidate_locators` it had at that save, so whatever Autify learned about it from runs since then is lost. Its `user_locator_heals` goes back to false and its `seed_locator` is cleared, because an entry records neither. Restoring an entry that already matches the scenario changes nothing and returns the same `version_token`. Any other restore records a new entry in `listScenarioHistories`, so it can be undone by restoring the entry listed after it. When the scenario as it stands has no entry yet, because the entry for a recent write is still being saved, the restore records that state first. Read the scenario from the response: it has the restored steps and the `version_token` for your next write.
|
|
2129
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2130
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2131
|
+
* @param {number} historyId The `id` of an entry `listScenarioHistories` returned for this scenario.
|
|
2132
|
+
* @param {RestoreScenarioHistoryRequest} [restoreScenarioHistoryRequest]
|
|
2133
|
+
* @param {*} [options] Override http request option.
|
|
2134
|
+
* @throws {RequiredError}
|
|
2135
|
+
*/
|
|
2136
|
+
async restoreScenarioHistory(projectId, scenarioId, historyId, restoreScenarioHistoryRequest, options) {
|
|
2137
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.restoreScenarioHistory(projectId, scenarioId, historyId, restoreScenarioHistoryRequest, options);
|
|
2138
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2139
|
+
},
|
|
2140
|
+
/**
|
|
2141
|
+
* Find the steps in a project whose arguments contain some text, without reading every scenario. The search covers every live step of every scenario and step group in the project, ignoring case. It matches the value of a `text` or `url` argument, including an `Execute Javascript` step\'s function arguments, and a value an `Execute Step Group` step substitutes into its group, as `describeScenario` reports it in `overrides`. With `match_on=locators` it matches an element\'s `user_locator` instead; with no `match_on` it matches both. Step names, memos, `seed_locator`, `candidate_locators`, file names, data tables and variables are not searched. A step recorded on a password field is never matched, by its value or its locator, and neither is a value a call site substitutes into one. Each result is one step, in the order of its scenario or step group and then of its position there. A match inside a step group lists the scenarios that run the group in `executed_by`, so a change to the group reaches all of them. To change a scenario\'s step, read the scenario with `describeScenario` for its `version_token`, then send the steps with `replaceScenarioSteps`.
|
|
2142
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
2143
|
+
* @param {string} q The text to find. It matches anywhere in a value, ignoring case; `%` and `_` are matched literally.
|
|
2144
|
+
* @param {'values' | 'locators'} [matchOn] `values` matches argument values only and `locators` matches `user_locator` only. Leave it out to match both.
|
|
2145
|
+
* @param {number} [page] The number of page returns.
|
|
2146
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
2147
|
+
* @param {*} [options] Override http request option.
|
|
2148
|
+
* @throws {RequiredError}
|
|
2149
|
+
*/
|
|
2150
|
+
async searchSteps(projectId, q, matchOn, page, perPage, options) {
|
|
2151
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.searchSteps(projectId, q, matchOn, page, perPage, options);
|
|
2152
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2153
|
+
},
|
|
1289
2154
|
/**
|
|
1290
2155
|
* Update a scenario.
|
|
1291
2156
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
@@ -1309,7 +2174,32 @@ const ScenarioApiFactory = function (configuration, basePath, axios) {
|
|
|
1309
2174
|
const localVarFp = (0, exports.ScenarioApiFp)(configuration);
|
|
1310
2175
|
return {
|
|
1311
2176
|
/**
|
|
1312
|
-
*
|
|
2177
|
+
* Create an empty scenario, ready to be given steps. The scenario is created with no steps. Add them with `replaceScenarioSteps`, sending the `version_token` this call returns.
|
|
2178
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
2179
|
+
* @param {CreateScenarioRequest} [createScenarioRequest] The scenario to create
|
|
2180
|
+
* @param {*} [options] Override http request option.
|
|
2181
|
+
* @throws {RequiredError}
|
|
2182
|
+
*/
|
|
2183
|
+
createScenario(projectId, createScenarioRequest, options) {
|
|
2184
|
+
return localVarFp
|
|
2185
|
+
.createScenario(projectId, createScenarioRequest, options)
|
|
2186
|
+
.then((request) => request(axios, basePath));
|
|
2187
|
+
},
|
|
2188
|
+
/**
|
|
2189
|
+
* Delete a scenario and remove it from every test plan that includes it. This can\'t be undone through the API. Autify support can restore a deleted scenario, but it won\'t rejoin its test plans. Confirm with the user before deleting. Step groups can\'t be deleted here. A step group\'s id gets 404.
|
|
2190
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2191
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2192
|
+
* @param {string} [versionToken] The version of the scenario you are deleting, as returned by `version_token` when you read it. If anyone changed the scenario's name, description, labels or steps since then, you get 412 and the scenario stays. Sending an empty value is an error.
|
|
2193
|
+
* @param {*} [options] Override http request option.
|
|
2194
|
+
* @throws {RequiredError}
|
|
2195
|
+
*/
|
|
2196
|
+
deleteScenario(projectId, scenarioId, versionToken, options) {
|
|
2197
|
+
return localVarFp
|
|
2198
|
+
.deleteScenario(projectId, scenarioId, versionToken, options)
|
|
2199
|
+
.then((request) => request(axios, basePath));
|
|
2200
|
+
},
|
|
2201
|
+
/**
|
|
2202
|
+
* Get a scenario, with its steps, data table and variables. Each step names its keyword by the canonical English name that `listStepKeywords` publishes, and lists its arguments in that keyword\'s argument order. An argument that targets an element carries the locators Autify matches it by, rather than a placeholder. An `Execute Javascript` step lists its function arguments after its keyword\'s arguments, as `text` arguments named the way its code refers to them. A function argument that shares a name with one of the keyword\'s arguments is left out. An element whose `user_locator_heals` is true treats `user_locator` as a seed: Autify learns the element from it on the next passing run and matches it automatically after that. Its `seed_locator` is the selector Autify last learned from, and equals `user_locator` once that has happened. An element whose `user_locator_heals` is false uses `user_locator` as a pin on every run. `replaceScenarioSteps` sets it. An `Execute Step Group` step is reported as a reference to its step group rather than expanded in place; read the group itself with this endpoint, using the `step_group_id` from the step\'s argument. The values this call site substitutes into the group come back beside it, in `overrides`. A step recorded on a password field is masked: values typed into it are returned as `******` and the element\'s `candidate_locators` are withheld, as on `describeTestCaseResult`.
|
|
1313
2203
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1314
2204
|
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1315
2205
|
* @param {*} [options] Override http request option.
|
|
@@ -1320,6 +2210,19 @@ const ScenarioApiFactory = function (configuration, basePath, axios) {
|
|
|
1320
2210
|
.describeScenario(projectId, scenarioId, options)
|
|
1321
2211
|
.then((request) => request(axios, basePath));
|
|
1322
2212
|
},
|
|
2213
|
+
/**
|
|
2214
|
+
* Get the steps, data table and variables a scenario held at one entry of its history, as listed by `listScenarioHistories`. They come back in the same shape `describeScenario` returns, so an entry can be compared field by field with the scenario as it is now or with another entry. Password masking applies as it does there. Five things differ, because an entry records values rather than the rows they lived in: - An element argument\'s `element_id`, `user_locator_heals` and `seed_locator` are always null, because an entry records none of them. Its `user_locator` and `candidate_locators` are the ones the element had at that save. - A step\'s `id` is the id it had at that save, which may no longer exist in the scenario. It is null on entries saved before late July 2024, when entries started recording step ids. - An `Execute Step Group` step\'s `overrides` are read against the step group as it is now, so an override on a step since removed from the group is not reported. - An export variable set by a step inside a step group resolves its `step_id` against that group as it is now. When more than one called group assigns the same identifier, the step with the lowest id wins. - An entry records the scenario\'s name at that save but not its description or labels, and a later rename does not move it.
|
|
2215
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2216
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2217
|
+
* @param {number} historyId The `id` of an entry `listScenarioHistories` returned for this scenario.
|
|
2218
|
+
* @param {*} [options] Override http request option.
|
|
2219
|
+
* @throws {RequiredError}
|
|
2220
|
+
*/
|
|
2221
|
+
describeScenarioHistory(projectId, scenarioId, historyId, options) {
|
|
2222
|
+
return localVarFp
|
|
2223
|
+
.describeScenarioHistory(projectId, scenarioId, historyId, options)
|
|
2224
|
+
.then((request) => request(axios, basePath));
|
|
2225
|
+
},
|
|
1323
2226
|
/**
|
|
1324
2227
|
* Duplicate a scenario.
|
|
1325
2228
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
@@ -1344,6 +2247,20 @@ const ScenarioApiFactory = function (configuration, basePath, axios) {
|
|
|
1344
2247
|
.executeScenarios(projectId, executeScenariosRequest, options)
|
|
1345
2248
|
.then((request) => request(axios, basePath));
|
|
1346
2249
|
},
|
|
2250
|
+
/**
|
|
2251
|
+
* List a scenario\'s history, newest first. Each save of the scenario\'s steps in the scenario editor records the whole scenario as it stood after that save, as one entry, and so does creating it by import, copy or `duplicateScenario`. An editor save\'s entry is written a moment after the save, not with it; the others are written with it. Changing only the name, description or labels, which is all `updateScenario` changes, records no entry. Use this to see when a scenario\'s steps changed and who changed them, then read an entry with `describeScenarioHistory` to see what it held. Comparing two entries shows what a save changed. `latest` is true on the entry recorded by the most recent save of the steps, and holds the steps as last saved. The entry listed after it is the version before that save. A passing run, or a locator update made from a test result, changes an element\'s candidate locators without recording an entry, so `describeScenario` can differ from `latest` there.
|
|
2252
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2253
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2254
|
+
* @param {number} [page] The number of page returns.
|
|
2255
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
2256
|
+
* @param {*} [options] Override http request option.
|
|
2257
|
+
* @throws {RequiredError}
|
|
2258
|
+
*/
|
|
2259
|
+
listScenarioHistories(projectId, scenarioId, page, perPage, options) {
|
|
2260
|
+
return localVarFp
|
|
2261
|
+
.listScenarioHistories(projectId, scenarioId, page, perPage, options)
|
|
2262
|
+
.then((request) => request(axios, basePath));
|
|
2263
|
+
},
|
|
1347
2264
|
/**
|
|
1348
2265
|
* List scenarios.
|
|
1349
2266
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
@@ -1356,6 +2273,59 @@ const ScenarioApiFactory = function (configuration, basePath, axios) {
|
|
|
1356
2273
|
.listScenarios(projectId, page, options)
|
|
1357
2274
|
.then((request) => request(axios, basePath));
|
|
1358
2275
|
},
|
|
2276
|
+
/**
|
|
2277
|
+
* List every step keyword an Autify NoCode Web scenario can be built from, with the ordered argument signature of each. Supply a step\'s arguments in the order `arguments` gives them. A keyword whose `included_in_plan` is false is not part of this workspace\'s plan, and writing a step that uses it is rejected; every keyword is listed either way, so the whole vocabulary is visible. `keyword` is the canonical English name and is what the rest of the API expects, whatever language the workspace is set to.
|
|
2278
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
2279
|
+
* @param {*} [options] Override http request option.
|
|
2280
|
+
* @throws {RequiredError}
|
|
2281
|
+
*/
|
|
2282
|
+
listStepKeywords(projectId, options) {
|
|
2283
|
+
return localVarFp
|
|
2284
|
+
.listStepKeywords(projectId, options)
|
|
2285
|
+
.then((request) => request(axios, basePath));
|
|
2286
|
+
},
|
|
2287
|
+
/**
|
|
2288
|
+
* Replace a scenario\'s steps. Send the whole list in the order the steps should run; one call adds, edits, removes and reorders steps. A step that carries an `id` from `describeScenario` is that existing step. A step without an `id` is added. An existing step whose `id` is not in the list is removed, so send `[]` to remove every step. Each step and each of its arguments is a JSON merge patch against what `describeScenario` returned. A field you send that differs from the current value is changed, a field you leave out is kept, and `null` clears it. So `{"id": 12}` keeps step 12 exactly as it is, at its new position, and sending the read back unchanged changes nothing. Arguments are matched by `name`, as `listStepKeywords` names them, so send only the arguments you change. An `Execute Javascript` step\'s function arguments are matched by the names `describeScenario` reports for them. Send a name the step lacks to add a function argument, and `"value": null` to remove one. To rename one, remove the old name and add the new one in the same request. A new step needs an `action_type` from `listStepKeywords` and that keyword\'s required arguments. Sending a different `action_type` for an existing step rewrites it for the new keyword, keeping its `id` and carrying over the arguments whose names the two keywords share. When you write a `user_locator`, send `user_locator_heals: true` with it unless the step must use that exact selector on every run. Autify then finds the element by your selector on the next passing run, learns the element from that run and matches it from then on the way it matches a recorded step, so a later page change does not break the step. Your selector only has to pick out the element on the page as it is now. Left false, the selector is a pin, and the step fails once the selector stops matching. Read the scenario again from the response: it has the new steps\' ids and the `version_token` for your next write.
|
|
2289
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2290
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2291
|
+
* @param {ReplaceScenarioStepsRequest} replaceScenarioStepsRequest The scenario's steps, in the order they should run
|
|
2292
|
+
* @param {*} [options] Override http request option.
|
|
2293
|
+
* @throws {RequiredError}
|
|
2294
|
+
*/
|
|
2295
|
+
replaceScenarioSteps(projectId, scenarioId, replaceScenarioStepsRequest, options) {
|
|
2296
|
+
return localVarFp
|
|
2297
|
+
.replaceScenarioSteps(projectId, scenarioId, replaceScenarioStepsRequest, options)
|
|
2298
|
+
.then((request) => request(axios, basePath));
|
|
2299
|
+
},
|
|
2300
|
+
/**
|
|
2301
|
+
* Restore a scenario to one entry of its history, as listed by `listScenarioHistories`. The scenario is overwritten with what the entry holds: its name, steps, data table, variables, options and resolution. Its description and labels are kept, because an entry does not record them. Steps come back as they were at that save, recorded steps included: - A step still in the scenario keeps its `id`. A step removed since comes back under the `id` it had. A step added since is removed. Entries saved before late July 2024 record no step ids, so their steps get new ones. - An element comes back with the `candidate_locators` it had at that save, so whatever Autify learned about it from runs since then is lost. Its `user_locator_heals` goes back to false and its `seed_locator` is cleared, because an entry records neither. Restoring an entry that already matches the scenario changes nothing and returns the same `version_token`. Any other restore records a new entry in `listScenarioHistories`, so it can be undone by restoring the entry listed after it. When the scenario as it stands has no entry yet, because the entry for a recent write is still being saved, the restore records that state first. Read the scenario from the response: it has the restored steps and the `version_token` for your next write.
|
|
2302
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2303
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2304
|
+
* @param {number} historyId The `id` of an entry `listScenarioHistories` returned for this scenario.
|
|
2305
|
+
* @param {RestoreScenarioHistoryRequest} [restoreScenarioHistoryRequest]
|
|
2306
|
+
* @param {*} [options] Override http request option.
|
|
2307
|
+
* @throws {RequiredError}
|
|
2308
|
+
*/
|
|
2309
|
+
restoreScenarioHistory(projectId, scenarioId, historyId, restoreScenarioHistoryRequest, options) {
|
|
2310
|
+
return localVarFp
|
|
2311
|
+
.restoreScenarioHistory(projectId, scenarioId, historyId, restoreScenarioHistoryRequest, options)
|
|
2312
|
+
.then((request) => request(axios, basePath));
|
|
2313
|
+
},
|
|
2314
|
+
/**
|
|
2315
|
+
* Find the steps in a project whose arguments contain some text, without reading every scenario. The search covers every live step of every scenario and step group in the project, ignoring case. It matches the value of a `text` or `url` argument, including an `Execute Javascript` step\'s function arguments, and a value an `Execute Step Group` step substitutes into its group, as `describeScenario` reports it in `overrides`. With `match_on=locators` it matches an element\'s `user_locator` instead; with no `match_on` it matches both. Step names, memos, `seed_locator`, `candidate_locators`, file names, data tables and variables are not searched. A step recorded on a password field is never matched, by its value or its locator, and neither is a value a call site substitutes into one. Each result is one step, in the order of its scenario or step group and then of its position there. A match inside a step group lists the scenarios that run the group in `executed_by`, so a change to the group reaches all of them. To change a scenario\'s step, read the scenario with `describeScenario` for its `version_token`, then send the steps with `replaceScenarioSteps`.
|
|
2316
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
2317
|
+
* @param {string} q The text to find. It matches anywhere in a value, ignoring case; `%` and `_` are matched literally.
|
|
2318
|
+
* @param {'values' | 'locators'} [matchOn] `values` matches argument values only and `locators` matches `user_locator` only. Leave it out to match both.
|
|
2319
|
+
* @param {number} [page] The number of page returns.
|
|
2320
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
2321
|
+
* @param {*} [options] Override http request option.
|
|
2322
|
+
* @throws {RequiredError}
|
|
2323
|
+
*/
|
|
2324
|
+
searchSteps(projectId, q, matchOn, page, perPage, options) {
|
|
2325
|
+
return localVarFp
|
|
2326
|
+
.searchSteps(projectId, q, matchOn, page, perPage, options)
|
|
2327
|
+
.then((request) => request(axios, basePath));
|
|
2328
|
+
},
|
|
1359
2329
|
/**
|
|
1360
2330
|
* Update a scenario.
|
|
1361
2331
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
@@ -1380,7 +2350,34 @@ exports.ScenarioApiFactory = ScenarioApiFactory;
|
|
|
1380
2350
|
*/
|
|
1381
2351
|
class ScenarioApi extends base_1.BaseAPI {
|
|
1382
2352
|
/**
|
|
1383
|
-
*
|
|
2353
|
+
* Create an empty scenario, ready to be given steps. The scenario is created with no steps. Add them with `replaceScenarioSteps`, sending the `version_token` this call returns.
|
|
2354
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
2355
|
+
* @param {CreateScenarioRequest} [createScenarioRequest] The scenario to create
|
|
2356
|
+
* @param {*} [options] Override http request option.
|
|
2357
|
+
* @throws {RequiredError}
|
|
2358
|
+
* @memberof ScenarioApi
|
|
2359
|
+
*/
|
|
2360
|
+
createScenario(projectId, createScenarioRequest, options) {
|
|
2361
|
+
return (0, exports.ScenarioApiFp)(this.configuration)
|
|
2362
|
+
.createScenario(projectId, createScenarioRequest, options)
|
|
2363
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2364
|
+
}
|
|
2365
|
+
/**
|
|
2366
|
+
* Delete a scenario and remove it from every test plan that includes it. This can\'t be undone through the API. Autify support can restore a deleted scenario, but it won\'t rejoin its test plans. Confirm with the user before deleting. Step groups can\'t be deleted here. A step group\'s id gets 404.
|
|
2367
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2368
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2369
|
+
* @param {string} [versionToken] The version of the scenario you are deleting, as returned by `version_token` when you read it. If anyone changed the scenario's name, description, labels or steps since then, you get 412 and the scenario stays. Sending an empty value is an error.
|
|
2370
|
+
* @param {*} [options] Override http request option.
|
|
2371
|
+
* @throws {RequiredError}
|
|
2372
|
+
* @memberof ScenarioApi
|
|
2373
|
+
*/
|
|
2374
|
+
deleteScenario(projectId, scenarioId, versionToken, options) {
|
|
2375
|
+
return (0, exports.ScenarioApiFp)(this.configuration)
|
|
2376
|
+
.deleteScenario(projectId, scenarioId, versionToken, options)
|
|
2377
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2378
|
+
}
|
|
2379
|
+
/**
|
|
2380
|
+
* Get a scenario, with its steps, data table and variables. Each step names its keyword by the canonical English name that `listStepKeywords` publishes, and lists its arguments in that keyword\'s argument order. An argument that targets an element carries the locators Autify matches it by, rather than a placeholder. An `Execute Javascript` step lists its function arguments after its keyword\'s arguments, as `text` arguments named the way its code refers to them. A function argument that shares a name with one of the keyword\'s arguments is left out. An element whose `user_locator_heals` is true treats `user_locator` as a seed: Autify learns the element from it on the next passing run and matches it automatically after that. Its `seed_locator` is the selector Autify last learned from, and equals `user_locator` once that has happened. An element whose `user_locator_heals` is false uses `user_locator` as a pin on every run. `replaceScenarioSteps` sets it. An `Execute Step Group` step is reported as a reference to its step group rather than expanded in place; read the group itself with this endpoint, using the `step_group_id` from the step\'s argument. The values this call site substitutes into the group come back beside it, in `overrides`. A step recorded on a password field is masked: values typed into it are returned as `******` and the element\'s `candidate_locators` are withheld, as on `describeTestCaseResult`.
|
|
1384
2381
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1385
2382
|
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
1386
2383
|
* @param {*} [options] Override http request option.
|
|
@@ -1392,6 +2389,20 @@ class ScenarioApi extends base_1.BaseAPI {
|
|
|
1392
2389
|
.describeScenario(projectId, scenarioId, options)
|
|
1393
2390
|
.then((request) => request(this.axios, this.basePath));
|
|
1394
2391
|
}
|
|
2392
|
+
/**
|
|
2393
|
+
* Get the steps, data table and variables a scenario held at one entry of its history, as listed by `listScenarioHistories`. They come back in the same shape `describeScenario` returns, so an entry can be compared field by field with the scenario as it is now or with another entry. Password masking applies as it does there. Five things differ, because an entry records values rather than the rows they lived in: - An element argument\'s `element_id`, `user_locator_heals` and `seed_locator` are always null, because an entry records none of them. Its `user_locator` and `candidate_locators` are the ones the element had at that save. - A step\'s `id` is the id it had at that save, which may no longer exist in the scenario. It is null on entries saved before late July 2024, when entries started recording step ids. - An `Execute Step Group` step\'s `overrides` are read against the step group as it is now, so an override on a step since removed from the group is not reported. - An export variable set by a step inside a step group resolves its `step_id` against that group as it is now. When more than one called group assigns the same identifier, the step with the lowest id wins. - An entry records the scenario\'s name at that save but not its description or labels, and a later rename does not move it.
|
|
2394
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2395
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2396
|
+
* @param {number} historyId The `id` of an entry `listScenarioHistories` returned for this scenario.
|
|
2397
|
+
* @param {*} [options] Override http request option.
|
|
2398
|
+
* @throws {RequiredError}
|
|
2399
|
+
* @memberof ScenarioApi
|
|
2400
|
+
*/
|
|
2401
|
+
describeScenarioHistory(projectId, scenarioId, historyId, options) {
|
|
2402
|
+
return (0, exports.ScenarioApiFp)(this.configuration)
|
|
2403
|
+
.describeScenarioHistory(projectId, scenarioId, historyId, options)
|
|
2404
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2405
|
+
}
|
|
1395
2406
|
/**
|
|
1396
2407
|
* Duplicate a scenario.
|
|
1397
2408
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
@@ -1418,6 +2429,21 @@ class ScenarioApi extends base_1.BaseAPI {
|
|
|
1418
2429
|
.executeScenarios(projectId, executeScenariosRequest, options)
|
|
1419
2430
|
.then((request) => request(this.axios, this.basePath));
|
|
1420
2431
|
}
|
|
2432
|
+
/**
|
|
2433
|
+
* List a scenario\'s history, newest first. Each save of the scenario\'s steps in the scenario editor records the whole scenario as it stood after that save, as one entry, and so does creating it by import, copy or `duplicateScenario`. An editor save\'s entry is written a moment after the save, not with it; the others are written with it. Changing only the name, description or labels, which is all `updateScenario` changes, records no entry. Use this to see when a scenario\'s steps changed and who changed them, then read an entry with `describeScenarioHistory` to see what it held. Comparing two entries shows what a save changed. `latest` is true on the entry recorded by the most recent save of the steps, and holds the steps as last saved. The entry listed after it is the version before that save. A passing run, or a locator update made from a test result, changes an element\'s candidate locators without recording an entry, so `describeScenario` can differ from `latest` there.
|
|
2434
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2435
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2436
|
+
* @param {number} [page] The number of page returns.
|
|
2437
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
2438
|
+
* @param {*} [options] Override http request option.
|
|
2439
|
+
* @throws {RequiredError}
|
|
2440
|
+
* @memberof ScenarioApi
|
|
2441
|
+
*/
|
|
2442
|
+
listScenarioHistories(projectId, scenarioId, page, perPage, options) {
|
|
2443
|
+
return (0, exports.ScenarioApiFp)(this.configuration)
|
|
2444
|
+
.listScenarioHistories(projectId, scenarioId, page, perPage, options)
|
|
2445
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2446
|
+
}
|
|
1421
2447
|
/**
|
|
1422
2448
|
* List scenarios.
|
|
1423
2449
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
@@ -1431,6 +2457,63 @@ class ScenarioApi extends base_1.BaseAPI {
|
|
|
1431
2457
|
.listScenarios(projectId, page, options)
|
|
1432
2458
|
.then((request) => request(this.axios, this.basePath));
|
|
1433
2459
|
}
|
|
2460
|
+
/**
|
|
2461
|
+
* List every step keyword an Autify NoCode Web scenario can be built from, with the ordered argument signature of each. Supply a step\'s arguments in the order `arguments` gives them. A keyword whose `included_in_plan` is false is not part of this workspace\'s plan, and writing a step that uses it is rejected; every keyword is listed either way, so the whole vocabulary is visible. `keyword` is the canonical English name and is what the rest of the API expects, whatever language the workspace is set to.
|
|
2462
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
2463
|
+
* @param {*} [options] Override http request option.
|
|
2464
|
+
* @throws {RequiredError}
|
|
2465
|
+
* @memberof ScenarioApi
|
|
2466
|
+
*/
|
|
2467
|
+
listStepKeywords(projectId, options) {
|
|
2468
|
+
return (0, exports.ScenarioApiFp)(this.configuration)
|
|
2469
|
+
.listStepKeywords(projectId, options)
|
|
2470
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2471
|
+
}
|
|
2472
|
+
/**
|
|
2473
|
+
* Replace a scenario\'s steps. Send the whole list in the order the steps should run; one call adds, edits, removes and reorders steps. A step that carries an `id` from `describeScenario` is that existing step. A step without an `id` is added. An existing step whose `id` is not in the list is removed, so send `[]` to remove every step. Each step and each of its arguments is a JSON merge patch against what `describeScenario` returned. A field you send that differs from the current value is changed, a field you leave out is kept, and `null` clears it. So `{"id": 12}` keeps step 12 exactly as it is, at its new position, and sending the read back unchanged changes nothing. Arguments are matched by `name`, as `listStepKeywords` names them, so send only the arguments you change. An `Execute Javascript` step\'s function arguments are matched by the names `describeScenario` reports for them. Send a name the step lacks to add a function argument, and `"value": null` to remove one. To rename one, remove the old name and add the new one in the same request. A new step needs an `action_type` from `listStepKeywords` and that keyword\'s required arguments. Sending a different `action_type` for an existing step rewrites it for the new keyword, keeping its `id` and carrying over the arguments whose names the two keywords share. When you write a `user_locator`, send `user_locator_heals: true` with it unless the step must use that exact selector on every run. Autify then finds the element by your selector on the next passing run, learns the element from that run and matches it from then on the way it matches a recorded step, so a later page change does not break the step. Your selector only has to pick out the element on the page as it is now. Left false, the selector is a pin, and the step fails once the selector stops matching. Read the scenario again from the response: it has the new steps\' ids and the `version_token` for your next write.
|
|
2474
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2475
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2476
|
+
* @param {ReplaceScenarioStepsRequest} replaceScenarioStepsRequest The scenario's steps, in the order they should run
|
|
2477
|
+
* @param {*} [options] Override http request option.
|
|
2478
|
+
* @throws {RequiredError}
|
|
2479
|
+
* @memberof ScenarioApi
|
|
2480
|
+
*/
|
|
2481
|
+
replaceScenarioSteps(projectId, scenarioId, replaceScenarioStepsRequest, options) {
|
|
2482
|
+
return (0, exports.ScenarioApiFp)(this.configuration)
|
|
2483
|
+
.replaceScenarioSteps(projectId, scenarioId, replaceScenarioStepsRequest, options)
|
|
2484
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2485
|
+
}
|
|
2486
|
+
/**
|
|
2487
|
+
* Restore a scenario to one entry of its history, as listed by `listScenarioHistories`. The scenario is overwritten with what the entry holds: its name, steps, data table, variables, options and resolution. Its description and labels are kept, because an entry does not record them. Steps come back as they were at that save, recorded steps included: - A step still in the scenario keeps its `id`. A step removed since comes back under the `id` it had. A step added since is removed. Entries saved before late July 2024 record no step ids, so their steps get new ones. - An element comes back with the `candidate_locators` it had at that save, so whatever Autify learned about it from runs since then is lost. Its `user_locator_heals` goes back to false and its `seed_locator` is cleared, because an entry records neither. Restoring an entry that already matches the scenario changes nothing and returns the same `version_token`. Any other restore records a new entry in `listScenarioHistories`, so it can be undone by restoring the entry listed after it. When the scenario as it stands has no entry yet, because the entry for a recent write is still being saved, the restore records that state first. Read the scenario from the response: it has the restored steps and the `version_token` for your next write.
|
|
2488
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2489
|
+
* @param {number} scenarioId For example, 2 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
2490
|
+
* @param {number} historyId The `id` of an entry `listScenarioHistories` returned for this scenario.
|
|
2491
|
+
* @param {RestoreScenarioHistoryRequest} [restoreScenarioHistoryRequest]
|
|
2492
|
+
* @param {*} [options] Override http request option.
|
|
2493
|
+
* @throws {RequiredError}
|
|
2494
|
+
* @memberof ScenarioApi
|
|
2495
|
+
*/
|
|
2496
|
+
restoreScenarioHistory(projectId, scenarioId, historyId, restoreScenarioHistoryRequest, options) {
|
|
2497
|
+
return (0, exports.ScenarioApiFp)(this.configuration)
|
|
2498
|
+
.restoreScenarioHistory(projectId, scenarioId, historyId, restoreScenarioHistoryRequest, options)
|
|
2499
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2500
|
+
}
|
|
2501
|
+
/**
|
|
2502
|
+
* Find the steps in a project whose arguments contain some text, without reading every scenario. The search covers every live step of every scenario and step group in the project, ignoring case. It matches the value of a `text` or `url` argument, including an `Execute Javascript` step\'s function arguments, and a value an `Execute Step Group` step substitutes into its group, as `describeScenario` reports it in `overrides`. With `match_on=locators` it matches an element\'s `user_locator` instead; with no `match_on` it matches both. Step names, memos, `seed_locator`, `candidate_locators`, file names, data tables and variables are not searched. A step recorded on a password field is never matched, by its value or its locator, and neither is a value a call site substitutes into one. Each result is one step, in the order of its scenario or step group and then of its position there. A match inside a step group lists the scenarios that run the group in `executed_by`, so a change to the group reaches all of them. To change a scenario\'s step, read the scenario with `describeScenario` for its `version_token`, then send the steps with `replaceScenarioSteps`.
|
|
2503
|
+
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios
|
|
2504
|
+
* @param {string} q The text to find. It matches anywhere in a value, ignoring case; `%` and `_` are matched literally.
|
|
2505
|
+
* @param {'values' | 'locators'} [matchOn] `values` matches argument values only and `locators` matches `user_locator` only. Leave it out to match both.
|
|
2506
|
+
* @param {number} [page] The number of page returns.
|
|
2507
|
+
* @param {number} [perPage] The number of items returns. Default number is 30 and up to a maximum of 100
|
|
2508
|
+
* @param {*} [options] Override http request option.
|
|
2509
|
+
* @throws {RequiredError}
|
|
2510
|
+
* @memberof ScenarioApi
|
|
2511
|
+
*/
|
|
2512
|
+
searchSteps(projectId, q, matchOn, page, perPage, options) {
|
|
2513
|
+
return (0, exports.ScenarioApiFp)(this.configuration)
|
|
2514
|
+
.searchSteps(projectId, q, matchOn, page, perPage, options)
|
|
2515
|
+
.then((request) => request(this.axios, this.basePath));
|
|
2516
|
+
}
|
|
1434
2517
|
/**
|
|
1435
2518
|
* Update a scenario.
|
|
1436
2519
|
* @param {number} projectId For example, 1 for the following URL: https://app.autify.com/projects/1/scenarios/2
|
|
@@ -1454,7 +2537,7 @@ exports.ScenarioApi = ScenarioApi;
|
|
|
1454
2537
|
const ScheduleApiAxiosParamCreator = function (configuration) {
|
|
1455
2538
|
return {
|
|
1456
2539
|
/**
|
|
1457
|
-
* "Schedule" is
|
|
2540
|
+
* "Schedule" is the old name for "Test Plan", so `schedule_id` is the test plan\'s ID.
|
|
1458
2541
|
* @summary Run a test plan.
|
|
1459
2542
|
* @param {number} scheduleId For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3
|
|
1460
2543
|
* @param {ExecuteScheduleRequest} [executeScheduleRequest] The options to execute a test plan.
|
|
@@ -1506,7 +2589,7 @@ const ScheduleApiFp = function (configuration) {
|
|
|
1506
2589
|
const localVarAxiosParamCreator = (0, exports.ScheduleApiAxiosParamCreator)(configuration);
|
|
1507
2590
|
return {
|
|
1508
2591
|
/**
|
|
1509
|
-
* "Schedule" is
|
|
2592
|
+
* "Schedule" is the old name for "Test Plan", so `schedule_id` is the test plan\'s ID.
|
|
1510
2593
|
* @summary Run a test plan.
|
|
1511
2594
|
* @param {number} scheduleId For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3
|
|
1512
2595
|
* @param {ExecuteScheduleRequest} [executeScheduleRequest] The options to execute a test plan.
|
|
@@ -1528,7 +2611,7 @@ const ScheduleApiFactory = function (configuration, basePath, axios) {
|
|
|
1528
2611
|
const localVarFp = (0, exports.ScheduleApiFp)(configuration);
|
|
1529
2612
|
return {
|
|
1530
2613
|
/**
|
|
1531
|
-
* "Schedule" is
|
|
2614
|
+
* "Schedule" is the old name for "Test Plan", so `schedule_id` is the test plan\'s ID.
|
|
1532
2615
|
* @summary Run a test plan.
|
|
1533
2616
|
* @param {number} scheduleId For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3
|
|
1534
2617
|
* @param {ExecuteScheduleRequest} [executeScheduleRequest] The options to execute a test plan.
|
|
@@ -1551,7 +2634,7 @@ exports.ScheduleApiFactory = ScheduleApiFactory;
|
|
|
1551
2634
|
*/
|
|
1552
2635
|
class ScheduleApi extends base_1.BaseAPI {
|
|
1553
2636
|
/**
|
|
1554
|
-
* "Schedule" is
|
|
2637
|
+
* "Schedule" is the old name for "Test Plan", so `schedule_id` is the test plan\'s ID.
|
|
1555
2638
|
* @summary Run a test plan.
|
|
1556
2639
|
* @param {number} scheduleId For example, 3 for the following URL: https://app.autify.com/projects/1/test_plans/3
|
|
1557
2640
|
* @param {ExecuteScheduleRequest} [executeScheduleRequest] The options to execute a test plan.
|