@dev-blinq/cucumber_client 1.0.1378-stage → 1.0.1379-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.
|
@@ -382,12 +382,7 @@ const _generateCodeFromCommand = (step, elements, userData) => {
|
|
|
382
382
|
if (data) {
|
|
383
383
|
try {
|
|
384
384
|
const { snapshot, fileName, filePath } = data;
|
|
385
|
-
|
|
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 });
|
|
@@ -201,7 +201,7 @@ export class BVTRecorder {
|
|
|
201
201
|
this.pageSet = new Set();
|
|
202
202
|
this.pageMetaDataSet = new Set();
|
|
203
203
|
this.lastKnownUrlPath = "";
|
|
204
|
-
this.world = { attach: () => {
|
|
204
|
+
this.world = { attach: () => {} };
|
|
205
205
|
this.shouldTakeScreenshot = true;
|
|
206
206
|
this.watcher = null;
|
|
207
207
|
this.networkEventsFolder = path.join(tmpdir(), "blinq_network_events");
|
|
@@ -320,7 +320,7 @@ export class BVTRecorder {
|
|
|
320
320
|
process.env.CDP_LISTEN_PORT = this.#remoteDebuggerPort;
|
|
321
321
|
|
|
322
322
|
// this.stepRunner.setRemoteDebugPort(this.#remoteDebuggerPort);
|
|
323
|
-
this.world = { attach: () => {
|
|
323
|
+
this.world = { attach: () => {} };
|
|
324
324
|
|
|
325
325
|
const ai_config_file = path.join(this.projectDir, "ai_config.json");
|
|
326
326
|
let ai_config = {};
|
|
@@ -822,7 +822,7 @@ export class BVTRecorder {
|
|
|
822
822
|
}
|
|
823
823
|
async closeBrowser() {
|
|
824
824
|
delete process.env.TEMP_RUN;
|
|
825
|
-
await this.watcher.close().then(() => {
|
|
825
|
+
await this.watcher.close().then(() => {});
|
|
826
826
|
this.watcher = null;
|
|
827
827
|
this.previousIndex = null;
|
|
828
828
|
this.previousHistoryLength = null;
|
|
@@ -921,13 +921,15 @@ export class BVTRecorder {
|
|
|
921
921
|
}
|
|
922
922
|
async runStep({ step, parametersMap, tags, isFirstStep, listenNetwork }, options) {
|
|
923
923
|
const { skipAfter = true, skipBefore = !isFirstStep } = options || {};
|
|
924
|
+
|
|
925
|
+
const env = path.basename(this.envName, ".json");
|
|
924
926
|
const _env = {
|
|
925
927
|
TOKEN: this.TOKEN,
|
|
926
928
|
TEMP_RUN: true,
|
|
927
929
|
REPORT_FOLDER: this.bvtContext.reportFolder,
|
|
928
930
|
BLINQ_ENV: this.envName,
|
|
929
931
|
DEBUG: "blinq:route",
|
|
930
|
-
BVT_TEMP_SNAPSHOTS_FOLDER: this.tempSnapshotsFolder,
|
|
932
|
+
BVT_TEMP_SNAPSHOTS_FOLDER: path.join(this.tempSnapshotsFolder, env),
|
|
931
933
|
};
|
|
932
934
|
|
|
933
935
|
this.bvtContext.navigate = true;
|
|
@@ -974,7 +976,7 @@ export class BVTRecorder {
|
|
|
974
976
|
this.bvtContext.navigate = false;
|
|
975
977
|
}
|
|
976
978
|
}
|
|
977
|
-
async saveScenario({ scenario, featureName, override, isSingleStep, branch, isEditing }) {
|
|
979
|
+
async saveScenario({ scenario, featureName, override, isSingleStep, branch, isEditing, env }) {
|
|
978
980
|
// await updateStepDefinitions({ scenario, featureName, projectDir: this.projectDir }); // updates mjs files
|
|
979
981
|
// if (!isSingleStep) await updateFeatureFile({ featureName, scenario, override, projectDir: this.projectDir }); // updates gherkin files
|
|
980
982
|
const res = await this.workspaceService.saveScenario({
|
|
@@ -985,6 +987,7 @@ export class BVTRecorder {
|
|
|
985
987
|
branch,
|
|
986
988
|
isEditing,
|
|
987
989
|
projectId: path.basename(this.projectDir),
|
|
990
|
+
env,
|
|
988
991
|
});
|
|
989
992
|
if (res.success) {
|
|
990
993
|
await this.cleanup({ tags: scenario.tags });
|
|
@@ -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.
|
|
3
|
+
"version": "1.0.1379-stage",
|
|
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.114-stage",
|
|
41
41
|
"@faker-js/faker": "^8.4.1",
|
|
42
|
-
"automation_model": "1.0.
|
|
42
|
+
"automation_model": "1.0.778-stage",
|
|
43
43
|
"axios": "^1.7.4",
|
|
44
44
|
"chokidar": "^3.6.0",
|
|
45
45
|
"create-require": "^1.1.1",
|