test(consult): lock the restoreOnFailure composer draft contract
BUG-306 changed the persist-failure restore guard. Keep the source-level slice aligned so the staging quality gate still passes. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -87,7 +87,11 @@ test("every external draft writer keeps working through the page-owned setters",
|
||||
const saveOnboardingName = sourceBetween(pageSource, "async function saveOnboardingName()", "async function saveOnboardingBirth");
|
||||
const stopRestore = sourceBetween(pageSource, "updateSession(pending.sessionId, () => pending.previousSession);", "function completeConsultationInterface");
|
||||
const sendClear = sourceBetween(pageSource, " updateSession(sessionId, () => userSession);", "if (!resuming && process.env.NODE_ENV === \"development\" && uiPreview.current)");
|
||||
const sendRestore = sourceBetween(pageSource, "if (activeSessionIdRef.current === sessionId) {", "setRequestError({");
|
||||
const sendRestore = sourceBetween(
|
||||
pageSource,
|
||||
"if (!options.restoreOnFailure && activeSessionIdRef.current === sessionId) {",
|
||||
"setRequestError({",
|
||||
);
|
||||
|
||||
// Then: suggestions fill, session switches clear, stop restores and send clears.
|
||||
assert.match(chooseSuggested, /setDraft\(question\);\n\s*setDraftTheme\(theme \?\? null\);\n\s*setDraftEntrypoint\(entrypoint\);/);
|
||||
|
||||
Reference in New Issue
Block a user