@dev-blinq/cucumber_client 1.0.1639-dev → 1.0.1641-dev

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.
@@ -104,20 +104,20 @@ async function BVTRecorderInit({ envName, projectDir, roomId, TOKEN, socket = nu
104
104
  },
105
105
  logger: socketLogger,
106
106
  });
107
- try {
108
- await recorder.openBrowser();
109
- socketLogger.info("BVTRecorder.browserOpened");
110
- socket.emit("BVTRecorder.browserOpened", null, roomId);
111
- } catch (e) {
112
- if (e instanceof Error) {
113
- socketLogger.error("BVTRecorder.browserLaunchFailed", e);
114
- socket.emit("BVTRecorder.browserLaunchFailed", e, roomId);
115
- } else {
116
- socketLogger.error("BVTRecorder.browserLaunchFailed", JSON.stringify(e));
117
- socket.emit("BVTRecorder.browserLaunchFailed", JSON.stringify(e), roomId);
118
- }
119
- console.error("Browser launch failed", e);
120
- }
107
+ // try {
108
+ // await recorder.openBrowser();
109
+ // socketLogger.info("BVTRecorder.browserOpened");
110
+ // socket.emit("BVTRecorder.browserOpened", null, roomId);
111
+ // } catch (e) {
112
+ // if (e instanceof Error) {
113
+ // socketLogger.error("BVTRecorder.browserLaunchFailed", e);
114
+ // socket.emit("BVTRecorder.browserLaunchFailed", e, roomId);
115
+ // } else {
116
+ // socketLogger.error("BVTRecorder.browserLaunchFailed", JSON.stringify(e));
117
+ // socket.emit("BVTRecorder.browserLaunchFailed", JSON.stringify(e), roomId);
118
+ // }
119
+ // console.error("Browser launch failed", e);
120
+ // }
121
121
 
122
122
  const promisifiedSocketServer = new PromisifiedSocketServer(socket, {
123
123
  "recorderWindow.openBrowser": async (input) => {
@@ -670,7 +670,8 @@ export class BVTRecorder {
670
670
  ],
671
671
  };
672
672
 
673
- const bvtContext = await initContext(url, false, false, this.world, 450, initScripts, this.envName);
673
+ const scenario = { pickle: this.scenarioDoc };
674
+ const bvtContext = await initContext(url, false, false, this.world, 450, initScripts, this.envName, scenario);
674
675
  this.bvtContext = bvtContext;
675
676
  this.stepRunner = new BVTStepRunner({
676
677
  projectDir: this.projectDir,
@@ -773,6 +774,7 @@ export class BVTRecorder {
773
774
 
774
775
  await this.page.goto(url, {
775
776
  waitUntil: "domcontentloaded",
777
+ timeout: this.config.page_timeout ?? 60_000,
776
778
  });
777
779
  // add listener for frame navigation on current tab
778
780
  this._addFrameNavigateListener(this.page);
@@ -1491,6 +1493,7 @@ export class BVTRecorder {
1491
1493
  const featureFilePath = path.join(this.projectDir, "features", featureName);
1492
1494
  const gherkinDoc = this.parseFeatureFile(featureFilePath);
1493
1495
  const scenario = gherkinDoc.feature.children.find((child) => child.scenario.name === scenarioName)?.scenario;
1496
+ this.scenarioDoc = scenario;
1494
1497
 
1495
1498
  const steps = [];
1496
1499
  const parameters = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1639-dev",
3
+ "version": "1.0.1641-dev",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",