@dev-blinq/cucumber_client 1.0.1217-dev → 1.0.1219-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.
@@ -1061,7 +1061,10 @@ class BVTRecorder {
1061
1061
  mode: "IGNORE_DIGIT",
1062
1062
  });
1063
1063
  allStrategyLocators["ignore_digit"].push(locator);
1064
- } else if (locator.css.includes("text=") || locator.css.includes("[name=") || locator.css.includes("label=")) {
1064
+ } else if (
1065
+ locator.css &&
1066
+ (locator.css.includes("text=") || locator.css.includes("[name=") || locator.css.includes("label="))
1067
+ ) {
1065
1068
  locs.push(locator);
1066
1069
  allStrategyLocators["basic"].push(locator);
1067
1070
  } else {
@@ -71,7 +71,7 @@ class StepsDefinitions {
71
71
  try {
72
72
  codePage.generateModel();
73
73
  } catch (error) {
74
- logger.info("unable to generate model for file", mjsFile);
74
+ logger.info("unable to generate model for", mjsFile, error);
75
75
  if (supressErrors) {
76
76
  errors.push({
77
77
  file: filePath,
@@ -7,6 +7,8 @@ import { getJsonReport } from "./bvt_json_report.js";
7
7
  import axios from "axios";
8
8
  import { getRunsServiceBaseURL } from "./utils/index.js";
9
9
  import { axiosClient } from "./utils/axiosClient.js";
10
+ import { promisify } from "util";
11
+ import { exec } from "child_process";
10
12
 
11
13
  const BATCH_SIZE = 10;
12
14
  const MAX_RETRIES = 3;
@@ -319,6 +321,11 @@ class ScenarioReport {
319
321
  baseUrl = process.env.NODE_ENV_BLINQ.replace("api", "app");
320
322
  }
321
323
  const reportLink = baseUrl + "/" + projectId + "/scenario-report/" + scenarioId;
324
+ try {
325
+ publishReportLinkToGuacServer(reportLink);
326
+ } catch (err) {
327
+ logger.error(`Failed to publish report link to guac server: ${err}`);
328
+ }
322
329
  logger.info(`Report link :- ${reportLink}`);
323
330
  }
324
331
 
@@ -474,5 +481,15 @@ class ScenarioReport {
474
481
  }
475
482
  }
476
483
  }
477
-
484
+ function publishReportLinkToGuacServer() {
485
+ console.log("aaddfggg")
486
+ try {
487
+ if (existsSync("/tmp/report_publish.sh")) {
488
+ const execAsync = promisify(exec);
489
+ execAsync("sh /tmp/report_publish.sh");
490
+ }
491
+ } catch (error) {
492
+ logger.error("Error while publishing report link to Guac server: " + error);
493
+ }
494
+ }
478
495
  export { ScenarioReport, findNextIdInFolder };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1217-dev",
3
+ "version": "1.0.1219-dev",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",