@dev-blinq/cucumber_client 1.0.1270-stage → 1.0.1271-stage
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.
|
@@ -15,6 +15,7 @@ import chokidar from "chokidar";
|
|
|
15
15
|
import { unEscapeNonPrintables } from "../cucumber/utils.js";
|
|
16
16
|
import { findAvailablePort } from "../utils/index.js";
|
|
17
17
|
import socketLogger from "../utils/socket_logger.js";
|
|
18
|
+
import { tmpdir } from "os";
|
|
18
19
|
const __dirname = path.dirname(url.fileURLToPath(import.meta.url));
|
|
19
20
|
|
|
20
21
|
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -189,6 +190,10 @@ export class BVTRecorder {
|
|
|
189
190
|
this.world = { attach: () => {} };
|
|
190
191
|
this.shouldTakeScreenshot = true;
|
|
191
192
|
this.watcher = null;
|
|
193
|
+
this.networkEventsFolder = path.join(tmpdir(), "blinq_network_events");
|
|
194
|
+
if (existsSync(this.networkEventsFolder)) {
|
|
195
|
+
rmSync(this.networkEventsFolder, { recursive: true, force: true });
|
|
196
|
+
}
|
|
192
197
|
}
|
|
193
198
|
events = {
|
|
194
199
|
onFrameNavigate: "BVTRecorder.onFrameNavigate",
|
|
@@ -841,9 +846,9 @@ export class BVTRecorder {
|
|
|
841
846
|
this.bvtContext.navigate = true;
|
|
842
847
|
this.bvtContext.loadedRoutes = null;
|
|
843
848
|
if (listenNetwork) {
|
|
844
|
-
|
|
849
|
+
this.bvtContext.STORE_DETAILED_NETWORK_DATA = true;
|
|
845
850
|
} else {
|
|
846
|
-
|
|
851
|
+
this.bvtContext.STORE_DETAILED_NETWORK_DATA = false;
|
|
847
852
|
}
|
|
848
853
|
for (const [key, value] of Object.entries(_env)) {
|
|
849
854
|
process.env[key] = value;
|
|
@@ -1224,4 +1229,10 @@ export class BVTRecorder {
|
|
|
1224
1229
|
}
|
|
1225
1230
|
return {};
|
|
1226
1231
|
}
|
|
1232
|
+
|
|
1233
|
+
stopRecordingNetwork(input) {
|
|
1234
|
+
if (this.bvtContext) {
|
|
1235
|
+
this.bvtContext.STORE_DETAILED_NETWORK_DATA = false;
|
|
1236
|
+
}
|
|
1237
|
+
}
|
|
1227
1238
|
}
|
|
@@ -265,6 +265,9 @@ const init = ({ envName, projectDir, roomId, TOKEN }) => {
|
|
|
265
265
|
"recorderWindow.resetExecution": async (input) => {
|
|
266
266
|
return await recorder.resetExecution(input);
|
|
267
267
|
},
|
|
268
|
+
"recorderWindow.stopRecordingNetwork": async (input) => {
|
|
269
|
+
return recorder.stopRecordingNetwork(input);
|
|
270
|
+
},
|
|
268
271
|
});
|
|
269
272
|
socket.on("targetBrowser.command.event", async (input) => {
|
|
270
273
|
return recorder.onAction(input);
|