fix(inplace,embed): input set back mid-flight, report inputs, ambiguous anchors
Four items owed after S5b, reported by design-dev during the anti-slop run:
- carry() measured a sent-then-changed form against its OLD DEFAULTS. An
answer set back mid-flight to the value the page first showed read as
untouched, and the swap put the just-saved value over it. A form sent and
then changed is now measured against its sent snapshot (sentSet.snapOf).
- The embed's clean-batch reload saw only our own forms. A report's own
inputs lost whatever the operator had typed into them. Unsaved text in
any control we don't own now holds the reload, and the page says so.
- Two r2b.toml rows ("D3 a stored theme...", "D3 forced light...") matched
twice, so they proved only by where the first match fell. Both are
re-anchored, and scripts/mutation_check.py now refuses any anchor that
matches more than once. A new tool control covers that.
- The r2_flow contract's C3 steps 2 and 4 now say what S5b superseded. U3
gains the report-input rule.
Mutation rows: u3_submit_all +1, r2_submit_all +1. Four rows were
re-anchored onto the moved lines.
This commit is contained in:
@@ -67,7 +67,7 @@ label = "a refusal reloads the page and clears what was entered"
|
||||
file = "booth/static/embed.js"
|
||||
test = "tests/test_embed_browser.py::test_a_refused_ask_costs_only_itself_and_clears_nothing"
|
||||
old = '''
|
||||
if (!failed.length && !changed) { location.reload(); return; }'''
|
||||
if (!failed.length && !changed && !host) { location.reload(); return; }'''
|
||||
new = '''
|
||||
location.reload(); return;'''
|
||||
|
||||
@@ -76,9 +76,9 @@ label = "only dirtiness blocks the reload (a refused form set back to its first
|
||||
file = "booth/static/embed.js"
|
||||
test = "tests/test_embed_browser.py::test_a_refusal_blocks_the_reload_even_when_nothing_reads_dirty"
|
||||
old = '''
|
||||
if (!failed.length && !changed) { location.reload(); return; }'''
|
||||
if (!failed.length && !changed && !host) { location.reload(); return; }'''
|
||||
new = '''
|
||||
if (!changed) { location.reload(); return; }'''
|
||||
if (!changed && !host) { location.reload(); return; }'''
|
||||
|
||||
[[mutation]]
|
||||
label = "a refusal is never said"
|
||||
@@ -139,3 +139,12 @@ test = "tests/test_embed_browser.py::test_the_empty_status_line_stays_hidden_und
|
||||
old = '''
|
||||
".bk-ask-status[hidden]{display:none}",'''
|
||||
new = ''''''
|
||||
|
||||
[[mutation]]
|
||||
label = "the reload ignores the report's own inputs (text typed into the host page is lost)"
|
||||
file = "booth/static/embed.js"
|
||||
test = "tests/test_embed_browser.py::test_a_clean_batch_does_not_reload_over_text_typed_into_the_report"
|
||||
old = '''
|
||||
if (!failed.length && !changed && !host) { location.reload(); return; }'''
|
||||
new = '''
|
||||
if (!failed.length && !changed) { location.reload(); return; }'''
|
||||
|
||||
Reference in New Issue
Block a user