mirror of
https://github.com/morluto/rea.git
synced 2026-11-16 11:43:20 +00:00
feat(browser): reuse saved response values across scenario steps (#7267)
Save typed response fields and reuse generated IDs or authentication values across browser scenario requests, UI observations and navigation through the shared CLI/MCP workflow.
Preserve exact numbers, retained Evidence, explicit source/coverage limits and prospective page-value semantics. Bound response decoding, retained spellings and request serialization before allocation, and protect marked response values across source records, follow-up text and planned screenshots.
Integrates Edgar Arakelyan's #7162, including follow-ups through 9f5191ab0. Final local validation: 560 feature-branch tests and 561 current-main integration tests, static/build/docs checks and real PocketBase CLI/MCP privacy workflows. Whole-task comparison and verification limits are recorded in docs/verification/browser-saved-values-2026-10-26.md.
Co-authored-by: Edgar Arakelyan <edgar.arakelyan@scale.com>
This commit is contained in:
1 parent
60822e0702
commit
3fcbabe593
54 files changed
+7287
-370
No files matched your search
@@ -305,14 +305,25 @@ const fillMask = (mask: string, value: number): string => {
|
||||
};
|
||||
|
||||
/** Lower case, with every run of other characters joined by one `-` and none at either end. */
|
||||
export const slugOf = (text: string): string =>
|
||||
text
|
||||
/** How a slug spells `&`: dropped when absent, as Django does, or as the word, as Go's gosimple/slug and JavaScript's slugify do. */
|
||||
export type Ampersand = "and";
|
||||
|
||||
export const slugOf = (text: string, ampersand?: Ampersand): string =>
|
||||
(ampersand === "and" ? text.replaceAll("&", " and ") : text)
|
||||
.normalize("NFKD")
|
||||
.replace(/[̀-ͯ]/gu, "")
|
||||
.toLowerCase()
|
||||
.replace(/[^a-z0-9]+/gu, "-")
|
||||
.replace(/^-+|-+$/gu, "");
|
||||
|
||||
/** A text's slugs, each with the spelling that gives it: also with `&` as the word when the text holds one. */
|
||||
export const slugSpellings = (
|
||||
text: string,
|
||||
): readonly { readonly slug: string; readonly ampersand?: Ampersand }[] =>
|
||||
text.includes("&")
|
||||
? [{ slug: slugOf(text) }, { slug: slugOf(text, "and"), ampersand: "and" }]
|
||||
: [{ slug: slugOf(text) }];
|
||||
|
||||
const isAlphanumeric = (character: string | undefined): boolean =>
|
||||
character !== undefined && /[\p{L}\p{N}]/u.test(character);
|
||||
|
||||
|
||||
Reference in new issue
Block a user