@dev-blinq/cucumber_client 1.0.1255-dev → 1.0.1257-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.
@@ -13729,7 +13729,7 @@ var BVTRecorder = class {
13729
13729
  el.__locators = this.getLocatorsObject(el);
13730
13730
  }
13731
13731
  const role = this.PW.roleUtils.getAriaRole(el);
13732
- const label = this.PW.roleUtils.getElementAccessibleName(el, false) || this.PW.roleUtils.getElementAccessibleName(el, true) || role || "";
13732
+ const label = this.PW.roleUtils.getElementAccessibleName(el, false) || this.PW.roleUtils.getElementAccessibleName(el, true) || "";
13733
13733
  const result = this.getElementProperties(el);
13734
13734
  return {
13735
13735
  role,
@@ -14090,16 +14090,13 @@ var BVTToolBar = class extends HTMLElement {
14090
14090
  dragHandler.innerHTML = `<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
14091
14091
  <path d="M8.625 7.125a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM15.375 7.125a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM8.625 13.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM15.375 13.5a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM8.625 19.875a1.5 1.5 0 100-3 1.5 1.5 0 000 3zM15.375 19.875a1.5 1.5 0 100-3 1.5 1.5 0 000 3z" fill="#080808" style="fill: #080808;"/>
14092
14092
  </svg>`;
14093
- dragHandler.addEventListener(
14094
- "mousedown",
14095
- (event) => {
14096
- event.preventDefault();
14097
- if (dragHandler.hideTooltip) {
14098
- dragHandler.hideTooltip();
14099
- }
14100
- document.body.style.userSelect = "none";
14093
+ dragHandler.addEventListener("mousedown", (event) => {
14094
+ event.preventDefault();
14095
+ if (dragHandler.hideTooltip) {
14096
+ dragHandler.hideTooltip();
14101
14097
  }
14102
- );
14098
+ document.body.style.userSelect = "none";
14099
+ });
14103
14100
  return dragHandler;
14104
14101
  }
14105
14102
  getHoverTool() {
@@ -989,7 +989,7 @@ class BVTRecorder {
989
989
  el.__locators = this.getLocatorsObject(el);
990
990
  }
991
991
  const role = window.getAriaRole(el);
992
- const label = window.getElementAccessibleName(el, false) || window.getElementAccessibleName(el, true) || role || "";
992
+ const label = window.getElementAccessibleName(el, false) || window.getElementAccessibleName(el, true) || "";
993
993
  const result = this.getElementProperties(el);
994
994
  return {
995
995
  role,
@@ -144,7 +144,7 @@ class BVTRecorder {
144
144
  getAction: (e) => {
145
145
  this.eventUtils.consumeEvent(e);
146
146
  },
147
- getInterestedElement: () => { },
147
+ getInterestedElement: () => {},
148
148
  hoverOutlineStyle: "",
149
149
  });
150
150
 
@@ -159,7 +159,7 @@ class BVTRecorder {
159
159
  };
160
160
  },
161
161
  getAction: () => null,
162
- getInterestedElement: () => { },
162
+ getInterestedElement: () => {},
163
163
  hoverOutlineStyle: "",
164
164
  });
165
165
 
@@ -174,7 +174,7 @@ class BVTRecorder {
174
174
  };
175
175
  },
176
176
  getAction: () => null,
177
- getInterestedElement: () => { },
177
+ getInterestedElement: () => {},
178
178
  hoverOutlineStyle: "",
179
179
  });
180
180
 
@@ -678,7 +678,6 @@ class BVTRecorder {
678
678
  const label =
679
679
  this.PW.roleUtils.getElementAccessibleName(el, false) ||
680
680
  this.PW.roleUtils.getElementAccessibleName(el, true) ||
681
- role ||
682
681
  "";
683
682
  const result = this.getElementProperties(el);
684
683
  return {
@@ -999,7 +998,7 @@ class BVTTool extends HTMLElement {
999
998
  const tooltip = this.#tooltip;
1000
999
 
1001
1000
  tooltip.style.opacity = "0"; // hide before measuring
1002
- tooltip.style.left = "0px"; // reset for accurate width calc
1001
+ tooltip.style.left = "0px"; // reset for accurate width calc
1003
1002
  tooltip.style.top = "0px";
1004
1003
  tooltip.style.transform = "none"; // remove old transform
1005
1004
 
@@ -1019,7 +1018,6 @@ class BVTTool extends HTMLElement {
1019
1018
  tooltip.style.top = `${rect.bottom + 20}px`;
1020
1019
  tooltip.style.opacity = "1";
1021
1020
  });
1022
-
1023
1021
  }
1024
1022
  hideTooltip() {
1025
1023
  if (this.#tooltip) {
@@ -1109,8 +1107,7 @@ class BVTToolBar extends HTMLElement {
1109
1107
 
1110
1108
  // document.addEventListener("mousemove", moveHandler);
1111
1109
  // document.addEventListener("mouseup", upHandler);
1112
- }
1113
- );
1110
+ });
1114
1111
  return dragHandler;
1115
1112
  }
1116
1113
  getHoverTool() {
@@ -1118,7 +1115,7 @@ class BVTToolBar extends HTMLElement {
1118
1115
  const hoverTool = document.createElement("x-bvt-tool");
1119
1116
  hoverTool.name = "hover";
1120
1117
  hoverTool.tooltipText = "Record hover over an element";
1121
- hoverTool.innerHTML = `<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M13.999 17.175l-3.452.774a.391.391 0 00-.245.172l-1.664 2.6c-.809 1.265-2.743.924-3.072-.541L3.71 10.963C3.38 9.493 4.99 8.36 6.263 9.167l8.271 4.933c1.27.805.933 2.746-.535 3.075z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="stroke: currentColor; fill: none;" /><rect x="11" y="3" width="12" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><rect x="11" y="7" width="9" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><rect x="11" y="11" width="12" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><circle cx="9" cy="4" r="1" fill="currentColor" style="fill: currentColor;"/><circle cx="9" cy="8" r="1" fill="currentColor" style="fill: currentColor;"/></svg>`
1118
+ hoverTool.innerHTML = `<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M13.999 17.175l-3.452.774a.391.391 0 00-.245.172l-1.664 2.6c-.809 1.265-2.743.924-3.072-.541L3.71 10.963C3.38 9.493 4.99 8.36 6.263 9.167l8.271 4.933c1.27.805.933 2.746-.535 3.075z" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" style="stroke: currentColor; fill: none;" /><rect x="11" y="3" width="12" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><rect x="11" y="7" width="9" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><rect x="11" y="11" width="12" height="2" rx="1" fill="currentColor" style="fill: currentColor;"/><circle cx="9" cy="4" r="1" fill="currentColor" style="fill: currentColor;"/><circle cx="9" cy="8" r="1" fill="currentColor" style="fill: currentColor;"/></svg>`;
1122
1119
  // hoverTool.addEventListener("click", this.onHoverMode);
1123
1120
  return hoverTool;
1124
1121
  }
@@ -1143,4 +1140,4 @@ class BVTToolBar extends HTMLElement {
1143
1140
  }
1144
1141
 
1145
1142
  customElements.define("x-bvt-tool", BVTTool);
1146
- customElements.define("x-bvt-toolbar", BVTToolBar);
1143
+ customElements.define("x-bvt-toolbar", BVTToolBar);
@@ -578,7 +578,7 @@ const _generateCodeFromCommand = (step, elements, userData) => {
578
578
  case 1:
579
579
  comment = `// Click on ${elementIdentifier ? elementIdentifier : step.label} in the context of ${escapeNonPrintables(step.value)}`;
580
580
  codeLines.push(escapeNonPrintables(comment));
581
- input = `"${escapeNonPrintables(step.value)}"`;
581
+ input = `"${escapeNonPrintables(step.value.replaceAll('"', '\\"'))}"`;
582
582
  if (step.dataSource === "userData" || step.dataSource === "parameters") {
583
583
  input = "_" + step.dataKey;
584
584
  }
@@ -588,7 +588,7 @@ const _generateCodeFromCommand = (step, elements, userData) => {
588
588
  case 2:
589
589
  comment = `// Double click on ${elementIdentifier ? elementIdentifier : step.label} in the context of ${escapeNonPrintables(step.value)}`;
590
590
  codeLines.push(escapeNonPrintables(comment));
591
- input = `"${escapeNonPrintables(step.value)}"`;
591
+ input = `"${escapeNonPrintables(step.value.replaceAll('"', '\\"'))}"`;
592
592
  if (step.dataSource === "userData" || step.dataSource === "parameters") {
593
593
  input = "_" + step.dataKey;
594
594
  }
@@ -598,7 +598,7 @@ const _generateCodeFromCommand = (step, elements, userData) => {
598
598
  default:
599
599
  comment = `// Click on ${elementIdentifier ? elementIdentifier : step.label} in the context of ${escapeNonPrintables(step.value)}`;
600
600
  codeLines.push(escapeNonPrintables(comment));
601
- input = `"${escapeNonPrintables(step.value)}"`;
601
+ input = `"${escapeNonPrintables(step.value.replaceAll('"', '\\"'))}"`;
602
602
  if (step.dataSource === "userData" || step.dataSource === "parameters") {
603
603
  input = "_" + step.dataKey;
604
604
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1255-dev",
3
+ "version": "1.0.1257-dev",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",