@riddledc/riddle-proof 0.7.105 → 0.7.106
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.
- package/README.md +2 -0
- package/dist/{chunk-VO5U4I7F.js → chunk-7JB3XKEE.js} +13 -3
- package/dist/cli.cjs +13 -3
- package/dist/cli.js +1 -1
- package/dist/index.cjs +13 -3
- package/dist/index.js +1 -1
- package/dist/profile.cjs +13 -3
- package/dist/profile.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -309,6 +309,8 @@ proof state must expose a terminal flag. `assert_selector_count` accepts
|
|
|
309
309
|
`expected_count`; `assert_text_visible` and `assert_text_absent` prefer rendered
|
|
310
310
|
selector text (`innerText`) so casing from CSS `text-transform` matches
|
|
311
311
|
`selector_text_visible`, with a `textContent` fallback for non-HTML elements.
|
|
312
|
+
Literal setup text matching also checks a whitespace-normalized form, so visible
|
|
313
|
+
phrases split across rendered line breaks can still satisfy the assertion.
|
|
312
314
|
`assert_window_value` accepts `path` / `state_path` plus
|
|
313
315
|
`expected_value` / `expected` and compares JSON-safe values exactly.
|
|
314
316
|
`assert_window_number` accepts `path` / `state_path` plus `expected_value`,
|
|
@@ -3583,11 +3583,21 @@ function setupFiniteNumber(value) {
|
|
|
3583
3583
|
const number = Number(value);
|
|
3584
3584
|
return Number.isFinite(number) ? number : undefined;
|
|
3585
3585
|
}
|
|
3586
|
+
function normalizeSetupMatchText(value) {
|
|
3587
|
+
return String(value || "").replace(/\s+/g, " ").trim();
|
|
3588
|
+
}
|
|
3586
3589
|
function setupTextMatches(sample, action) {
|
|
3590
|
+
const rawSample = String(sample || "");
|
|
3587
3591
|
if (action.pattern) {
|
|
3588
|
-
try {
|
|
3589
|
-
|
|
3590
|
-
|
|
3592
|
+
try {
|
|
3593
|
+
const rawPattern = new RegExp(action.pattern, action.flags || "");
|
|
3594
|
+
if (rawPattern.test(rawSample)) return true;
|
|
3595
|
+
return new RegExp(action.pattern, action.flags || "").test(normalizeSetupMatchText(rawSample));
|
|
3596
|
+
} catch { return false; }
|
|
3597
|
+
}
|
|
3598
|
+
const expected = String(action.text || "");
|
|
3599
|
+
return rawSample.includes(expected)
|
|
3600
|
+
|| normalizeSetupMatchText(rawSample).includes(normalizeSetupMatchText(expected));
|
|
3591
3601
|
}
|
|
3592
3602
|
async function waitForAnyVisibleSelector(context, selector, timeout) {
|
|
3593
3603
|
const deadline = Date.now() + setupNumber(timeout, 15000);
|
package/dist/cli.cjs
CHANGED
|
@@ -10460,11 +10460,21 @@ function setupFiniteNumber(value) {
|
|
|
10460
10460
|
const number = Number(value);
|
|
10461
10461
|
return Number.isFinite(number) ? number : undefined;
|
|
10462
10462
|
}
|
|
10463
|
+
function normalizeSetupMatchText(value) {
|
|
10464
|
+
return String(value || "").replace(/\s+/g, " ").trim();
|
|
10465
|
+
}
|
|
10463
10466
|
function setupTextMatches(sample, action) {
|
|
10467
|
+
const rawSample = String(sample || "");
|
|
10464
10468
|
if (action.pattern) {
|
|
10465
|
-
try {
|
|
10466
|
-
|
|
10467
|
-
|
|
10469
|
+
try {
|
|
10470
|
+
const rawPattern = new RegExp(action.pattern, action.flags || "");
|
|
10471
|
+
if (rawPattern.test(rawSample)) return true;
|
|
10472
|
+
return new RegExp(action.pattern, action.flags || "").test(normalizeSetupMatchText(rawSample));
|
|
10473
|
+
} catch { return false; }
|
|
10474
|
+
}
|
|
10475
|
+
const expected = String(action.text || "");
|
|
10476
|
+
return rawSample.includes(expected)
|
|
10477
|
+
|| normalizeSetupMatchText(rawSample).includes(normalizeSetupMatchText(expected));
|
|
10468
10478
|
}
|
|
10469
10479
|
async function waitForAnyVisibleSelector(context, selector, timeout) {
|
|
10470
10480
|
const deadline = Date.now() + setupNumber(timeout, 15000);
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -12312,11 +12312,21 @@ function setupFiniteNumber(value) {
|
|
|
12312
12312
|
const number = Number(value);
|
|
12313
12313
|
return Number.isFinite(number) ? number : undefined;
|
|
12314
12314
|
}
|
|
12315
|
+
function normalizeSetupMatchText(value) {
|
|
12316
|
+
return String(value || "").replace(/\s+/g, " ").trim();
|
|
12317
|
+
}
|
|
12315
12318
|
function setupTextMatches(sample, action) {
|
|
12319
|
+
const rawSample = String(sample || "");
|
|
12316
12320
|
if (action.pattern) {
|
|
12317
|
-
try {
|
|
12318
|
-
|
|
12319
|
-
|
|
12321
|
+
try {
|
|
12322
|
+
const rawPattern = new RegExp(action.pattern, action.flags || "");
|
|
12323
|
+
if (rawPattern.test(rawSample)) return true;
|
|
12324
|
+
return new RegExp(action.pattern, action.flags || "").test(normalizeSetupMatchText(rawSample));
|
|
12325
|
+
} catch { return false; }
|
|
12326
|
+
}
|
|
12327
|
+
const expected = String(action.text || "");
|
|
12328
|
+
return rawSample.includes(expected)
|
|
12329
|
+
|| normalizeSetupMatchText(rawSample).includes(normalizeSetupMatchText(expected));
|
|
12320
12330
|
}
|
|
12321
12331
|
async function waitForAnyVisibleSelector(context, selector, timeout) {
|
|
12322
12332
|
const deadline = Date.now() + setupNumber(timeout, 15000);
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
resolveRiddleProofProfileTimeoutSec,
|
|
59
59
|
slugifyRiddleProofProfileName,
|
|
60
60
|
summarizeRiddleProofProfileResult
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-7JB3XKEE.js";
|
|
62
62
|
import {
|
|
63
63
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
64
64
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -3626,11 +3626,21 @@ function setupFiniteNumber(value) {
|
|
|
3626
3626
|
const number = Number(value);
|
|
3627
3627
|
return Number.isFinite(number) ? number : undefined;
|
|
3628
3628
|
}
|
|
3629
|
+
function normalizeSetupMatchText(value) {
|
|
3630
|
+
return String(value || "").replace(/\s+/g, " ").trim();
|
|
3631
|
+
}
|
|
3629
3632
|
function setupTextMatches(sample, action) {
|
|
3633
|
+
const rawSample = String(sample || "");
|
|
3630
3634
|
if (action.pattern) {
|
|
3631
|
-
try {
|
|
3632
|
-
|
|
3633
|
-
|
|
3635
|
+
try {
|
|
3636
|
+
const rawPattern = new RegExp(action.pattern, action.flags || "");
|
|
3637
|
+
if (rawPattern.test(rawSample)) return true;
|
|
3638
|
+
return new RegExp(action.pattern, action.flags || "").test(normalizeSetupMatchText(rawSample));
|
|
3639
|
+
} catch { return false; }
|
|
3640
|
+
}
|
|
3641
|
+
const expected = String(action.text || "");
|
|
3642
|
+
return rawSample.includes(expected)
|
|
3643
|
+
|| normalizeSetupMatchText(rawSample).includes(normalizeSetupMatchText(expected));
|
|
3634
3644
|
}
|
|
3635
3645
|
async function waitForAnyVisibleSelector(context, selector, timeout) {
|
|
3636
3646
|
const deadline = Date.now() + setupNumber(timeout, 15000);
|
package/dist/profile.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
resolveRiddleProofProfileTimeoutSec,
|
|
20
20
|
slugifyRiddleProofProfileName,
|
|
21
21
|
summarizeRiddleProofProfileResult
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-7JB3XKEE.js";
|
|
23
23
|
export {
|
|
24
24
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
25
25
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|