@validate.qa/runner 1.0.102 → 1.0.103

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.
@@ -2,11 +2,11 @@ import {
2
2
  require_google_signin,
3
3
  require_harness_init_script,
4
4
  require_test_inbox_broker
5
- } from "./chunk-CBVHPYVJ.mjs";
5
+ } from "./chunk-WVLBQDFP.mjs";
6
6
  import {
7
7
  dist_exports,
8
8
  init_dist
9
- } from "./chunk-3JM6XTSZ.mjs";
9
+ } from "./chunk-OTKJZIOD.mjs";
10
10
  import {
11
11
  __commonJS,
12
12
  __require,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  require_route_manifest
3
- } from "./chunk-PWFWMVZU.mjs";
3
+ } from "./chunk-TK5KEGNW.mjs";
4
4
  import {
5
5
  require_survey_network_guard
6
- } from "./chunk-E2RRAE27.mjs";
6
+ } from "./chunk-36AWDKPL.mjs";
7
7
  import {
8
8
  dist_exports,
9
9
  init_dist
10
- } from "./chunk-3JM6XTSZ.mjs";
10
+ } from "./chunk-OTKJZIOD.mjs";
11
11
  import {
12
12
  __commonJS,
13
13
  __toCommonJS
@@ -159,9 +159,10 @@ var require_exploration_parser = __commonJS({
159
159
  return false;
160
160
  return RECORD_TITLE_WITH_COMPANY.test(name);
161
161
  }
162
- var TYPED_VALUE_CALL_RE = /\.(fill|type|pressSequentially|insertText)\(\s*(['"])(?:\\.|(?!\2)[^\\])*\2(\s*,\s*\{[^{}]*\})?\s*\)/g;
162
+ var TYPED_VALUE_CALL_RE = /\.(fill|type|pressSequentially|insertText)\(\s*(['"`])(?:\\.|(?!\2)[^\\])*\2(\s*,\s*\{[^{}]*\})?\s*\)/g;
163
+ var TWO_ARG_TYPED_VALUE_CALL_RE = /\.(fill|type)\(\s*((?:(['"`])(?:\\.|(?!\3)[^\\])*\3|[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*)*))\s*,\s*(['"`])(?:\\.|(?!\4)[^\\])*\4(\s*,\s*\{[^{}]*\})?\s*\)/g;
163
164
  function maskTypedValues(codeLine, mask) {
164
- return codeLine.replace(TYPED_VALUE_CALL_RE, (_all, method, _quote, options) => `.${method}(${mask}${options ?? ""})`);
165
+ return codeLine.replace(TWO_ARG_TYPED_VALUE_CALL_RE, (_all, method, selector, _selQuote, _quote, options) => `.${method}(${selector}, ${mask}${options ?? ""})`).replace(TYPED_VALUE_CALL_RE, (_all, method, _quote, options) => `.${method}(${mask}${options ?? ""})`);
165
166
  }
166
167
  function sanitizePromptCodeLine(codeLine) {
167
168
  let sanitized = codeLine;
@@ -1958,7 +1959,7 @@ var require_repo_feature_verification = __commonJS({
1958
1959
  return null;
1959
1960
  }
1960
1961
  function normalizeControlText(text) {
1961
- return text.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim();
1962
+ return text.normalize("NFKC").toLowerCase().replace(/[^\p{L}\p{N}\p{M}]+/gu, " ").trim();
1962
1963
  }
1963
1964
  var SESSION_END_LABEL = /^(?:log|sign) ?(?:out|off)$/;
1964
1965
  var SESSION_END_SPELLINGS = ["log out", "logout", "log off", "logoff", "sign out", "signout", "sign off", "signoff"];
@@ -7273,7 +7273,7 @@ function namedPagePath(arg) {
7273
7273
  const quoted = /^(['"`])([^'"`]*)\1$/.exec(text);
7274
7274
  const regex = quoted ? null : /^\/((?:\\.|[^/\\])+)\/[a-z]*$/.exec(text);
7275
7275
  if (quoted) {
7276
- path = quoted[2].replace(/^\$\{[^}]*\}/, "").replace(/^\*\*/, "").replace(/^[a-z][a-z\d+.-]*:\/\/[^/]*/i, "").replace(/\*\*$/, "");
7276
+ path = quoted[2].replace(/^\$\{[^}]*\}/, "").replace(/^\*\*/, "").replace(/^[a-z][a-z\d+.-]*:\/\/[^/]*/i, "").replace(/\/\*\*$/, "/");
7277
7277
  } else if (regex) {
7278
7278
  path = regex[1].replace(/^\^/, "").replace(/^\.\*/, "").replace(/\$$/, "").replace(/\\([/.-])/g, "$1");
7279
7279
  } else {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  dist_exports,
3
3
  init_dist
4
- } from "./chunk-3JM6XTSZ.mjs";
4
+ } from "./chunk-OTKJZIOD.mjs";
5
5
  import {
6
6
  __commonJS,
7
7
  __require,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  dist_exports,
3
3
  init_dist
4
- } from "./chunk-3JM6XTSZ.mjs";
4
+ } from "./chunk-OTKJZIOD.mjs";
5
5
  import {
6
6
  __commonJS,
7
7
  __esm,
@@ -67467,6 +67467,19 @@ var require_harness_init_script = __commonJS({
67467
67467
  const finishTransitions = opts.finishTransitions ?? (0, shared_1.parseBoolFlag)(process.env.HARNESS_FINISH_CSS_TRANSITIONS);
67468
67468
  const css = finishTransitions ? "*, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; }" : "*, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; transition-delay: 0s !important; animation-delay: 0s !important; }";
67469
67469
  return withHarnessSourceUrl(`(() => {
67470
+ // An error the browser throws for the page's own value, passed through one of the wrappers below (a bad
67471
+ // adoptedStyleSheets list, animate timing it refuses), is the app's: stock Playwright reports it as a page error.
67472
+ // Thrown from our wrapper, its top frame would be this script, and the console evidence drops such an error as
67473
+ // the runner's own. Our frames come out of its stack, so the app's call is the top frame, as without the harness.
67474
+ // (Under Error.stackTraceLimit the stack then has one or two frames fewer than stock's; the top frame is right.)
67475
+ const own = ${JSON.stringify(exports.HARNESS_INIT_SOURCE_URL)};
67476
+ const appError = (e) => {
67477
+ try {
67478
+ const stack = e !== null && typeof e === 'object' ? e.stack : undefined;
67479
+ if (typeof stack === 'string' && stack.includes(own)) e.stack = stack.split('\\n').filter((line) => !line.includes(own)).join('\\n');
67480
+ } catch (x) {}
67481
+ return e;
67482
+ };
67470
67483
  // Layer 1: CSS transitions and animations - instant, not removed
67471
67484
  // (duration 0s preserves final state; 'none' would prevent keyframes from completing)
67472
67485
  // The rule goes in a constructed stylesheet on document.adoptedStyleSheets, which adds no node to the DOM:
@@ -67480,6 +67493,31 @@ var require_harness_init_script = __commonJS({
67480
67493
  sheet.replaceSync(${JSON.stringify(css)});
67481
67494
  document.adoptedStyleSheets = [...document.adoptedStyleSheets, sheet];
67482
67495
  adopted = true;
67496
+ // A page that assigns the list without spreading it (document.adoptedStyleSheets = [mine]) would drop the
67497
+ // harness sheet and bring animations back: keep it, last, on every assignment. A bad value (not iterable,
67498
+ // or a list the browser refuses) goes to the browser, which throws its own error as the app's (appError).
67499
+ try {
67500
+ const desc = Object.getOwnPropertyDescriptor(Document.prototype, 'adoptedStyleSheets');
67501
+ if (desc && desc.get && desc.set) {
67502
+ Object.defineProperty(document, 'adoptedStyleSheets', {
67503
+ configurable: true,
67504
+ enumerable: desc.enumerable,
67505
+ get() { return desc.get.call(document); },
67506
+ set(value) {
67507
+ try {
67508
+ if (value === null || (typeof value !== 'object' && typeof value !== 'function') || typeof value[Symbol.iterator] !== 'function') {
67509
+ desc.set.call(document, value);
67510
+ return;
67511
+ }
67512
+ const list = [...value];
67513
+ desc.set.call(document, list.includes(sheet) ? list : [...list, sheet]);
67514
+ } catch (e) {
67515
+ throw appError(e);
67516
+ }
67517
+ },
67518
+ });
67519
+ }
67520
+ } catch (e) {}
67483
67521
  }
67484
67522
  } catch (e) {}
67485
67523
  if (!adopted) try {
@@ -67556,16 +67594,51 @@ ${finishTransitions ? `
67556
67594
  ` : ""}
67557
67595
  // Layer 2: Web Animations API - make instant instead of no-op
67558
67596
  // (preserves animation completion callbacks that app code may depend on)
67597
+ // Timing the browser refuses (a negative, NaN or non-'auto' duration, a delay that is not finite) goes to the
67598
+ // browser as the page wrote it: zeroed, it raised no TypeError, so a page error stock Playwright reports was hidden.
67599
+ // Options that are not a plain object (an array, a class instance) keep what they inherit: the browser reads
67600
+ // every timing member through the prototype chain, and an array's inherited fill() is a TypeError. A copy kept
67601
+ // only own properties, so the error was hidden; a proxy overrides only duration and delay.
67559
67602
  try {
67560
67603
  const origAnimate = Element.prototype.animate;
67604
+ const refused = (options) => {
67605
+ try {
67606
+ if (options === undefined || options === null) return false;
67607
+ if (typeof options !== 'object' && typeof options !== 'function') return !(Number(options) >= 0);
67608
+ const duration = options.duration;
67609
+ if (duration !== undefined && duration !== 'auto' && !(typeof duration === 'number' && duration >= 0)) return true;
67610
+ const delay = options.delay;
67611
+ return delay !== undefined && !Number.isFinite(Number(delay));
67612
+ } catch (e) {
67613
+ return true;
67614
+ }
67615
+ };
67616
+ const instant = (options) => {
67617
+ try {
67618
+ // Plain: its prototype is null or an Object.prototype (of any frame's realm), so it inherits no timing.
67619
+ const proto = Object.getPrototypeOf(options);
67620
+ if (proto !== null && Object.getPrototypeOf(proto) !== null && typeof Proxy === 'function') {
67621
+ // The proxy's target is an empty object, not the options: a target with a read-only, non-configurable
67622
+ // duration or delay (a frozen instance, Object.create with a descriptor) would make returning 0 a proxy
67623
+ // invariant TypeError. Every other member is read from the options, the options as the receiver.
67624
+ return new Proxy({}, { get: (_target, key) => (key === 'duration' || key === 'delay' ? 0 : Reflect.get(options, key)) });
67625
+ }
67626
+ } catch (e) {}
67627
+ return Object.assign({}, options, { duration: 0, delay: 0 });
67628
+ };
67561
67629
  if (typeof origAnimate === 'function') {
67562
67630
  Element.prototype.animate = function (keyframes, options) {
67563
- if (typeof options === 'object' && options !== null) {
67564
- options = Object.assign({}, options, { duration: 0, delay: 0 });
67565
- } else {
67566
- options = 0; // covers number, undefined, and any other type
67631
+ try {
67632
+ if (refused(options)) return origAnimate.call(this, keyframes, options);
67633
+ if (typeof options === 'object' && options !== null) {
67634
+ options = instant(options);
67635
+ } else {
67636
+ options = 0; // covers number, undefined, and any other type
67637
+ }
67638
+ return origAnimate.call(this, keyframes, options);
67639
+ } catch (e) {
67640
+ throw appError(e);
67567
67641
  }
67568
- return origAnimate.call(this, keyframes, options);
67569
67642
  };
67570
67643
  }
67571
67644
  } catch (e) {}
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  require_run_write_guard
3
- } from "./chunk-4WLP3RWN.mjs";
3
+ } from "./chunk-BECCGMU4.mjs";
4
4
  import {
5
5
  require_survey_network_guard
6
- } from "./chunk-E2RRAE27.mjs";
6
+ } from "./chunk-36AWDKPL.mjs";
7
7
  import {
8
8
  __commonJS,
9
9
  __require
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  require_test_inbox_broker,
3
3
  require_verification_inbox
4
- } from "./chunk-CBVHPYVJ.mjs";
4
+ } from "./chunk-WVLBQDFP.mjs";
5
5
  import {
6
6
  __commonJS,
7
7
  __require