spana-test 0.19.0 → 0.19.1

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.
Files changed (78) hide show
  1. package/dist/agent/index.js +11 -11
  2. package/dist/{app-LGNFQMU7.js → app-RWO7IJ3R.js} +3 -3
  3. package/dist/channels/cdp-client.d.ts +8 -0
  4. package/dist/channels/cdp-client.d.ts.map +1 -1
  5. package/dist/channels/dom-channel.d.ts +1 -1
  6. package/dist/channels/dom-channel.d.ts.map +1 -1
  7. package/dist/{chunk-C2YM5GNF.js → chunk-3EBGWXYE.js} +3 -3
  8. package/dist/{chunk-NC32K762.js → chunk-3JAGQ4XW.js} +6 -6
  9. package/dist/{chunk-3ONT32BO.js → chunk-555KISAV.js} +27 -21
  10. package/dist/{chunk-3ONT32BO.js.map → chunk-555KISAV.js.map} +1 -1
  11. package/dist/{chunk-G4ZUJCEN.js → chunk-5Q2ROROC.js} +2 -2
  12. package/dist/{chunk-6X2SK2XO.js → chunk-7TMILDYA.js} +3 -3
  13. package/dist/{chunk-7K24Q7V3.js → chunk-ABRN6BL6.js} +27 -5
  14. package/dist/chunk-ABRN6BL6.js.map +1 -0
  15. package/dist/{chunk-AP5SGSO7.js → chunk-AFWHSQHU.js} +2 -2
  16. package/dist/{chunk-C7HZJIGQ.js → chunk-BIV3DXB5.js} +2 -2
  17. package/dist/{chunk-44U3F2RY.js → chunk-C2TMVKT7.js} +56 -2
  18. package/dist/chunk-C2TMVKT7.js.map +1 -0
  19. package/dist/{chunk-E67QUGT3.js → chunk-EJHZZ2OP.js} +5 -4
  20. package/dist/chunk-EJHZZ2OP.js.map +1 -0
  21. package/dist/{chunk-FZ7EMXIM.js → chunk-ERFUFR5T.js} +7 -5
  22. package/dist/chunk-ERFUFR5T.js.map +1 -0
  23. package/dist/{chunk-IJWAAODK.js → chunk-F4DMBDPA.js} +2 -2
  24. package/dist/{chunk-DNWVDGKS.js → chunk-I7BUJBT2.js} +2 -2
  25. package/dist/{chunk-NR4QAM5W.js → chunk-T3PCI5QZ.js} +10 -10
  26. package/dist/cli.js +8 -8
  27. package/dist/{console-OHKVJLW3.js → console-Z7F7X3WY.js} +40 -39
  28. package/dist/console-Z7F7X3WY.js.map +1 -0
  29. package/dist/{doctor-command-YTT5SMQW.js → doctor-command-O3MSNK7M.js} +6 -6
  30. package/dist/{driver-AN3I4H6O.js → driver-TBRUL2EL.js} +5 -5
  31. package/dist/{driver-X4FWTDNU.js → driver-VKJEQCG3.js} +4 -4
  32. package/dist/drivers/cdp-browser.d.ts.map +1 -1
  33. package/dist/drivers/playwright.d.ts.map +1 -1
  34. package/dist/{electrobun-OUTYOM5G.js → electrobun-5OGIQHTC.js} +5 -5
  35. package/dist/index.js +13 -13
  36. package/dist/{json-QVHG6I3O.js → json-RNYQ54R7.js} +8 -7
  37. package/dist/json-RNYQ54R7.js.map +1 -0
  38. package/dist/{local-UWIYOREU.js → local-7PACQMS4.js} +5 -5
  39. package/dist/{playwright-KBWUBU5S.js → playwright-MPVYCDGO.js} +5 -5
  40. package/dist/report/console.d.ts +2 -0
  41. package/dist/report/console.d.ts.map +1 -1
  42. package/dist/report/json.d.ts +5 -1
  43. package/dist/report/json.d.ts.map +1 -1
  44. package/dist/runtime/web-server.d.ts.map +1 -1
  45. package/dist/{server-BS3O4WVU.js → server-SGLHRRAE.js} +12 -12
  46. package/dist/{server-CWCMC244.js → server-ZCA5M6SW.js} +2 -2
  47. package/dist/{session-YWYRRXXR.js → session-NCG5GVP6.js} +12 -12
  48. package/dist/{studio-command-XJDGLNAJ.js → studio-command-VJ26HQU3.js} +2 -2
  49. package/dist/{test-command-3IRGNEPB.js → test-command-GPQL7SRB.js} +9 -9
  50. package/native/win32-x64/spana_native.dll +0 -0
  51. package/package.json +1 -1
  52. package/dist/chunk-44U3F2RY.js.map +0 -1
  53. package/dist/chunk-7K24Q7V3.js.map +0 -1
  54. package/dist/chunk-E67QUGT3.js.map +0 -1
  55. package/dist/chunk-FZ7EMXIM.js.map +0 -1
  56. package/dist/console-OHKVJLW3.js.map +0 -1
  57. package/dist/json-QVHG6I3O.js.map +0 -1
  58. /package/dist/{app-LGNFQMU7.js.map → app-RWO7IJ3R.js.map} +0 -0
  59. /package/dist/{chunk-C2YM5GNF.js.map → chunk-3EBGWXYE.js.map} +0 -0
  60. /package/dist/{chunk-NC32K762.js.map → chunk-3JAGQ4XW.js.map} +0 -0
  61. /package/dist/{chunk-G4ZUJCEN.js.map → chunk-5Q2ROROC.js.map} +0 -0
  62. /package/dist/{chunk-6X2SK2XO.js.map → chunk-7TMILDYA.js.map} +0 -0
  63. /package/dist/{chunk-AP5SGSO7.js.map → chunk-AFWHSQHU.js.map} +0 -0
  64. /package/dist/{chunk-C7HZJIGQ.js.map → chunk-BIV3DXB5.js.map} +0 -0
  65. /package/dist/{chunk-IJWAAODK.js.map → chunk-F4DMBDPA.js.map} +0 -0
  66. /package/dist/{chunk-DNWVDGKS.js.map → chunk-I7BUJBT2.js.map} +0 -0
  67. /package/dist/{chunk-NR4QAM5W.js.map → chunk-T3PCI5QZ.js.map} +0 -0
  68. /package/dist/{doctor-command-YTT5SMQW.js.map → doctor-command-O3MSNK7M.js.map} +0 -0
  69. /package/dist/{driver-AN3I4H6O.js.map → driver-TBRUL2EL.js.map} +0 -0
  70. /package/dist/{driver-X4FWTDNU.js.map → driver-VKJEQCG3.js.map} +0 -0
  71. /package/dist/{electrobun-OUTYOM5G.js.map → electrobun-5OGIQHTC.js.map} +0 -0
  72. /package/dist/{local-UWIYOREU.js.map → local-7PACQMS4.js.map} +0 -0
  73. /package/dist/{playwright-KBWUBU5S.js.map → playwright-MPVYCDGO.js.map} +0 -0
  74. /package/dist/{server-BS3O4WVU.js.map → server-SGLHRRAE.js.map} +0 -0
  75. /package/dist/{server-CWCMC244.js.map → server-ZCA5M6SW.js.map} +0 -0
  76. /package/dist/{session-YWYRRXXR.js.map → session-NCG5GVP6.js.map} +0 -0
  77. /package/dist/{studio-command-XJDGLNAJ.js.map → studio-command-VJ26HQU3.js.map} +0 -0
  78. /package/dist/{test-command-3IRGNEPB.js.map → test-command-GPQL7SRB.js.map} +0 -0
@@ -16,7 +16,7 @@ import {
16
16
  formatByteSize,
17
17
  isWasmTrapError,
18
18
  parseByteSize
19
- } from "./chunk-7K24Q7V3.js";
19
+ } from "./chunk-ABRN6BL6.js";
20
20
  import {
21
21
  DriverError,
22
22
  Duration_exports,
@@ -5613,4 +5613,4 @@ export {
5613
5613
  parseSetCookieHeader,
5614
5614
  createPromiseApp
5615
5615
  };
5616
- //# sourceMappingURL=chunk-G4ZUJCEN.js.map
5616
+ //# sourceMappingURL=chunk-5Q2ROROC.js.map
@@ -518,11 +518,11 @@ var SpanaMcpServer = class {
518
518
  runFlowFn;
519
519
  constructor(options = {}) {
520
520
  this.connectFn = options.connectFn ?? (async (opts) => {
521
- const { connect } = await import("./session-YWYRRXXR.js");
521
+ const { connect } = await import("./session-NCG5GVP6.js");
522
522
  return connect(opts);
523
523
  });
524
524
  this.runFlowFn = options.runFlowFn ?? (async ({ flowPath, platform }) => {
525
- const { runTestCommand } = await import("./test-command-3IRGNEPB.js");
525
+ const { runTestCommand } = await import("./test-command-GPQL7SRB.js");
526
526
  return runTestCommand({
527
527
  flowPath,
528
528
  platforms: platform ? [platform] : [],
@@ -899,4 +899,4 @@ export {
899
899
  SPANA_MCP_TOOLS,
900
900
  SpanaMcpServer
901
901
  };
902
- //# sourceMappingURL=chunk-6X2SK2XO.js.map
902
+ //# sourceMappingURL=chunk-7TMILDYA.js.map
@@ -570,6 +570,15 @@ var SHARED_DOM_TRAVERSAL_HELPERS = `
570
570
  HGROUP: 1, HR: 1, LI: 1, MAIN: 1, NAV: 1, OL: 1, P: 1, PRE: 1, SECTION: 1,
571
571
  SUMMARY: 1, TABLE: 1, TD: 1, TH: 1, TR: 1, UL: 1,
572
572
  };
573
+ // Name-from-content separates any child that is not laid out as plain inline
574
+ // (Chrome/Playwright parity): flex/grid items are blockified, so sibling
575
+ // <span>s in a flex button still read as separate words.
576
+ function isSpacedNameChild(child, cTag) {
577
+ var cwin = (child.ownerDocument && child.ownerDocument.defaultView) || window;
578
+ var cst = cwin && cwin.getComputedStyle ? cwin.getComputedStyle(child) : null;
579
+ if (cst && cst.display) return cst.display !== "inline";
580
+ return Boolean(BLOCK_TAGS[cTag]);
581
+ }
573
582
  function visibleTextOf(node, allowHiddenRoot, skipControl) {
574
583
  if (!node) return "";
575
584
  if (node.nodeType === 3) return node.nodeValue || "";
@@ -615,7 +624,7 @@ var SHARED_DOM_TRAVERSAL_HELPERS = `
615
624
  var k = visibleTextOf(child, false, skipControl);
616
625
  if (!k) continue;
617
626
  var cTag = child && child.nodeType === 1 && child.tagName ? child.tagName.toUpperCase() : "";
618
- if (cTag && BLOCK_TAGS[cTag]) {
627
+ if (cTag && isSpacedNameChild(child, cTag)) {
619
628
  out.push(" ", k, " ");
620
629
  } else {
621
630
  out.push(k);
@@ -1072,6 +1081,12 @@ var SHARED_DOM_TRAVERSAL_HELPERS = `
1072
1081
  if (!h.el || !h.el.getBoundingClientRect) return false;
1073
1082
  return isVisible(h.el, h.el.getBoundingClientRect());
1074
1083
  }
1084
+ // Only a button-like <input> shows its value as its text; an <option>'s or a field's value is data.
1085
+ function buttonInputValue(el) {
1086
+ if (!el || !el.tagName || el.tagName.toUpperCase() !== "INPUT") return "";
1087
+ var bt = (el.getAttribute("type") || "").toLowerCase();
1088
+ return bt === "button" || bt === "submit" || bt === "reset" ? el.value || "" : "";
1089
+ }
1075
1090
  function applyModifiersAndSlice(hits, sel, preferVisible) {
1076
1091
  if (!sel || typeof sel !== "object" || "point" in sel) return hits;
1077
1092
  var filtered = hits;
@@ -1079,7 +1094,7 @@ var SHARED_DOM_TRAVERSAL_HELPERS = `
1079
1094
  filtered = filtered.filter(function(h) {
1080
1095
  var normTc = normWs(h.el.textContent || "");
1081
1096
  var innerT = normWs(h.el.innerText || "");
1082
- var fallbackTxt = normWs(h.el.value || getAccessibleName(h.el) || "");
1097
+ var fallbackTxt = normWs(buttonInputValue(h.el) || getAccessibleName(h.el) || "");
1083
1098
  return matchSpec(normTc, sel.hasText, false) || matchSpec(innerT, sel.hasText, false) || matchSpec(fallbackTxt, sel.hasText, false);
1084
1099
  });
1085
1100
  }
@@ -1087,7 +1102,7 @@ var SHARED_DOM_TRAVERSAL_HELPERS = `
1087
1102
  filtered = filtered.filter(function(h) {
1088
1103
  var normTc = normWs(h.el.textContent || "");
1089
1104
  var innerT = normWs(h.el.innerText || "");
1090
- var fallbackTxt = normWs(h.el.value || getAccessibleName(h.el) || "");
1105
+ var fallbackTxt = normWs(buttonInputValue(h.el) || getAccessibleName(h.el) || "");
1091
1106
  return !matchSpec(normTc, sel.hasNotText, false) && !matchSpec(innerT, sel.hasNotText, false) && !matchSpec(fallbackTxt, sel.hasNotText, false);
1092
1107
  });
1093
1108
  }
@@ -1630,8 +1645,11 @@ var SHARED_DOM_TRAVERSAL_HELPERS = `
1630
1645
  var bottom = hit.offsetY + (rect.top + rect.height) * sy;
1631
1646
  // Intersect with clipping ancestors (overflow: hidden/clip/scroll/auto) so half-clipped buttons
1632
1647
  // target their visible region rather than clicking a clipped-out center onto the parent container.
1648
+ // Stop at a position: fixed box (incl. a modal <dialog>/popover in the top layer): its own
1649
+ // overflow clips the target, but the ancestors it escapes do not.
1633
1650
  var cur = el.parentElement;
1634
1651
  var guard = 0;
1652
+ if (styleForRect && styleForRect.position === "fixed") cur = null;
1635
1653
  while (cur && guard++ < 32) {
1636
1654
  var cs = winForRect && winForRect.getComputedStyle ? winForRect.getComputedStyle(cur) : null;
1637
1655
  if (cs) {
@@ -1655,6 +1673,7 @@ var SHARED_DOM_TRAVERSAL_HELPERS = `
1655
1673
  }
1656
1674
  }
1657
1675
  }
1676
+ if (cs.position === "fixed") break;
1658
1677
  }
1659
1678
  cur = cur.parentElement;
1660
1679
  }
@@ -1688,7 +1707,10 @@ var SHARED_DOM_TRAVERSAL_HELPERS = `
1688
1707
  if (!topEl || isSameOrDescendant(el, topEl)) return { x: px, y: py };
1689
1708
  return null;
1690
1709
  };
1691
- // 1. Fast path: unclipped rounded center (matches 99.9% of elements in 1 hit-test call)
1710
+ // 1. Fast path: the exact center, as Playwright clicks it (rounding moves the point up to
1711
+ // 0.5px, e.g. across a line boundary in a textarea, which moves the caret), then rounded.
1712
+ var rExact = tryPt(rawCx, rawCy);
1713
+ if (rExact) return rExact;
1692
1714
  var rRaw = tryPt(Math.round(rawCx), Math.round(rawCy));
1693
1715
  if (rRaw) return rRaw;
1694
1716
  // 2. Clipped visible center (rounded, then fractional)
@@ -3758,4 +3780,4 @@ export {
3758
3780
  buildDomFindElementScript,
3759
3781
  buildInjectedCallScript
3760
3782
  };
3761
- //# sourceMappingURL=chunk-7K24Q7V3.js.map
3783
+ //# sourceMappingURL=chunk-ABRN6BL6.js.map