@dev-blinq/cucumber_client 1.0.1273-dev → 1.0.1275-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.
- package/bin/assets/bundled_scripts/recorder.js +159 -14222
- package/bin/assets/scripts/unique_locators.js +0 -4
- package/bin/client/code_gen/playwright_codeget.js +9 -1
- package/bin/client/cucumber/steps_definitions.js +5 -0
- package/bin/client/recorderv3/bvt_recorder.js +2 -2
- package/bin/client/recorderv3/step_runner.js +4 -2
- package/bin/client/recording.js +1 -0
- package/package.json +2 -2
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import DOM_Attr from "./dom_attr";
|
|
3
1
|
import DOM_Parent from "./dom_parent";
|
|
4
|
-
// import SnapshotCapturer from "./snapshot_capturer";
|
|
5
2
|
import { __PW } from "./pw"
|
|
6
3
|
|
|
7
4
|
class LocatorGenerator {
|
|
@@ -15,7 +12,6 @@ class LocatorGenerator {
|
|
|
15
12
|
text_with_index: "text_with_index",
|
|
16
13
|
};
|
|
17
14
|
this.options = options;
|
|
18
|
-
this.dom_Attr = new DOM_Attr();
|
|
19
15
|
this.dom_Parent = new DOM_Parent();
|
|
20
16
|
this.PW = __PW;
|
|
21
17
|
this.injectedScript = injectedScript;
|
|
@@ -58,7 +58,8 @@ const _isCodeGenerationStep = (step) => {
|
|
|
58
58
|
step.type === Types.VERIFY_ATTRIBUTE ||
|
|
59
59
|
step.type === Types.VERIFY_PROPERTY ||
|
|
60
60
|
step.type === Types.SET_INPUT_FILES ||
|
|
61
|
-
step.type === Types.VERIFY_PAGE_SNAPSHOT
|
|
61
|
+
step.type === Types.VERIFY_PAGE_SNAPSHOT ||
|
|
62
|
+
step.type === Types.CONDITIONAL_WAIT
|
|
62
63
|
) {
|
|
63
64
|
return true;
|
|
64
65
|
}
|
|
@@ -641,6 +642,13 @@ const _generateCodeFromCommand = (step, elements, userData) => {
|
|
|
641
642
|
codeLines.push(line);
|
|
642
643
|
break;
|
|
643
644
|
}
|
|
645
|
+
case Types.CONDITIONAL_WAIT: {
|
|
646
|
+
line = `await context.web.conditionalWait(elements["${elementIdentifier}"], `;
|
|
647
|
+
input = "_param_0";
|
|
648
|
+
line += `"${step.parameters[1]}", ${input}, _params, null, this);`;
|
|
649
|
+
codeLines.push(line);
|
|
650
|
+
break;
|
|
651
|
+
}
|
|
644
652
|
case Types.SET_INPUT_FILES: {
|
|
645
653
|
line = `await context.web.setInputFiles(elements["${elementIdentifier}"], `;
|
|
646
654
|
let files = step.parameters[0];
|
|
@@ -701,7 +701,6 @@ export class BVTRecorder {
|
|
|
701
701
|
async closeBrowser() {
|
|
702
702
|
delete process.env.TEMP_RUN;
|
|
703
703
|
await this.watcher.close().then(() => {});
|
|
704
|
-
|
|
705
704
|
this.watcher = null;
|
|
706
705
|
this.previousIndex = null;
|
|
707
706
|
this.previousHistoryLength = null;
|
|
@@ -808,7 +807,7 @@ export class BVTRecorder {
|
|
|
808
807
|
}
|
|
809
808
|
await this.setMode("running");
|
|
810
809
|
try {
|
|
811
|
-
await this.stepRunner.runStep(
|
|
810
|
+
const { result, info } = await this.stepRunner.runStep(
|
|
812
811
|
{
|
|
813
812
|
step,
|
|
814
813
|
parametersMap,
|
|
@@ -818,6 +817,7 @@ export class BVTRecorder {
|
|
|
818
817
|
options
|
|
819
818
|
);
|
|
820
819
|
await this.revertMode();
|
|
820
|
+
return { result, info };
|
|
821
821
|
} catch (error) {
|
|
822
822
|
await this.revertMode();
|
|
823
823
|
throw error;
|
|
@@ -114,8 +114,8 @@ export class BVTStepRunner {
|
|
|
114
114
|
|
|
115
115
|
const stepExecController = new AbortController();
|
|
116
116
|
this.#currentStepController = stepExecController;
|
|
117
|
-
await withAbort(async () => {
|
|
118
|
-
await stepsDefinitions.executeStepRemote(
|
|
117
|
+
const { result, info } = await withAbort(async () => {
|
|
118
|
+
return await stepsDefinitions.executeStepRemote(
|
|
119
119
|
{
|
|
120
120
|
feature_file_path,
|
|
121
121
|
tempFolderPath,
|
|
@@ -130,5 +130,7 @@ export class BVTStepRunner {
|
|
|
130
130
|
fs.rmSync(tempFolderPath, { recursive: true });
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
+
console.log("Step execution result:", result);
|
|
134
|
+
return { result, info };
|
|
133
135
|
}
|
|
134
136
|
}
|
package/bin/client/recording.js
CHANGED
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.1275-dev",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "bin/index.js",
|
|
6
6
|
"types": "bin/index.d.ts",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@cucumber/tag-expressions": "^6.1.1",
|
|
32
32
|
"@dev-blinq/cucumber-js": "1.0.175-dev",
|
|
33
33
|
"@faker-js/faker": "^8.1.0",
|
|
34
|
-
"automation_model": "1.0.
|
|
34
|
+
"automation_model": "1.0.755-dev",
|
|
35
35
|
"axios": "^1.7.4",
|
|
36
36
|
"chokidar": "^3.6.0",
|
|
37
37
|
"create-require": "^1.1.1",
|