@shopgate/pwa-core 7.30.0-alpha.7 → 7.30.0-alpha.8
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/classes/AppCommand/index.js +115 -11
- package/classes/AppCommand/spec.js +260 -6
- package/classes/AppCommandRequest/index.js +129 -20
- package/classes/AppPermissionsRequest/AppPermissionsRequest.js +45 -7
- package/classes/AppPermissionsRequest/GetAppPermissionsRequest.js +48 -9
- package/classes/AppPermissionsRequest/RequestAppPermissionsRequest.js +54 -9
- package/classes/Bridge/index.js +34 -4
- package/classes/Bridge/spec.js +24 -1
- package/classes/BrightnessRequest/index.js +59 -10
- package/classes/BrightnessRequest/spec.js +111 -6
- package/classes/BrowserConnector/index.js +180 -26
- package/classes/Conditioner/index.js +74 -8
- package/classes/Conditioner/spec.js +75 -1
- package/classes/DataRequest/index.js +116 -13
- package/classes/DevServerBridge/index.js +86 -9
- package/classes/DevServerBridge/spec.js +231 -14
- package/classes/ErrorManager/index.js +144 -20
- package/classes/ErrorManager/spec.js +244 -2
- package/classes/Event/index.js +101 -15
- package/classes/HttpRequest/index.js +182 -21
- package/classes/PipelineDependencies/index.js +42 -6
- package/classes/PipelineDependencies/spec.js +46 -3
- package/classes/PipelineManager/index.js +517 -71
- package/classes/PipelineManager/spec.js +733 -15
- package/classes/PipelineRequest/index.js +167 -19
- package/classes/PipelineRequest/mock.js +118 -21
- package/classes/PipelineRequest/spec.js +333 -2
- package/classes/PipelineSequence/index.js +34 -6
- package/classes/Request/index.js +61 -13
- package/classes/RequestBuffer/index.js +43 -6
- package/classes/RequestManager/index.js +216 -33
- package/classes/RequestManager/spec.js +188 -1
- package/classes/Scanner/index.js +246 -67
- package/classes/ScannerEvent/index.js +23 -9
- package/classes/ScannerEventHandler/index.js +39 -16
- package/classes/ScannerEventListener/index.js +84 -24
- package/classes/ScannerManager/ScanProcessingError.js +11 -3
- package/classes/ScannerManager/index.js +133 -21
- package/classes/WebStorageRequest/index.js +76 -9
- package/commands/analyticsSetCustomValues.js +8 -2
- package/commands/appPermissions.js +10 -3
- package/commands/brightness.js +33 -5
- package/commands/broadcastEvent.js +8 -2
- package/commands/cleanTab.js +11 -3
- package/commands/closeInAppBrowser.js +22 -2
- package/commands/flushTab.js +8 -2
- package/commands/getWebStorageEntry.js +11 -2
- package/commands/hideMenuBar.js +8 -2
- package/commands/hideNavigationBar.js +8 -2
- package/commands/hideSplashScreen.js +8 -2
- package/commands/onload.js +13 -3
- package/commands/openAppSettings.js +8 -2
- package/commands/openPage.js +8 -2
- package/commands/openPageExtern.js +8 -2
- package/commands/performCommandsAfterDelay.js +11 -3
- package/commands/plotProjects.js +65 -7
- package/commands/popTabToRoot.js +11 -3
- package/commands/registerEvents.js +10 -2
- package/commands/scanner.js +76 -7
- package/commands/setCookie.js +8 -2
- package/commands/setDebugLoggingEnabled.js +8 -2
- package/commands/setScrollingEnabled.js +7 -2
- package/commands/setWebStorageEntry.js +8 -2
- package/commands/shareItem.js +18 -2
- package/commands/showNavigationBar.js +8 -2
- package/commands/showTab.js +13 -2
- package/commands/unifiedTracking.js +128 -30
- package/constants/AppCommands.js +6 -1
- package/constants/AppEvents.js +9 -1
- package/constants/AppPermissions.js +57 -13
- package/constants/Command.js +1 -1
- package/constants/ErrorHandleTypes.js +2 -1
- package/constants/ErrorManager.js +15 -1
- package/constants/Pipeline.js +52 -17
- package/constants/ProcessTypes.js +3 -1
- package/constants/RequestManagerModes.js +19 -7
- package/constants/RequestTypes.js +2 -1
- package/constants/Scanner.js +39 -10
- package/constants/Trilean.js +6 -1
- package/emitters/ui.js +2 -1
- package/helpers/index.js +66 -8
- package/helpers/logGroup.js +56 -8
- package/helpers/version.js +216 -22
- package/index.js +60 -5
- package/package.json +1 -1
|
@@ -1,55 +1,203 @@
|
|
|
1
|
-
|
|
1
|
+
import Request from "../Request";
|
|
2
|
+
import pipelineManager from "../PipelineManager";
|
|
3
|
+
import { CURRENT_VERSION } from "../../constants/Pipeline";
|
|
4
|
+
import * as processTypes from "../../constants/ProcessTypes";
|
|
5
|
+
import * as errorHandleTypes from "../../constants/ErrorHandleTypes";
|
|
6
|
+
import { logger } from "../../helpers";
|
|
7
|
+
export const DEFAULT_VERSION = CURRENT_VERSION;
|
|
8
|
+
export const DEFAULT_RETRIES = 3;
|
|
9
|
+
export const DEFAULT_MAX_RETRIES = 5;
|
|
10
|
+
export const DEFAULT_INPUT = {};
|
|
11
|
+
export const DEFAULT_TIMEOUT = 20000;
|
|
12
|
+
export const DEFAULT_MAX_TIMEOUT = 30000;
|
|
13
|
+
export const DEFAULT_PROCESSED = processTypes.PROCESS_ALWAYS;
|
|
14
|
+
export const DEFAULT_HANDLE_ERROR = errorHandleTypes.ERROR_HANDLE_DEFAULT;
|
|
15
|
+
|
|
16
|
+
/**
|
|
2
17
|
* Defines a pipeline request.
|
|
3
18
|
* @class
|
|
4
|
-
*/
|
|
19
|
+
*/
|
|
20
|
+
class PipelineRequest extends Request {
|
|
21
|
+
/**
|
|
5
22
|
* @param {string} name The pipeline name. Excluding the version.
|
|
6
|
-
*/
|
|
23
|
+
*/
|
|
24
|
+
constructor(name) {
|
|
25
|
+
if (!name) throw new Error('The \'name\' parameter is not set!');
|
|
26
|
+
super();
|
|
27
|
+
this.name = name;
|
|
28
|
+
this.version = DEFAULT_VERSION;
|
|
29
|
+
this.input = DEFAULT_INPUT;
|
|
30
|
+
this.trusted = false;
|
|
31
|
+
this.retries = DEFAULT_RETRIES;
|
|
32
|
+
this.timeout = DEFAULT_TIMEOUT;
|
|
33
|
+
this.process = DEFAULT_PROCESSED;
|
|
34
|
+
this.handleErrors = DEFAULT_HANDLE_ERROR;
|
|
35
|
+
this.errorBlacklist = [];
|
|
36
|
+
this.responseBehavior = {
|
|
37
|
+
success: null,
|
|
38
|
+
error: null
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
7
43
|
* @param {number} version The version number of the pipeline request.
|
|
8
44
|
* @return {PipelineRequest}
|
|
9
|
-
*/
|
|
45
|
+
*/
|
|
46
|
+
setVersion(version = DEFAULT_VERSION) {
|
|
47
|
+
if (typeof version !== 'number') throw new TypeError(`Expected 'number'. Received: '${typeof version}'`);
|
|
48
|
+
if (version < 0) throw new Error(`Expected positive integer. Received: '${version}'`);
|
|
49
|
+
if (version === 0) throw new Error('Has to be > 0!');
|
|
50
|
+
this.version = version;
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
10
55
|
* @param {Object} [input={}] The payload to send with the request.
|
|
11
56
|
* @returns {PipelineRequest}
|
|
12
|
-
*/
|
|
57
|
+
*/
|
|
58
|
+
setInput(input = DEFAULT_INPUT) {
|
|
59
|
+
if (typeof input !== 'object' || input.constructor !== Object) {
|
|
60
|
+
throw new TypeError(`Expected 'object'. Received: '${typeof input}'`);
|
|
61
|
+
}
|
|
62
|
+
this.input = input;
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
13
67
|
* @return {PipelineRequest}
|
|
14
|
-
*/
|
|
68
|
+
*/
|
|
69
|
+
setTrusted() {
|
|
70
|
+
this.trusted = true;
|
|
71
|
+
return this;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
15
75
|
* @param {number} retries The number of retries this pipeline request should perform.
|
|
16
76
|
* @return {PipelineRequest}
|
|
17
|
-
*/
|
|
77
|
+
*/
|
|
78
|
+
setRetries(retries = DEFAULT_RETRIES) {
|
|
79
|
+
if (typeof retries !== 'number') throw new TypeError(`Expected 'number'. Received: '${typeof retries}'`);
|
|
80
|
+
if (retries < 0) throw new Error(`Expected positive integer. Received: '${retries}'`);
|
|
81
|
+
if (retries >= DEFAULT_MAX_RETRIES) throw new Error(`Max retries exceeded. Received: '${retries}'`);
|
|
82
|
+
this.retries = Math.min(retries, DEFAULT_MAX_RETRIES);
|
|
83
|
+
return this;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/**
|
|
18
87
|
* @param {number} timeout The timeout (ms) that the request will wait before canceling.
|
|
19
88
|
* @return {PipelineRequest}
|
|
20
|
-
*/
|
|
89
|
+
*/
|
|
90
|
+
setTimeout(timeout = DEFAULT_TIMEOUT) {
|
|
91
|
+
if (typeof timeout !== 'number') throw new TypeError(`Expected 'number'. Received: '${typeof timeout}'`);
|
|
92
|
+
if (timeout < 0) throw new Error(`Expected positive integer. Received: '${timeout}'`);
|
|
93
|
+
if (timeout > DEFAULT_MAX_TIMEOUT) throw new Error(`Max timeout exceeded. Received: '${timeout}'`);
|
|
94
|
+
this.timeout = Math.min(timeout, DEFAULT_MAX_TIMEOUT);
|
|
95
|
+
return this;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
21
99
|
* @param {string} processed The response process type.
|
|
22
100
|
* @return {PipelineRequest}
|
|
23
|
-
*/
|
|
101
|
+
*/
|
|
102
|
+
setResponseProcessed(processed = DEFAULT_PROCESSED) {
|
|
103
|
+
if (typeof processed !== 'string') throw new TypeError(`Expected 'string'. Received: '${typeof processed}'`);
|
|
104
|
+
if (!Object.values(processTypes).includes(processed)) {
|
|
105
|
+
throw new Error(`The value '${processed}' is not supported!`);
|
|
106
|
+
}
|
|
107
|
+
this.process = processed;
|
|
108
|
+
return this;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
24
112
|
* Sets a blacklist of error codes that should not be handled internally.
|
|
25
113
|
* Can be used for custom error handling outside.
|
|
26
114
|
* @param {Object} errors - Array of error codes
|
|
27
115
|
* @return {PipelineRequest}
|
|
28
|
-
*/
|
|
116
|
+
*/
|
|
117
|
+
setErrorBlacklist(errors = []) {
|
|
118
|
+
this.errorBlacklist = errors;
|
|
119
|
+
return this;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
29
123
|
* @param {string} handle The handle errors type.
|
|
30
124
|
* @return {PipelineRequest}
|
|
31
|
-
*/
|
|
125
|
+
*/
|
|
126
|
+
setHandleErrors(handle = errorHandleTypes.ERROR_HANDLE_DEFAULT) {
|
|
127
|
+
if (typeof handle !== 'string') throw new TypeError(`Expected 'string'. Received: '${typeof handle}'`);
|
|
128
|
+
if (!Object.values(errorHandleTypes).includes(handle)) {
|
|
129
|
+
throw new Error(`The value '${handle}' is not supported!`);
|
|
130
|
+
}
|
|
131
|
+
this.handleErrors = handle;
|
|
132
|
+
return this;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
32
136
|
* Sets a flag to suppress errors.
|
|
33
137
|
* When true, no EVENT_PIPELINE_ERROR would be triggered.
|
|
34
|
-
* @param {
|
|
138
|
+
* @param {boolean} value Value.
|
|
35
139
|
* @return {PipelineRequest}
|
|
36
140
|
* @deprecated
|
|
37
|
-
*/
|
|
141
|
+
*/
|
|
142
|
+
setSuppressErrors(value) {
|
|
143
|
+
logger.warn('Deprecated: setSuppressErrors() will be removed. Use setHandleErrors() instead!');
|
|
144
|
+
const handle = value ? errorHandleTypes.ERROR_HANDLE_SUPPRESS : errorHandleTypes.ERROR_HANDLE_DEFAULT;
|
|
145
|
+
this.setHandleErrors(handle);
|
|
146
|
+
return this;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
38
150
|
* @param {Object} errors - Array of error codes
|
|
39
151
|
* @return {PipelineRequest}
|
|
40
152
|
* @deprecated
|
|
41
|
-
*/
|
|
153
|
+
*/
|
|
154
|
+
setHandledErrors(errors) {
|
|
155
|
+
logger.warn('Deprecated: setHandledErrors() will be removed in favor of setErrorBlacklist()!');
|
|
156
|
+
this.setErrorBlacklist(errors);
|
|
157
|
+
return this;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
42
161
|
* Allows to register callbacks to be executed in case of pipeline response error or success.
|
|
43
162
|
* @param {Object} behaviors The desired behaviors
|
|
44
163
|
* @return {PipelineRequest}
|
|
45
|
-
*/
|
|
164
|
+
*/
|
|
165
|
+
setResponseBehavior(behaviors = {}) {
|
|
166
|
+
this.responseBehavior = {
|
|
167
|
+
...this.responseBehavior,
|
|
168
|
+
...behaviors
|
|
169
|
+
};
|
|
170
|
+
return this;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/**
|
|
46
174
|
* @returns {Function|null}
|
|
47
|
-
*/
|
|
175
|
+
*/
|
|
176
|
+
getSuccessResponseBehavior() {
|
|
177
|
+
return this.responseBehavior?.success || null;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/**
|
|
48
181
|
* @returns {Function|null}
|
|
49
|
-
*/
|
|
182
|
+
*/
|
|
183
|
+
getErrorResponseBehavior() {
|
|
184
|
+
return this.responseBehavior?.error || null;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/**
|
|
50
188
|
* Checks if the request has currently running dependencies.
|
|
51
189
|
* @return {boolean}
|
|
52
|
-
*/
|
|
190
|
+
*/
|
|
191
|
+
hasRunningDependencies() {
|
|
192
|
+
return pipelineManager.hasRunningDependencies(this.name);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
53
196
|
* Dispatches the pipeline.
|
|
54
197
|
* @return {Promise}
|
|
55
|
-
*/
|
|
198
|
+
*/
|
|
199
|
+
dispatch() {
|
|
200
|
+
return pipelineManager.add(this);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
export default PipelineRequest;
|
|
@@ -1,56 +1,153 @@
|
|
|
1
|
-
|
|
1
|
+
import { logger } from "../../helpers";
|
|
2
|
+
import * as errorHandleTypes from "../../constants/ErrorHandleTypes";
|
|
3
|
+
import * as processTypes from "../../constants/ProcessTypes";
|
|
4
|
+
|
|
5
|
+
/**
|
|
2
6
|
* Mocked PipelineRequest.
|
|
3
7
|
* Use it any time you need to mock a PipelineRequest.
|
|
4
8
|
*
|
|
5
9
|
* For more information and usage examples, please check the README.
|
|
6
|
-
*/
|
|
10
|
+
*/
|
|
11
|
+
class MockedPipelineRequest {
|
|
12
|
+
/**
|
|
13
|
+
* Getter for mockedDispatchResolver which is an additional helper function for custom, mock-only
|
|
14
|
+
* `dispatch()` resolver.
|
|
15
|
+
* @return {Function}
|
|
16
|
+
*/
|
|
17
|
+
static get mockedDispatchResolver() {
|
|
18
|
+
return () => {};
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
7
22
|
* Initializes the MockedPipelineRequest object.
|
|
8
23
|
* @param {string} name The pipeline name.
|
|
9
|
-
*/
|
|
24
|
+
*/
|
|
25
|
+
constructor(name) {
|
|
26
|
+
this.name = name;
|
|
27
|
+
this.input = {};
|
|
28
|
+
this.handleErrors = errorHandleTypes.ERROR_HANDLE_DEFAULT;
|
|
29
|
+
this.errorBlacklist = [];
|
|
30
|
+
this.process = processTypes.DEFAULT_PROCESSED;
|
|
31
|
+
this.timeout = undefined;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
10
35
|
* Sets the payload for the MockedPipelineRequest.
|
|
11
36
|
* @param {Object} [mockedInput={}] The payload to send with the request.
|
|
12
37
|
* @returns {MockedPipelineRequest}
|
|
13
|
-
*/
|
|
38
|
+
*/
|
|
39
|
+
setInput(mockedInput = {}) {
|
|
40
|
+
this.input = mockedInput;
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
14
45
|
* Sets a timeout.
|
|
15
46
|
* @param {number} timeout Timeout.
|
|
16
47
|
* @returns {MockedPipelineRequest}
|
|
17
|
-
*/
|
|
48
|
+
*/
|
|
49
|
+
setTimeout(timeout) {
|
|
50
|
+
this.timeout = timeout;
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
18
55
|
* @param {number} retries The number of retries this pipeline request should perform.
|
|
19
56
|
* @return {PipelineRequest}
|
|
20
|
-
*/
|
|
57
|
+
*/
|
|
58
|
+
setRetries(retries = 3) {
|
|
59
|
+
if (typeof retries !== 'number') throw new TypeError(`Expected 'number'. Received: '${typeof retries}'`);
|
|
60
|
+
if (retries < 0) throw new Error(`Expected positive integer. Received: '${retries}'`);
|
|
61
|
+
if (retries >= 5) throw new Error(`Max retries exceeded. Received: '${retries}'`);
|
|
62
|
+
this.retries = Math.min(retries, 5);
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
21
67
|
* Returns promise and calls `MockedPipelineRequest.mockedDispatchResolver()`.
|
|
22
68
|
* @returns {Promise}
|
|
23
|
-
*/
|
|
69
|
+
*/
|
|
70
|
+
dispatch() {
|
|
71
|
+
return new Promise((resolve, reject) => {
|
|
72
|
+
this.constructor.mockedDispatchResolver(this, resolve, reject);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/**
|
|
24
77
|
* @param {string} processed The response process type.
|
|
25
78
|
* @return {PipelineRequest}
|
|
26
|
-
*/
|
|
79
|
+
*/
|
|
80
|
+
setResponseProcessed(processed = processTypes.DEFAULT_PROCESSED) {
|
|
81
|
+
if (typeof processed !== 'string') throw new TypeError(`Expected 'string'. Received: '${typeof processed}'`);
|
|
82
|
+
if (!Object.values(processTypes).includes(processed)) {
|
|
83
|
+
throw new Error(`The value '${processed}' is not supported!`);
|
|
84
|
+
}
|
|
85
|
+
this.process = processed;
|
|
86
|
+
return this;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**
|
|
27
90
|
* Sets a blacklist of error codes that should not be handled internally.
|
|
28
91
|
* Can be used for custom error handling outside.
|
|
29
92
|
* @param {Object} errors - Array of error codes
|
|
30
93
|
* @return {PipelineRequest}
|
|
31
|
-
*/
|
|
94
|
+
*/
|
|
95
|
+
setErrorBlacklist(errors = []) {
|
|
96
|
+
this.errorBlacklist = errors;
|
|
97
|
+
return this;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
32
101
|
* @param {string} handle The handle errors type.
|
|
33
102
|
* @return {PipelineRequest}
|
|
34
|
-
*/
|
|
103
|
+
*/
|
|
104
|
+
setHandleErrors(handle = errorHandleTypes.ERROR_HANDLE_DEFAULT) {
|
|
105
|
+
if (typeof handle !== 'string') throw new TypeError(`Expected 'string'. Received: '${typeof handle}'`);
|
|
106
|
+
if (!Object.values(errorHandleTypes).includes(handle)) {
|
|
107
|
+
throw new Error(`The value '${handle}' is not supported!`);
|
|
108
|
+
}
|
|
109
|
+
this.handleErrors = handle;
|
|
110
|
+
return this;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
35
114
|
* Sets handled errors.
|
|
36
115
|
* @param {Array} errors Blacklisted errors.
|
|
37
116
|
* @returns {MockedPipelineRequest}
|
|
38
117
|
* @deprecated
|
|
39
|
-
*/
|
|
118
|
+
*/
|
|
119
|
+
setHandledErrors(errors = []) {
|
|
120
|
+
logger.warn('Deprecated: setHandledErrors() will be removed in favor of setErrorBlacklist()!');
|
|
121
|
+
this.setErrorBlacklist(errors);
|
|
122
|
+
return this;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
/**
|
|
40
126
|
* Sets a flag to suppress errors.
|
|
41
127
|
* When true, no EVENT_PIPELINE_ERROR would be triggered.
|
|
42
|
-
* @param {
|
|
128
|
+
* @param {boolean} value Value.
|
|
43
129
|
* @return {PipelineRequest}
|
|
44
130
|
* @deprecated
|
|
45
|
-
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
131
|
+
*/
|
|
132
|
+
setSuppressErrors(value) {
|
|
133
|
+
logger.warn('Deprecated: setSuppressErrors() will be removed. Use setHandleErrors() instead!');
|
|
134
|
+
const handle = value ? errorHandleTypes.ERROR_HANDLE_SUPPRESS : errorHandleTypes.ERROR_HANDLE_DEFAULT;
|
|
135
|
+
this.setHandleErrors(handle);
|
|
136
|
+
return this;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
50
141
|
* Factory which creates an instance of MockedPipelineRequest.
|
|
51
142
|
* @param {Function} callback Resolver callback.
|
|
52
143
|
* @returns {MockedPipelineRequest}
|
|
53
|
-
*/
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
144
|
+
*/
|
|
145
|
+
export const mockedPipelineRequestFactory = callback => class extends MockedPipelineRequest {
|
|
146
|
+
/**
|
|
147
|
+
* Getter for custom mocked resolver.
|
|
148
|
+
* @return {Function}
|
|
149
|
+
*/
|
|
150
|
+
static get mockedDispatchResolver() {
|
|
151
|
+
return callback;
|
|
152
|
+
}
|
|
153
|
+
};
|