ff-dom 1.0.14 → 1.0.15

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.
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getElementsFromHTML = void 0;
4
+ //@ts-nocheck
4
5
  const jsdom_1 = require("jsdom");
5
6
  const isUnique = (xpathResult) => {
6
7
  return xpathResult && xpathResult.snapshotLength === 1;
@@ -477,6 +478,14 @@ const getElementsFromHTML = (name, desc, type, locators, isShared, projectId, pr
477
478
  }
478
479
  }
479
480
  let uniqueLocators = new Map();
481
+ finalLocators.forEach((loc) => {
482
+ if (loc.isRecorded === 'Y') {
483
+ finalLocators = finalLocators.map((obj) => ({
484
+ ...obj,
485
+ value: String(obj.value).replace(/"/g, "'"),
486
+ }));
487
+ }
488
+ });
480
489
  finalLocators.forEach((loc) => {
481
490
  if (loc.isRecorded === "N") {
482
491
  uniqueLocators.set(loc.value, loc);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ff-dom",
3
- "version": "1.0.14",
3
+ "version": "1.0.15",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,3 +1,4 @@
1
+ //@ts-nocheck
1
2
  import { JSDOM, VirtualConsole } from "jsdom";
2
3
 
3
4
  type ElementDetails = {
@@ -623,6 +624,14 @@ const getElementsFromHTML = (
623
624
  }
624
625
 
625
626
  let uniqueLocators = new Map();
627
+ finalLocators.forEach((loc) => {
628
+ if (loc.isRecorded === 'Y') {
629
+ finalLocators = finalLocators.map((obj) => ({
630
+ ...obj,
631
+ value: String(obj.value).replace(/"/g, "'"),
632
+ }));
633
+ }
634
+ });
626
635
  finalLocators.forEach((loc) => {
627
636
  if (loc.isRecorded === "N") {
628
637
  uniqueLocators.set(loc.value, loc);