@dev-blinq/cucumber_client 1.0.1280-dev → 1.0.1280-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.
- package/bin/assets/bundled_scripts/recorder.js +106 -106
- package/bin/assets/preload/recorderv3.js +3 -1
- package/bin/assets/scripts/dom_parent.js +4 -0
- package/bin/assets/scripts/recorder.js +4 -1
- package/bin/assets/scripts/unique_locators.js +837 -815
- package/bin/assets/templates/_hooks_template.txt +37 -0
- package/bin/assets/templates/page_template.txt +2 -16
- package/bin/assets/templates/utils_template.txt +1 -46
- package/bin/client/apiTest/apiTest.js +6 -0
- package/bin/client/cli_helpers.js +11 -13
- package/bin/client/code_cleanup/utils.js +5 -1
- package/bin/client/code_gen/code_inversion.js +53 -4
- package/bin/client/code_gen/page_reflection.js +838 -902
- package/bin/client/code_gen/playwright_codeget.js +43 -12
- package/bin/client/cucumber/feature.js +89 -27
- package/bin/client/cucumber/project_to_document.js +1 -1
- package/bin/client/cucumber/steps_definitions.js +84 -81
- package/bin/client/cucumber_selector.js +17 -1
- package/bin/client/local_agent.js +7 -6
- package/bin/client/project.js +186 -196
- package/bin/client/recorderv3/bvt_recorder.js +170 -60
- package/bin/client/recorderv3/implemented_steps.js +74 -16
- package/bin/client/recorderv3/index.js +50 -25
- package/bin/client/recorderv3/network.js +299 -0
- package/bin/client/recorderv3/services.js +4 -16
- package/bin/client/recorderv3/step_runner.js +332 -69
- package/bin/client/recorderv3/step_utils.js +578 -7
- package/bin/client/recorderv3/update_feature.js +32 -30
- package/bin/client/run_cucumber.js +5 -1
- package/bin/client/scenario_report.js +0 -5
- package/bin/client/test_scenario.js +0 -1
- package/bin/client/utils/socket_logger.js +132 -0
- package/bin/index.js +1 -0
- package/bin/logger.js +3 -2
- package/bin/min/consoleApi.min.cjs +2 -3
- package/bin/min/injectedScript.min.cjs +16 -16
- package/package.json +22 -13
|
@@ -955,6 +955,7 @@ class BVTRecorder {
|
|
|
955
955
|
// Get all attributes
|
|
956
956
|
if (element.attributes) {
|
|
957
957
|
for (const attr of element.attributes) {
|
|
958
|
+
if (attr.name === "data-blinq-id" || attr.name === "data-input-id") continue;
|
|
958
959
|
unsortedAttributes[attr.name] = attr.value;
|
|
959
960
|
}
|
|
960
961
|
}
|
|
@@ -962,6 +963,7 @@ class BVTRecorder {
|
|
|
962
963
|
// Get dataset properties (data-* attributes)
|
|
963
964
|
if (element.dataset) {
|
|
964
965
|
for (const [key, value] of Object.entries(element.dataset)) {
|
|
966
|
+
if (key === "blinqId" || key === "inputId") continue;
|
|
965
967
|
unsortedDataset[key] = value;
|
|
966
968
|
}
|
|
967
969
|
}
|
|
@@ -1188,7 +1190,7 @@ class BVTRecorder {
|
|
|
1188
1190
|
cssLocators.push(origenCss);
|
|
1189
1191
|
}
|
|
1190
1192
|
const noClasses = CssSelectorGenerator.getCssSelector(el, {
|
|
1191
|
-
blacklist: [/^(?!.*h\d).*?\d.*/, /\[style/, /\[data-input-id
|
|
1193
|
+
blacklist: [/^(?!.*h\d).*?\d.*/, /\[style/, /\[data-input-id/],
|
|
1192
1194
|
combineWithinSelector: true,
|
|
1193
1195
|
combineBetweenSelectors: true,
|
|
1194
1196
|
selectors: ["id", "attribute", "tag", "nthchild", "nthoftype"],
|
|
@@ -690,7 +690,7 @@ class BVTRecorder {
|
|
|
690
690
|
inputID: el.dataset.inputId,
|
|
691
691
|
tagName: el.tagName,
|
|
692
692
|
type: el.type,
|
|
693
|
-
text: this.PW.selectorUtils.elementText(new Map(), el).full,
|
|
693
|
+
text: this.PW.selectorUtils.elementText(new Map(), el).full.trim(),
|
|
694
694
|
parent: `tagname: ${el.parentElement?.tagName}\ninnerText: ${el.parentElement?.innerText}`,
|
|
695
695
|
attrs: {
|
|
696
696
|
placeholder: el.getAttribute("placeholder"),
|
|
@@ -803,6 +803,9 @@ class BVTRecorder {
|
|
|
803
803
|
locator.text = text;
|
|
804
804
|
locator.climb = climb;
|
|
805
805
|
});
|
|
806
|
+
result.allStrategyLocators.context = result.locators;
|
|
807
|
+
result.allStrategyLocators.strategy = "context";
|
|
808
|
+
result.allStrategyLocators.no_text = [];
|
|
806
809
|
return result;
|
|
807
810
|
}
|
|
808
811
|
const isRecordingText = this.#mode === "recordingText";
|