@dev-blinq/cucumber_client 1.0.1179-dev → 1.0.1181-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.
@@ -304,13 +304,16 @@ function findMatchingElements(inputSnapshot, objectSet) {
304
304
 
305
305
  // For each subtree, check for matches in the object set
306
306
  subtrees.forEach((subtree) => {
307
- const subtreeText = subtree.join("\n");
307
+ const subtreeText = subtree.map((t) => t.trim()).join("\n");
308
308
 
309
309
  // Look for matching snapshots in the object set
310
310
  for (const obj of objectSet) {
311
311
  // Normalize snapshots for comparison (trim whitespace, etc.)
312
312
  const normalizedSubtree = subtreeText.trim();
313
- const normalizedSnapshot = obj.snapshot.trim();
313
+ const normalizedSnapshot = obj.snapshot
314
+ .split("\n")
315
+ .map((s) => s.trim())
316
+ .join("\n");
314
317
 
315
318
  // Check if the current object's snapshot matches our subtree
316
319
  if (normalizedSnapshot === normalizedSubtree) {
@@ -1,11 +1,9 @@
1
1
  import { Types } from "../recording.js";
2
-
3
2
  import logger from "../../logger.js";
4
3
  import { StepsDefinitions } from "../cucumber/steps_definitions.js";
5
4
  import path from "path";
6
5
  import { CodePage } from "./page_reflection.js";
7
6
  import { convertToIdentifier, escapeNonPrintables } from "./utils.js";
8
- import { all } from "axios";
9
7
  const findElementIdentifier = (node, step, userData, elements) => {
10
8
  if (node.key) {
11
9
  // incase of rerunning implemented steps
@@ -96,7 +96,7 @@ export function getCommandContent(command) {
96
96
  return `send a ${command.value.method} API request to ${command.value.url}`;
97
97
  }
98
98
  case "verify_page_snapshot": {
99
- return `verify page snapshot stored in ${command.value}`;
99
+ return `verify page snapshot stored in ${command.parameters[0]}`;
100
100
  }
101
101
  default: {
102
102
  return "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dev-blinq/cucumber_client",
3
- "version": "1.0.1179-dev",
3
+ "version": "1.0.1181-dev",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@cucumber/tag-expressions": "^6.1.1",
29
29
  "@dev-blinq/cucumber-js": "1.0.171-dev",
30
30
  "@faker-js/faker": "^8.1.0",
31
- "automation_model": "1.0.715-dev",
31
+ "automation_model": "1.0.716-dev",
32
32
  "axios": "^1.7.4",
33
33
  "chokidar": "^3.6.0",
34
34
  "create-require": "^1.1.1",