@memlab/e2e 1.0.11 → 1.0.12
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/BaseSynthesizer.js
CHANGED
|
@@ -125,7 +125,7 @@ class BaseSynthesizer {
|
|
|
125
125
|
return 1;
|
|
126
126
|
}
|
|
127
127
|
// get the URL of the target app
|
|
128
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
128
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
129
129
|
getBaseURL(_options = {}) {
|
|
130
130
|
return 'https://www.facebook.com';
|
|
131
131
|
}
|
|
@@ -134,7 +134,7 @@ class BaseSynthesizer {
|
|
|
134
134
|
return url;
|
|
135
135
|
}
|
|
136
136
|
// get URL parameters
|
|
137
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
137
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
138
138
|
getURLParameters(_options = {}) {
|
|
139
139
|
return '';
|
|
140
140
|
}
|
|
@@ -335,6 +335,7 @@ class BaseSynthesizer {
|
|
|
335
335
|
numOfWarmup: this.getActualNumberOfWarmup(),
|
|
336
336
|
dataBuilder: null,
|
|
337
337
|
isPageLoaded: (_a = scenario.isPageLoaded) !== null && _a !== void 0 ? _a : this.getPageLoadChecker(),
|
|
338
|
+
scenario,
|
|
338
339
|
};
|
|
339
340
|
}
|
|
340
341
|
synthesisSimple(start, target, options = {}) {
|
|
@@ -102,7 +102,10 @@ class E2EInteractionManager {
|
|
|
102
102
|
const url = `${baseURL}${subUrl}` + getURLParameter(tab, visitPlan);
|
|
103
103
|
logTabProgress(i, visitPlan);
|
|
104
104
|
yield maybeWaitForConsoleInput(i + 1);
|
|
105
|
-
const opArgs = {
|
|
105
|
+
const opArgs = {
|
|
106
|
+
isPageLoaded: visitPlan.isPageLoaded,
|
|
107
|
+
scenario: visitPlan.scenario,
|
|
108
|
+
};
|
|
106
109
|
yield applyAsyncWithRetry(this.getPageStatistics, this, [url, tab, opArgs], {
|
|
107
110
|
retry: runConfig.interactionFailRetry,
|
|
108
111
|
});
|
|
@@ -176,6 +179,7 @@ class E2EInteractionManager {
|
|
|
176
179
|
});
|
|
177
180
|
}
|
|
178
181
|
getPageStatistics(url, tabInfo, opArgs = {}) {
|
|
182
|
+
var _a;
|
|
179
183
|
return __awaiter(this, void 0, void 0, function* () {
|
|
180
184
|
if (core_1.config.verbose) {
|
|
181
185
|
core_1.info.lowLevel('url: ' + url);
|
|
@@ -198,6 +202,11 @@ class E2EInteractionManager {
|
|
|
198
202
|
// inject marker, which checks if the page is reloaded
|
|
199
203
|
if (tabInfo.idx === 1) {
|
|
200
204
|
yield injectPageReloadChecker(this.page);
|
|
205
|
+
// call setup callback if the scenario has one
|
|
206
|
+
const setup = (_a = opArgs.scenario) === null || _a === void 0 ? void 0 : _a.setup;
|
|
207
|
+
if (setup) {
|
|
208
|
+
yield setup(this.page);
|
|
209
|
+
}
|
|
201
210
|
}
|
|
202
211
|
else {
|
|
203
212
|
yield checkPageReload(this.page);
|