@dev-blinq/cucumber_client 1.0.1609-dev → 1.0.1611-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.
@@ -382,12 +382,7 @@ const _generateCodeFromCommand = (step, elements, userData) => {
382
382
  if (data) {
383
383
  try {
384
384
  const { snapshot, fileName, filePath } = data;
385
- let folderPath = filePath;
386
- if (process.env.BVT_TEMP_SNAPSHOTS_FOLDER) {
387
- const envName = path.basename(process.env.BLINQ_ENV).replace(".json", "");
388
- folderPath = path.join(process.env.BVT_TEMP_SNAPSHOTS_FOLDER, envName);
389
- }
390
- // const folderPath = process.env.BVT_TEMP_SNAPSHOTS_FOLDER ?? filePath;
385
+ const folderPath = process.env.BVT_TEMP_SNAPSHOTS_FOLDER ?? filePath;
391
386
  const filePathWithName = path.join(folderPath, fileName);
392
387
  if (!fs.existsSync(folderPath)) {
393
388
  fs.mkdirSync(folderPath, { recursive: true });
@@ -923,13 +923,15 @@ export class BVTRecorder {
923
923
  }
924
924
  async runStep({ step, parametersMap, tags, isFirstStep, listenNetwork }, options) {
925
925
  const { skipAfter = true, skipBefore = !isFirstStep } = options || {};
926
+
927
+ const env = path.basename(this.envName, ".json");
926
928
  const _env = {
927
929
  TOKEN: this.TOKEN,
928
930
  TEMP_RUN: true,
929
931
  REPORT_FOLDER: this.bvtContext.reportFolder,
930
932
  BLINQ_ENV: this.envName,
931
933
  DEBUG: "blinq:route",
932
- BVT_TEMP_SNAPSHOTS_FOLDER: this.tempSnapshotsFolder,
934
+ BVT_TEMP_SNAPSHOTS_FOLDER: path.join(this.tempSnapshotsFolder, env),
933
935
  };
934
936
 
935
937
  this.bvtContext.navigate = true;
@@ -153,7 +153,7 @@ export class PublishService {
153
153
  constructor(TOKEN) {
154
154
  this.TOKEN = TOKEN;
155
155
  }
156
- async saveScenario({ scenario, featureName, override, branch, isEditing, projectId }) {
156
+ async saveScenario({ scenario, featureName, override, branch, isEditing, projectId, env }) {
157
157
  const runsURL = getRunsServiceBaseURL();
158
158
  const workspaceURL = runsURL.replace("/runs", "/workspace");
159
159
  const url = `${workspaceURL}/publish-recording`;
@@ -164,6 +164,7 @@ export class PublishService {
164
164
  scenario,
165
165
  featureName,
166
166
  override,
167
+ env,
167
168
  },
168
169
  params: {
169
170
  branch,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1609-dev",
3
+ "version": "1.0.1611-dev",
4
4
  "description": " ",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -39,7 +39,7 @@
39
39
  "@cucumber/tag-expressions": "^6.1.1",
40
40
  "@dev-blinq/cucumber-js": "1.0.204-dev",
41
41
  "@faker-js/faker": "^8.4.1",
42
- "automation_model": "1.0.890-dev",
42
+ "automation_model": "1.0.891-dev",
43
43
  "axios": "^1.7.4",
44
44
  "chokidar": "^3.6.0",
45
45
  "create-require": "^1.1.1",