@riddledc/riddle-proof 0.7.63 → 0.7.64
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 +9 -5
- package/dist/{chunk-MLJHMZLR.js → chunk-ZVKKBM2J.js} +44 -3
- package/dist/cli.cjs +44 -3
- package/dist/cli.js +1 -1
- package/dist/index.cjs +44 -3
- package/dist/index.js +1 -1
- package/dist/profile.cjs +44 -3
- package/dist/profile.d.cts +2 -1
- package/dist/profile.d.ts +2 -1
- package/dist/profile.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -242,10 +242,10 @@ appears only after a picker, tab, login stub, storage seed, form fill,
|
|
|
242
242
|
transport control, or other bounded interaction. Supported setup actions are
|
|
243
243
|
`click`, `drag`, `press`, `fill`, `set_input_value`, `assert_text_visible`,
|
|
244
244
|
`assert_text_absent`, `assert_selector_count`, `assert_window_value`,
|
|
245
|
-
`assert_window_number`, `local_storage`, `session_storage`, `clear_storage`,
|
|
246
|
-
`wait_for_selector`, `wait_for_text`, and `window_call`;
|
|
247
|
-
is recorded as a failed `setup_actions_succeeded` check so
|
|
248
|
-
pass without reaching the intended state. Text-matched `click` actions prefer
|
|
245
|
+
`assert_window_number`, `local_storage`, `session_storage`, `clear_storage`,
|
|
246
|
+
`screenshot`, `wait`, `wait_for_selector`, `wait_for_text`, and `window_call`;
|
|
247
|
+
a failed setup action is recorded as a failed `setup_actions_succeeded` check so
|
|
248
|
+
the profile cannot pass without reaching the intended state. Text-matched `click` actions prefer
|
|
249
249
|
visible matching elements, which keeps responsive layouts from selecting hidden
|
|
250
250
|
desktop or mobile-only links. Add `force: true` to a click action only when the
|
|
251
251
|
matched visible element is intentionally animated or otherwise never becomes
|
|
@@ -276,6 +276,10 @@ can include `repeat` / `repeat_count` / `times` from 1 to 100; each repetition
|
|
|
276
276
|
is recorded with `repeat_index` and `repeat_count`, and `after_ms` runs after
|
|
277
277
|
each repetition. Use it for bounded game proof helpers, retry controls, or other
|
|
278
278
|
workflows where one declarative action needs to advance the app several times.
|
|
279
|
+
Use `screenshot` with an optional `label` to capture durable Riddle screenshots
|
|
280
|
+
at important setup milestones, such as after a route switch, terminal state, or
|
|
281
|
+
reset. These labels are recorded in setup evidence and included in profile
|
|
282
|
+
artifact summaries alongside final viewport screenshots.
|
|
279
283
|
Add `frame_selector` / `frameSelector` to a setup action when the interaction
|
|
280
284
|
target lives inside an embedded iframe, such as a community game player or
|
|
281
285
|
hosted preview surface. Selector-based actions, storage actions, window calls,
|
|
@@ -287,7 +291,7 @@ it defaults to the first frame.
|
|
|
287
291
|
Profiles with setup actions also include a compact
|
|
288
292
|
`setup_actions_succeeded.evidence.setup_summary`. The summary groups each
|
|
289
293
|
viewport's final route, final URL, action counts, clicked targets, iframe URLs,
|
|
290
|
-
compact text samples, and failures so setup-heavy clickthrough or iframe proofs
|
|
294
|
+
setup screenshots, compact text samples, and failures so setup-heavy clickthrough or iframe proofs
|
|
291
295
|
can be reviewed without reading every raw setup-action result. Long click
|
|
292
296
|
sequences include `clicked_total` and `clicked_truncated`; the compact `clicked`
|
|
293
297
|
list keeps the first and last clicked targets so later route switches and reset
|
|
@@ -46,6 +46,7 @@ var RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES = [
|
|
|
46
46
|
"local_storage",
|
|
47
47
|
"session_storage",
|
|
48
48
|
"clear_storage",
|
|
49
|
+
"screenshot",
|
|
49
50
|
"wait",
|
|
50
51
|
"wait_for_selector",
|
|
51
52
|
"wait_for_text",
|
|
@@ -206,12 +207,23 @@ function profileSetupActionCounts(results) {
|
|
|
206
207
|
}
|
|
207
208
|
return toJsonValue(counts);
|
|
208
209
|
}
|
|
210
|
+
function profileSetupScreenshotLabels(results) {
|
|
211
|
+
return results.filter((result) => profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string").map((result) => result.screenshot_label).filter(Boolean);
|
|
212
|
+
}
|
|
209
213
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
210
214
|
if (items.length <= limit) return items;
|
|
211
215
|
const firstCount = Math.floor(limit / 2);
|
|
212
216
|
const lastCount = limit - firstCount;
|
|
213
217
|
return [...items.slice(0, firstCount), ...items.slice(-lastCount)];
|
|
214
218
|
}
|
|
219
|
+
function profileScreenshotLabels(viewports) {
|
|
220
|
+
const labels = [];
|
|
221
|
+
for (const viewport of viewports || []) {
|
|
222
|
+
if (viewport.screenshot_label) labels.push(viewport.screenshot_label);
|
|
223
|
+
labels.push(...profileSetupScreenshotLabels(viewport.setup_action_results || []));
|
|
224
|
+
}
|
|
225
|
+
return labels;
|
|
226
|
+
}
|
|
215
227
|
function profileSetupSummary(viewports, actionCount) {
|
|
216
228
|
return toJsonValue({
|
|
217
229
|
viewport_count: viewports.length,
|
|
@@ -241,6 +253,7 @@ function profileSetupSummary(viewports, actionCount) {
|
|
|
241
253
|
action_counts: profileSetupActionCounts(results),
|
|
242
254
|
frame_action_count: results.filter((result) => result.frame_selector).length,
|
|
243
255
|
frame_urls: profileSetupFrameUrls(viewport),
|
|
256
|
+
setup_screenshots: profileSetupScreenshotLabels(results),
|
|
244
257
|
clicked_total: clickedItems.length,
|
|
245
258
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
246
259
|
clicked,
|
|
@@ -286,7 +299,7 @@ function isSupportedCheckType(value) {
|
|
|
286
299
|
}
|
|
287
300
|
function normalizeSetupActionType(value, index) {
|
|
288
301
|
const normalizedInput = String(value || "").trim().replace(/-/g, "_");
|
|
289
|
-
const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput;
|
|
302
|
+
const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput === "capture_screenshot" || normalizedInput === "save_screenshot" || normalizedInput === "setup_screenshot" ? "screenshot" : normalizedInput;
|
|
290
303
|
if (RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES.includes(normalized)) {
|
|
291
304
|
return normalized;
|
|
292
305
|
}
|
|
@@ -417,6 +430,7 @@ function normalizeSetupAction(input, index) {
|
|
|
417
430
|
key,
|
|
418
431
|
value,
|
|
419
432
|
value_json: hasJsonValue ? toJsonValue(input.value_json ?? input.valueJson ?? input.json) : void 0,
|
|
433
|
+
label: stringFromOwn(input, "label", "name", "screenshot_label", "screenshotLabel"),
|
|
420
434
|
path,
|
|
421
435
|
args,
|
|
422
436
|
expect_return: hasExpectedReturn ? toJsonValue(valueFromOwn(input, "expect_return", "expectReturn", "expected_return", "expectedReturn")) : void 0,
|
|
@@ -1459,7 +1473,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
|
|
|
1459
1473
|
].filter((check) => Boolean(check)) : [];
|
|
1460
1474
|
const status = profileStatusFromEvidence(profile, evidence, checks);
|
|
1461
1475
|
const firstViewport = evidence?.viewports?.[0];
|
|
1462
|
-
const screenshots = (evidence?.viewports
|
|
1476
|
+
const screenshots = profileScreenshotLabels(evidence?.viewports);
|
|
1463
1477
|
return {
|
|
1464
1478
|
version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
|
|
1465
1479
|
profile_name: profile.name,
|
|
@@ -1808,12 +1822,26 @@ function profileSetupActionCounts(results) {
|
|
|
1808
1822
|
}
|
|
1809
1823
|
return counts;
|
|
1810
1824
|
}
|
|
1825
|
+
function profileSetupScreenshotLabels(results) {
|
|
1826
|
+
return (results || [])
|
|
1827
|
+
.filter((result) => result && profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string")
|
|
1828
|
+
.map((result) => result.screenshot_label)
|
|
1829
|
+
.filter(Boolean);
|
|
1830
|
+
}
|
|
1811
1831
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
1812
1832
|
if ((items || []).length <= limit) return items || [];
|
|
1813
1833
|
const firstCount = Math.floor(limit / 2);
|
|
1814
1834
|
const lastCount = limit - firstCount;
|
|
1815
1835
|
return [...items.slice(0, firstCount), ...items.slice(-lastCount)];
|
|
1816
1836
|
}
|
|
1837
|
+
function profileScreenshotLabels(viewports) {
|
|
1838
|
+
const labels = [];
|
|
1839
|
+
for (const viewport of viewports || []) {
|
|
1840
|
+
if (viewport && viewport.screenshot_label) labels.push(viewport.screenshot_label);
|
|
1841
|
+
labels.push(...profileSetupScreenshotLabels(viewport && viewport.setup_action_results || []));
|
|
1842
|
+
}
|
|
1843
|
+
return labels;
|
|
1844
|
+
}
|
|
1817
1845
|
function profileSetupSummary(viewports, actionCount) {
|
|
1818
1846
|
return {
|
|
1819
1847
|
viewport_count: (viewports || []).length,
|
|
@@ -1853,6 +1881,7 @@ function profileSetupSummary(viewports, actionCount) {
|
|
|
1853
1881
|
action_counts: profileSetupActionCounts(results),
|
|
1854
1882
|
frame_action_count: results.filter((result) => result && result.frame_selector).length,
|
|
1855
1883
|
frame_urls: profileSetupFrameUrls(viewport),
|
|
1884
|
+
setup_screenshots: profileSetupScreenshotLabels(results),
|
|
1856
1885
|
clicked_total: clickedItems.length,
|
|
1857
1886
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
1858
1887
|
clicked,
|
|
@@ -2342,7 +2371,7 @@ function assessProfile(profile, evidence) {
|
|
|
2342
2371
|
else if (expectedViewportCount && viewports.length < expectedViewportCount) status = "proof_insufficient";
|
|
2343
2372
|
else if (checks.some((check) => check.status === "needs_human_review")) status = "needs_human_review";
|
|
2344
2373
|
else if (checks.some((check) => check.status === "failed")) status = "product_regression";
|
|
2345
|
-
const screenshotLabels = viewports
|
|
2374
|
+
const screenshotLabels = profileScreenshotLabels(viewports);
|
|
2346
2375
|
const route = viewports[0] && viewports[0].route ? viewports[0].route : { requested: evidence.target_url, observed: "", matched: false, error: "missing viewport evidence" };
|
|
2347
2376
|
const passedChecks = checks.filter((check) => check.status === "passed").length;
|
|
2348
2377
|
const failedChecks = checks.filter((check) => check.status === "failed").length;
|
|
@@ -2709,6 +2738,18 @@ async function executeSetupAction(action, ordinal) {
|
|
|
2709
2738
|
await page.waitForTimeout(ms);
|
|
2710
2739
|
return { ...base, ok: true, ms };
|
|
2711
2740
|
}
|
|
2741
|
+
if (type === "screenshot") {
|
|
2742
|
+
const rawLabel = String(action.label || action.name || action.screenshot_label || action.screenshotLabel || ("setup-" + ordinal));
|
|
2743
|
+
const labelPart = rawLabel
|
|
2744
|
+
.toLowerCase()
|
|
2745
|
+
.replace(/[^a-z0-9_-]+/g, "-")
|
|
2746
|
+
.replace(/^-+|-+$/g, "")
|
|
2747
|
+
.slice(0, 80) || ("setup-" + ordinal);
|
|
2748
|
+
const label = profileSlug + "-" + viewport.name + "-" + labelPart;
|
|
2749
|
+
if (typeof saveScreenshot !== "function") return { ...base, reason: "save_screenshot_unavailable", label: rawLabel };
|
|
2750
|
+
await saveScreenshot(label);
|
|
2751
|
+
return { ...base, ok: true, label: rawLabel, screenshot_label: label };
|
|
2752
|
+
}
|
|
2712
2753
|
if (type === "wait_for_selector") {
|
|
2713
2754
|
const scope = await setupActionScope(action, timeout);
|
|
2714
2755
|
if (!scope.ok) return setupScopeFailure(base, scope);
|
package/dist/cli.cjs
CHANGED
|
@@ -6919,6 +6919,7 @@ var RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES = [
|
|
|
6919
6919
|
"local_storage",
|
|
6920
6920
|
"session_storage",
|
|
6921
6921
|
"clear_storage",
|
|
6922
|
+
"screenshot",
|
|
6922
6923
|
"wait",
|
|
6923
6924
|
"wait_for_selector",
|
|
6924
6925
|
"wait_for_text",
|
|
@@ -7079,12 +7080,23 @@ function profileSetupActionCounts(results) {
|
|
|
7079
7080
|
}
|
|
7080
7081
|
return toJsonValue(counts);
|
|
7081
7082
|
}
|
|
7083
|
+
function profileSetupScreenshotLabels(results) {
|
|
7084
|
+
return results.filter((result) => profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string").map((result) => result.screenshot_label).filter(Boolean);
|
|
7085
|
+
}
|
|
7082
7086
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
7083
7087
|
if (items.length <= limit) return items;
|
|
7084
7088
|
const firstCount = Math.floor(limit / 2);
|
|
7085
7089
|
const lastCount = limit - firstCount;
|
|
7086
7090
|
return [...items.slice(0, firstCount), ...items.slice(-lastCount)];
|
|
7087
7091
|
}
|
|
7092
|
+
function profileScreenshotLabels(viewports) {
|
|
7093
|
+
const labels = [];
|
|
7094
|
+
for (const viewport of viewports || []) {
|
|
7095
|
+
if (viewport.screenshot_label) labels.push(viewport.screenshot_label);
|
|
7096
|
+
labels.push(...profileSetupScreenshotLabels(viewport.setup_action_results || []));
|
|
7097
|
+
}
|
|
7098
|
+
return labels;
|
|
7099
|
+
}
|
|
7088
7100
|
function profileSetupSummary(viewports, actionCount) {
|
|
7089
7101
|
return toJsonValue({
|
|
7090
7102
|
viewport_count: viewports.length,
|
|
@@ -7114,6 +7126,7 @@ function profileSetupSummary(viewports, actionCount) {
|
|
|
7114
7126
|
action_counts: profileSetupActionCounts(results),
|
|
7115
7127
|
frame_action_count: results.filter((result) => result.frame_selector).length,
|
|
7116
7128
|
frame_urls: profileSetupFrameUrls(viewport),
|
|
7129
|
+
setup_screenshots: profileSetupScreenshotLabels(results),
|
|
7117
7130
|
clicked_total: clickedItems.length,
|
|
7118
7131
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
7119
7132
|
clicked,
|
|
@@ -7159,7 +7172,7 @@ function isSupportedCheckType(value) {
|
|
|
7159
7172
|
}
|
|
7160
7173
|
function normalizeSetupActionType(value, index) {
|
|
7161
7174
|
const normalizedInput = String(value || "").trim().replace(/-/g, "_");
|
|
7162
|
-
const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput;
|
|
7175
|
+
const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput === "capture_screenshot" || normalizedInput === "save_screenshot" || normalizedInput === "setup_screenshot" ? "screenshot" : normalizedInput;
|
|
7163
7176
|
if (RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES.includes(normalized)) {
|
|
7164
7177
|
return normalized;
|
|
7165
7178
|
}
|
|
@@ -7290,6 +7303,7 @@ function normalizeSetupAction(input, index) {
|
|
|
7290
7303
|
key,
|
|
7291
7304
|
value,
|
|
7292
7305
|
value_json: hasJsonValue ? toJsonValue(input.value_json ?? input.valueJson ?? input.json) : void 0,
|
|
7306
|
+
label: stringFromOwn(input, "label", "name", "screenshot_label", "screenshotLabel"),
|
|
7293
7307
|
path: path7,
|
|
7294
7308
|
args,
|
|
7295
7309
|
expect_return: hasExpectedReturn ? toJsonValue(valueFromOwn(input, "expect_return", "expectReturn", "expected_return", "expectedReturn")) : void 0,
|
|
@@ -8332,7 +8346,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
|
|
|
8332
8346
|
].filter((check) => Boolean(check)) : [];
|
|
8333
8347
|
const status = profileStatusFromEvidence(profile, evidence, checks);
|
|
8334
8348
|
const firstViewport = evidence?.viewports?.[0];
|
|
8335
|
-
const screenshots = (evidence?.viewports
|
|
8349
|
+
const screenshots = profileScreenshotLabels(evidence?.viewports);
|
|
8336
8350
|
return {
|
|
8337
8351
|
version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
|
|
8338
8352
|
profile_name: profile.name,
|
|
@@ -8665,12 +8679,26 @@ function profileSetupActionCounts(results) {
|
|
|
8665
8679
|
}
|
|
8666
8680
|
return counts;
|
|
8667
8681
|
}
|
|
8682
|
+
function profileSetupScreenshotLabels(results) {
|
|
8683
|
+
return (results || [])
|
|
8684
|
+
.filter((result) => result && profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string")
|
|
8685
|
+
.map((result) => result.screenshot_label)
|
|
8686
|
+
.filter(Boolean);
|
|
8687
|
+
}
|
|
8668
8688
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
8669
8689
|
if ((items || []).length <= limit) return items || [];
|
|
8670
8690
|
const firstCount = Math.floor(limit / 2);
|
|
8671
8691
|
const lastCount = limit - firstCount;
|
|
8672
8692
|
return [...items.slice(0, firstCount), ...items.slice(-lastCount)];
|
|
8673
8693
|
}
|
|
8694
|
+
function profileScreenshotLabels(viewports) {
|
|
8695
|
+
const labels = [];
|
|
8696
|
+
for (const viewport of viewports || []) {
|
|
8697
|
+
if (viewport && viewport.screenshot_label) labels.push(viewport.screenshot_label);
|
|
8698
|
+
labels.push(...profileSetupScreenshotLabels(viewport && viewport.setup_action_results || []));
|
|
8699
|
+
}
|
|
8700
|
+
return labels;
|
|
8701
|
+
}
|
|
8674
8702
|
function profileSetupSummary(viewports, actionCount) {
|
|
8675
8703
|
return {
|
|
8676
8704
|
viewport_count: (viewports || []).length,
|
|
@@ -8710,6 +8738,7 @@ function profileSetupSummary(viewports, actionCount) {
|
|
|
8710
8738
|
action_counts: profileSetupActionCounts(results),
|
|
8711
8739
|
frame_action_count: results.filter((result) => result && result.frame_selector).length,
|
|
8712
8740
|
frame_urls: profileSetupFrameUrls(viewport),
|
|
8741
|
+
setup_screenshots: profileSetupScreenshotLabels(results),
|
|
8713
8742
|
clicked_total: clickedItems.length,
|
|
8714
8743
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
8715
8744
|
clicked,
|
|
@@ -9199,7 +9228,7 @@ function assessProfile(profile, evidence) {
|
|
|
9199
9228
|
else if (expectedViewportCount && viewports.length < expectedViewportCount) status = "proof_insufficient";
|
|
9200
9229
|
else if (checks.some((check) => check.status === "needs_human_review")) status = "needs_human_review";
|
|
9201
9230
|
else if (checks.some((check) => check.status === "failed")) status = "product_regression";
|
|
9202
|
-
const screenshotLabels = viewports
|
|
9231
|
+
const screenshotLabels = profileScreenshotLabels(viewports);
|
|
9203
9232
|
const route = viewports[0] && viewports[0].route ? viewports[0].route : { requested: evidence.target_url, observed: "", matched: false, error: "missing viewport evidence" };
|
|
9204
9233
|
const passedChecks = checks.filter((check) => check.status === "passed").length;
|
|
9205
9234
|
const failedChecks = checks.filter((check) => check.status === "failed").length;
|
|
@@ -9566,6 +9595,18 @@ async function executeSetupAction(action, ordinal) {
|
|
|
9566
9595
|
await page.waitForTimeout(ms);
|
|
9567
9596
|
return { ...base, ok: true, ms };
|
|
9568
9597
|
}
|
|
9598
|
+
if (type === "screenshot") {
|
|
9599
|
+
const rawLabel = String(action.label || action.name || action.screenshot_label || action.screenshotLabel || ("setup-" + ordinal));
|
|
9600
|
+
const labelPart = rawLabel
|
|
9601
|
+
.toLowerCase()
|
|
9602
|
+
.replace(/[^a-z0-9_-]+/g, "-")
|
|
9603
|
+
.replace(/^-+|-+$/g, "")
|
|
9604
|
+
.slice(0, 80) || ("setup-" + ordinal);
|
|
9605
|
+
const label = profileSlug + "-" + viewport.name + "-" + labelPart;
|
|
9606
|
+
if (typeof saveScreenshot !== "function") return { ...base, reason: "save_screenshot_unavailable", label: rawLabel };
|
|
9607
|
+
await saveScreenshot(label);
|
|
9608
|
+
return { ...base, ok: true, label: rawLabel, screenshot_label: label };
|
|
9609
|
+
}
|
|
9569
9610
|
if (type === "wait_for_selector") {
|
|
9570
9611
|
const scope = await setupActionScope(action, timeout);
|
|
9571
9612
|
if (!scope.ok) return setupScopeFailure(base, scope);
|
package/dist/cli.js
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -8760,6 +8760,7 @@ var RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES = [
|
|
|
8760
8760
|
"local_storage",
|
|
8761
8761
|
"session_storage",
|
|
8762
8762
|
"clear_storage",
|
|
8763
|
+
"screenshot",
|
|
8763
8764
|
"wait",
|
|
8764
8765
|
"wait_for_selector",
|
|
8765
8766
|
"wait_for_text",
|
|
@@ -8920,12 +8921,23 @@ function profileSetupActionCounts(results) {
|
|
|
8920
8921
|
}
|
|
8921
8922
|
return toJsonValue(counts);
|
|
8922
8923
|
}
|
|
8924
|
+
function profileSetupScreenshotLabels(results) {
|
|
8925
|
+
return results.filter((result) => profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string").map((result) => result.screenshot_label).filter(Boolean);
|
|
8926
|
+
}
|
|
8923
8927
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
8924
8928
|
if (items.length <= limit) return items;
|
|
8925
8929
|
const firstCount = Math.floor(limit / 2);
|
|
8926
8930
|
const lastCount = limit - firstCount;
|
|
8927
8931
|
return [...items.slice(0, firstCount), ...items.slice(-lastCount)];
|
|
8928
8932
|
}
|
|
8933
|
+
function profileScreenshotLabels(viewports) {
|
|
8934
|
+
const labels = [];
|
|
8935
|
+
for (const viewport of viewports || []) {
|
|
8936
|
+
if (viewport.screenshot_label) labels.push(viewport.screenshot_label);
|
|
8937
|
+
labels.push(...profileSetupScreenshotLabels(viewport.setup_action_results || []));
|
|
8938
|
+
}
|
|
8939
|
+
return labels;
|
|
8940
|
+
}
|
|
8929
8941
|
function profileSetupSummary(viewports, actionCount) {
|
|
8930
8942
|
return toJsonValue({
|
|
8931
8943
|
viewport_count: viewports.length,
|
|
@@ -8955,6 +8967,7 @@ function profileSetupSummary(viewports, actionCount) {
|
|
|
8955
8967
|
action_counts: profileSetupActionCounts(results),
|
|
8956
8968
|
frame_action_count: results.filter((result) => result.frame_selector).length,
|
|
8957
8969
|
frame_urls: profileSetupFrameUrls(viewport),
|
|
8970
|
+
setup_screenshots: profileSetupScreenshotLabels(results),
|
|
8958
8971
|
clicked_total: clickedItems.length,
|
|
8959
8972
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
8960
8973
|
clicked,
|
|
@@ -9000,7 +9013,7 @@ function isSupportedCheckType(value) {
|
|
|
9000
9013
|
}
|
|
9001
9014
|
function normalizeSetupActionType(value, index) {
|
|
9002
9015
|
const normalizedInput = String(value || "").trim().replace(/-/g, "_");
|
|
9003
|
-
const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput;
|
|
9016
|
+
const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput === "capture_screenshot" || normalizedInput === "save_screenshot" || normalizedInput === "setup_screenshot" ? "screenshot" : normalizedInput;
|
|
9004
9017
|
if (RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES.includes(normalized)) {
|
|
9005
9018
|
return normalized;
|
|
9006
9019
|
}
|
|
@@ -9131,6 +9144,7 @@ function normalizeSetupAction(input, index) {
|
|
|
9131
9144
|
key,
|
|
9132
9145
|
value,
|
|
9133
9146
|
value_json: hasJsonValue ? toJsonValue(input.value_json ?? input.valueJson ?? input.json) : void 0,
|
|
9147
|
+
label: stringFromOwn(input, "label", "name", "screenshot_label", "screenshotLabel"),
|
|
9134
9148
|
path: path6,
|
|
9135
9149
|
args,
|
|
9136
9150
|
expect_return: hasExpectedReturn ? toJsonValue(valueFromOwn(input, "expect_return", "expectReturn", "expected_return", "expectedReturn")) : void 0,
|
|
@@ -10173,7 +10187,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
|
|
|
10173
10187
|
].filter((check) => Boolean(check)) : [];
|
|
10174
10188
|
const status = profileStatusFromEvidence(profile, evidence, checks);
|
|
10175
10189
|
const firstViewport = evidence?.viewports?.[0];
|
|
10176
|
-
const screenshots = (evidence?.viewports
|
|
10190
|
+
const screenshots = profileScreenshotLabels(evidence?.viewports);
|
|
10177
10191
|
return {
|
|
10178
10192
|
version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
|
|
10179
10193
|
profile_name: profile.name,
|
|
@@ -10522,12 +10536,26 @@ function profileSetupActionCounts(results) {
|
|
|
10522
10536
|
}
|
|
10523
10537
|
return counts;
|
|
10524
10538
|
}
|
|
10539
|
+
function profileSetupScreenshotLabels(results) {
|
|
10540
|
+
return (results || [])
|
|
10541
|
+
.filter((result) => result && profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string")
|
|
10542
|
+
.map((result) => result.screenshot_label)
|
|
10543
|
+
.filter(Boolean);
|
|
10544
|
+
}
|
|
10525
10545
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
10526
10546
|
if ((items || []).length <= limit) return items || [];
|
|
10527
10547
|
const firstCount = Math.floor(limit / 2);
|
|
10528
10548
|
const lastCount = limit - firstCount;
|
|
10529
10549
|
return [...items.slice(0, firstCount), ...items.slice(-lastCount)];
|
|
10530
10550
|
}
|
|
10551
|
+
function profileScreenshotLabels(viewports) {
|
|
10552
|
+
const labels = [];
|
|
10553
|
+
for (const viewport of viewports || []) {
|
|
10554
|
+
if (viewport && viewport.screenshot_label) labels.push(viewport.screenshot_label);
|
|
10555
|
+
labels.push(...profileSetupScreenshotLabels(viewport && viewport.setup_action_results || []));
|
|
10556
|
+
}
|
|
10557
|
+
return labels;
|
|
10558
|
+
}
|
|
10531
10559
|
function profileSetupSummary(viewports, actionCount) {
|
|
10532
10560
|
return {
|
|
10533
10561
|
viewport_count: (viewports || []).length,
|
|
@@ -10567,6 +10595,7 @@ function profileSetupSummary(viewports, actionCount) {
|
|
|
10567
10595
|
action_counts: profileSetupActionCounts(results),
|
|
10568
10596
|
frame_action_count: results.filter((result) => result && result.frame_selector).length,
|
|
10569
10597
|
frame_urls: profileSetupFrameUrls(viewport),
|
|
10598
|
+
setup_screenshots: profileSetupScreenshotLabels(results),
|
|
10570
10599
|
clicked_total: clickedItems.length,
|
|
10571
10600
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
10572
10601
|
clicked,
|
|
@@ -11056,7 +11085,7 @@ function assessProfile(profile, evidence) {
|
|
|
11056
11085
|
else if (expectedViewportCount && viewports.length < expectedViewportCount) status = "proof_insufficient";
|
|
11057
11086
|
else if (checks.some((check) => check.status === "needs_human_review")) status = "needs_human_review";
|
|
11058
11087
|
else if (checks.some((check) => check.status === "failed")) status = "product_regression";
|
|
11059
|
-
const screenshotLabels = viewports
|
|
11088
|
+
const screenshotLabels = profileScreenshotLabels(viewports);
|
|
11060
11089
|
const route = viewports[0] && viewports[0].route ? viewports[0].route : { requested: evidence.target_url, observed: "", matched: false, error: "missing viewport evidence" };
|
|
11061
11090
|
const passedChecks = checks.filter((check) => check.status === "passed").length;
|
|
11062
11091
|
const failedChecks = checks.filter((check) => check.status === "failed").length;
|
|
@@ -11423,6 +11452,18 @@ async function executeSetupAction(action, ordinal) {
|
|
|
11423
11452
|
await page.waitForTimeout(ms);
|
|
11424
11453
|
return { ...base, ok: true, ms };
|
|
11425
11454
|
}
|
|
11455
|
+
if (type === "screenshot") {
|
|
11456
|
+
const rawLabel = String(action.label || action.name || action.screenshot_label || action.screenshotLabel || ("setup-" + ordinal));
|
|
11457
|
+
const labelPart = rawLabel
|
|
11458
|
+
.toLowerCase()
|
|
11459
|
+
.replace(/[^a-z0-9_-]+/g, "-")
|
|
11460
|
+
.replace(/^-+|-+$/g, "")
|
|
11461
|
+
.slice(0, 80) || ("setup-" + ordinal);
|
|
11462
|
+
const label = profileSlug + "-" + viewport.name + "-" + labelPart;
|
|
11463
|
+
if (typeof saveScreenshot !== "function") return { ...base, reason: "save_screenshot_unavailable", label: rawLabel };
|
|
11464
|
+
await saveScreenshot(label);
|
|
11465
|
+
return { ...base, ok: true, label: rawLabel, screenshot_label: label };
|
|
11466
|
+
}
|
|
11426
11467
|
if (type === "wait_for_selector") {
|
|
11427
11468
|
const scope = await setupActionScope(action, timeout);
|
|
11428
11469
|
if (!scope.ok) return setupScopeFailure(base, scope);
|
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-ZVKKBM2J.js";
|
|
62
62
|
import {
|
|
63
63
|
DEFAULT_RIDDLE_API_BASE_URL,
|
|
64
64
|
DEFAULT_RIDDLE_API_KEY_FILE,
|
package/dist/profile.cjs
CHANGED
|
@@ -89,6 +89,7 @@ var RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES = [
|
|
|
89
89
|
"local_storage",
|
|
90
90
|
"session_storage",
|
|
91
91
|
"clear_storage",
|
|
92
|
+
"screenshot",
|
|
92
93
|
"wait",
|
|
93
94
|
"wait_for_selector",
|
|
94
95
|
"wait_for_text",
|
|
@@ -249,12 +250,23 @@ function profileSetupActionCounts(results) {
|
|
|
249
250
|
}
|
|
250
251
|
return toJsonValue(counts);
|
|
251
252
|
}
|
|
253
|
+
function profileSetupScreenshotLabels(results) {
|
|
254
|
+
return results.filter((result) => profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string").map((result) => result.screenshot_label).filter(Boolean);
|
|
255
|
+
}
|
|
252
256
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
253
257
|
if (items.length <= limit) return items;
|
|
254
258
|
const firstCount = Math.floor(limit / 2);
|
|
255
259
|
const lastCount = limit - firstCount;
|
|
256
260
|
return [...items.slice(0, firstCount), ...items.slice(-lastCount)];
|
|
257
261
|
}
|
|
262
|
+
function profileScreenshotLabels(viewports) {
|
|
263
|
+
const labels = [];
|
|
264
|
+
for (const viewport of viewports || []) {
|
|
265
|
+
if (viewport.screenshot_label) labels.push(viewport.screenshot_label);
|
|
266
|
+
labels.push(...profileSetupScreenshotLabels(viewport.setup_action_results || []));
|
|
267
|
+
}
|
|
268
|
+
return labels;
|
|
269
|
+
}
|
|
258
270
|
function profileSetupSummary(viewports, actionCount) {
|
|
259
271
|
return toJsonValue({
|
|
260
272
|
viewport_count: viewports.length,
|
|
@@ -284,6 +296,7 @@ function profileSetupSummary(viewports, actionCount) {
|
|
|
284
296
|
action_counts: profileSetupActionCounts(results),
|
|
285
297
|
frame_action_count: results.filter((result) => result.frame_selector).length,
|
|
286
298
|
frame_urls: profileSetupFrameUrls(viewport),
|
|
299
|
+
setup_screenshots: profileSetupScreenshotLabels(results),
|
|
287
300
|
clicked_total: clickedItems.length,
|
|
288
301
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
289
302
|
clicked,
|
|
@@ -329,7 +342,7 @@ function isSupportedCheckType(value) {
|
|
|
329
342
|
}
|
|
330
343
|
function normalizeSetupActionType(value, index) {
|
|
331
344
|
const normalizedInput = String(value || "").trim().replace(/-/g, "_");
|
|
332
|
-
const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput;
|
|
345
|
+
const normalized = normalizedInput === "clear_browser_storage" ? "clear_storage" : normalizedInput === "pointer_drag" || normalizedInput === "mouse_drag" || normalizedInput === "drag_to" ? "drag" : normalizedInput === "keyboard_press" || normalizedInput === "key_press" ? "press" : normalizedInput === "capture_screenshot" || normalizedInput === "save_screenshot" || normalizedInput === "setup_screenshot" ? "screenshot" : normalizedInput;
|
|
333
346
|
if (RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES.includes(normalized)) {
|
|
334
347
|
return normalized;
|
|
335
348
|
}
|
|
@@ -460,6 +473,7 @@ function normalizeSetupAction(input, index) {
|
|
|
460
473
|
key,
|
|
461
474
|
value,
|
|
462
475
|
value_json: hasJsonValue ? toJsonValue(input.value_json ?? input.valueJson ?? input.json) : void 0,
|
|
476
|
+
label: stringFromOwn(input, "label", "name", "screenshot_label", "screenshotLabel"),
|
|
463
477
|
path,
|
|
464
478
|
args,
|
|
465
479
|
expect_return: hasExpectedReturn ? toJsonValue(valueFromOwn(input, "expect_return", "expectReturn", "expected_return", "expectedReturn")) : void 0,
|
|
@@ -1502,7 +1516,7 @@ function assessRiddleProofProfileEvidence(profile, evidence, options = {}) {
|
|
|
1502
1516
|
].filter((check) => Boolean(check)) : [];
|
|
1503
1517
|
const status = profileStatusFromEvidence(profile, evidence, checks);
|
|
1504
1518
|
const firstViewport = evidence?.viewports?.[0];
|
|
1505
|
-
const screenshots = (evidence?.viewports
|
|
1519
|
+
const screenshots = profileScreenshotLabels(evidence?.viewports);
|
|
1506
1520
|
return {
|
|
1507
1521
|
version: RIDDLE_PROOF_PROFILE_RESULT_VERSION,
|
|
1508
1522
|
profile_name: profile.name,
|
|
@@ -1851,12 +1865,26 @@ function profileSetupActionCounts(results) {
|
|
|
1851
1865
|
}
|
|
1852
1866
|
return counts;
|
|
1853
1867
|
}
|
|
1868
|
+
function profileSetupScreenshotLabels(results) {
|
|
1869
|
+
return (results || [])
|
|
1870
|
+
.filter((result) => result && profileSetupResultAction(result) === "screenshot" && result.ok !== false && typeof result.screenshot_label === "string")
|
|
1871
|
+
.map((result) => result.screenshot_label)
|
|
1872
|
+
.filter(Boolean);
|
|
1873
|
+
}
|
|
1854
1874
|
function sampleProfileSetupSummaryItems(items, limit) {
|
|
1855
1875
|
if ((items || []).length <= limit) return items || [];
|
|
1856
1876
|
const firstCount = Math.floor(limit / 2);
|
|
1857
1877
|
const lastCount = limit - firstCount;
|
|
1858
1878
|
return [...items.slice(0, firstCount), ...items.slice(-lastCount)];
|
|
1859
1879
|
}
|
|
1880
|
+
function profileScreenshotLabels(viewports) {
|
|
1881
|
+
const labels = [];
|
|
1882
|
+
for (const viewport of viewports || []) {
|
|
1883
|
+
if (viewport && viewport.screenshot_label) labels.push(viewport.screenshot_label);
|
|
1884
|
+
labels.push(...profileSetupScreenshotLabels(viewport && viewport.setup_action_results || []));
|
|
1885
|
+
}
|
|
1886
|
+
return labels;
|
|
1887
|
+
}
|
|
1860
1888
|
function profileSetupSummary(viewports, actionCount) {
|
|
1861
1889
|
return {
|
|
1862
1890
|
viewport_count: (viewports || []).length,
|
|
@@ -1896,6 +1924,7 @@ function profileSetupSummary(viewports, actionCount) {
|
|
|
1896
1924
|
action_counts: profileSetupActionCounts(results),
|
|
1897
1925
|
frame_action_count: results.filter((result) => result && result.frame_selector).length,
|
|
1898
1926
|
frame_urls: profileSetupFrameUrls(viewport),
|
|
1927
|
+
setup_screenshots: profileSetupScreenshotLabels(results),
|
|
1899
1928
|
clicked_total: clickedItems.length,
|
|
1900
1929
|
clicked_truncated: clickedItems.length > clicked.length,
|
|
1901
1930
|
clicked,
|
|
@@ -2385,7 +2414,7 @@ function assessProfile(profile, evidence) {
|
|
|
2385
2414
|
else if (expectedViewportCount && viewports.length < expectedViewportCount) status = "proof_insufficient";
|
|
2386
2415
|
else if (checks.some((check) => check.status === "needs_human_review")) status = "needs_human_review";
|
|
2387
2416
|
else if (checks.some((check) => check.status === "failed")) status = "product_regression";
|
|
2388
|
-
const screenshotLabels = viewports
|
|
2417
|
+
const screenshotLabels = profileScreenshotLabels(viewports);
|
|
2389
2418
|
const route = viewports[0] && viewports[0].route ? viewports[0].route : { requested: evidence.target_url, observed: "", matched: false, error: "missing viewport evidence" };
|
|
2390
2419
|
const passedChecks = checks.filter((check) => check.status === "passed").length;
|
|
2391
2420
|
const failedChecks = checks.filter((check) => check.status === "failed").length;
|
|
@@ -2752,6 +2781,18 @@ async function executeSetupAction(action, ordinal) {
|
|
|
2752
2781
|
await page.waitForTimeout(ms);
|
|
2753
2782
|
return { ...base, ok: true, ms };
|
|
2754
2783
|
}
|
|
2784
|
+
if (type === "screenshot") {
|
|
2785
|
+
const rawLabel = String(action.label || action.name || action.screenshot_label || action.screenshotLabel || ("setup-" + ordinal));
|
|
2786
|
+
const labelPart = rawLabel
|
|
2787
|
+
.toLowerCase()
|
|
2788
|
+
.replace(/[^a-z0-9_-]+/g, "-")
|
|
2789
|
+
.replace(/^-+|-+$/g, "")
|
|
2790
|
+
.slice(0, 80) || ("setup-" + ordinal);
|
|
2791
|
+
const label = profileSlug + "-" + viewport.name + "-" + labelPart;
|
|
2792
|
+
if (typeof saveScreenshot !== "function") return { ...base, reason: "save_screenshot_unavailable", label: rawLabel };
|
|
2793
|
+
await saveScreenshot(label);
|
|
2794
|
+
return { ...base, ok: true, label: rawLabel, screenshot_label: label };
|
|
2795
|
+
}
|
|
2755
2796
|
if (type === "wait_for_selector") {
|
|
2756
2797
|
const scope = await setupActionScope(action, timeout);
|
|
2757
2798
|
if (!scope.ok) return setupScopeFailure(base, scope);
|
package/dist/profile.d.cts
CHANGED
|
@@ -5,7 +5,7 @@ declare const RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION: "riddle-proof.profile-evide
|
|
|
5
5
|
declare const RIDDLE_PROOF_PROFILE_RESULT_VERSION: "riddle-proof.profile-result.v1";
|
|
6
6
|
declare const RIDDLE_PROOF_PROFILE_STATUSES: readonly ["passed", "product_regression", "proof_insufficient", "environment_blocked", "configuration_error", "needs_human_review"];
|
|
7
7
|
declare const RIDDLE_PROOF_PROFILE_CHECK_TYPES: readonly ["route_loaded", "url_search_param_equals", "url_search_param_absent", "selector_visible", "selector_absent", "selector_count_at_least", "selector_count_equals", "selector_count_equal", "selector_count_eq", "selector_text_order", "frame_text_visible", "frame_url_equals", "frame_url_matches", "frame_no_horizontal_overflow", "text_visible", "text_absent", "route_inventory", "no_horizontal_overflow", "no_mobile_horizontal_overflow", "no_fatal_console_errors"];
|
|
8
|
-
declare const RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES: readonly ["click", "drag", "press", "fill", "set_input_value", "assert_text_visible", "assert_text_absent", "assert_selector_count", "assert_window_value", "assert_window_number", "local_storage", "session_storage", "clear_storage", "wait", "wait_for_selector", "wait_for_text", "window_call"];
|
|
8
|
+
declare const RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES: readonly ["click", "drag", "press", "fill", "set_input_value", "assert_text_visible", "assert_text_absent", "assert_selector_count", "assert_window_value", "assert_window_number", "local_storage", "session_storage", "clear_storage", "screenshot", "wait", "wait_for_selector", "wait_for_text", "window_call"];
|
|
9
9
|
type RiddleProofProfileStatus = typeof RIDDLE_PROOF_PROFILE_STATUSES[number];
|
|
10
10
|
type RiddleProofProfileCheckType = typeof RIDDLE_PROOF_PROFILE_CHECK_TYPES[number];
|
|
11
11
|
type RiddleProofProfileSetupActionType = typeof RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES[number];
|
|
@@ -33,6 +33,7 @@ interface RiddleProofProfileSetupAction {
|
|
|
33
33
|
key?: string;
|
|
34
34
|
value?: string;
|
|
35
35
|
value_json?: JsonValue;
|
|
36
|
+
label?: string;
|
|
36
37
|
path?: string;
|
|
37
38
|
args?: JsonValue[];
|
|
38
39
|
expect_return?: JsonValue;
|
package/dist/profile.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ declare const RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION: "riddle-proof.profile-evide
|
|
|
5
5
|
declare const RIDDLE_PROOF_PROFILE_RESULT_VERSION: "riddle-proof.profile-result.v1";
|
|
6
6
|
declare const RIDDLE_PROOF_PROFILE_STATUSES: readonly ["passed", "product_regression", "proof_insufficient", "environment_blocked", "configuration_error", "needs_human_review"];
|
|
7
7
|
declare const RIDDLE_PROOF_PROFILE_CHECK_TYPES: readonly ["route_loaded", "url_search_param_equals", "url_search_param_absent", "selector_visible", "selector_absent", "selector_count_at_least", "selector_count_equals", "selector_count_equal", "selector_count_eq", "selector_text_order", "frame_text_visible", "frame_url_equals", "frame_url_matches", "frame_no_horizontal_overflow", "text_visible", "text_absent", "route_inventory", "no_horizontal_overflow", "no_mobile_horizontal_overflow", "no_fatal_console_errors"];
|
|
8
|
-
declare const RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES: readonly ["click", "drag", "press", "fill", "set_input_value", "assert_text_visible", "assert_text_absent", "assert_selector_count", "assert_window_value", "assert_window_number", "local_storage", "session_storage", "clear_storage", "wait", "wait_for_selector", "wait_for_text", "window_call"];
|
|
8
|
+
declare const RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES: readonly ["click", "drag", "press", "fill", "set_input_value", "assert_text_visible", "assert_text_absent", "assert_selector_count", "assert_window_value", "assert_window_number", "local_storage", "session_storage", "clear_storage", "screenshot", "wait", "wait_for_selector", "wait_for_text", "window_call"];
|
|
9
9
|
type RiddleProofProfileStatus = typeof RIDDLE_PROOF_PROFILE_STATUSES[number];
|
|
10
10
|
type RiddleProofProfileCheckType = typeof RIDDLE_PROOF_PROFILE_CHECK_TYPES[number];
|
|
11
11
|
type RiddleProofProfileSetupActionType = typeof RIDDLE_PROOF_PROFILE_SETUP_ACTION_TYPES[number];
|
|
@@ -33,6 +33,7 @@ interface RiddleProofProfileSetupAction {
|
|
|
33
33
|
key?: string;
|
|
34
34
|
value?: string;
|
|
35
35
|
value_json?: JsonValue;
|
|
36
|
+
label?: string;
|
|
36
37
|
path?: string;
|
|
37
38
|
args?: JsonValue[];
|
|
38
39
|
expect_return?: JsonValue;
|
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-ZVKKBM2J.js";
|
|
23
23
|
export {
|
|
24
24
|
RIDDLE_PROOF_PROFILE_CHECK_TYPES,
|
|
25
25
|
RIDDLE_PROOF_PROFILE_EVIDENCE_VERSION,
|