|
|
@@ -460,6 +460,24 @@ def main():
|
|
|
check(review_block.get("show_body") is True,
|
|
|
"answered review shows the body again (banner gone)")
|
|
|
|
|
|
+ print("== B2: question block body above options ==")
|
|
|
+ # Contract side (A2 will restore bodies end-to-end): a question
|
|
|
+ # block raised with a heredoc body carries it; the body preview
|
|
|
+ # rides above the options (template order) and survives answering
|
|
|
+ # alongside the selected answer.
|
|
|
+ detail = task_state(auth, plan_task)
|
|
|
+ question = [b for b in detail["blocks"] if b["block_type"] == "question"][0]
|
|
|
+ check(question.get("body") == "# Storage choice"
|
|
|
+ and question.get("show_body") is True,
|
|
|
+ "question block keeps its body markdown with the preview on")
|
|
|
+ act(auth, question["answer_action"], {"option": "SQLite"})
|
|
|
+ detail = task_state(auth, plan_task)
|
|
|
+ question = [b for b in detail["blocks"] if b["block_type"] == "question"][0]
|
|
|
+ check(question.get("answered") is True and question.get("answer") == "SQLite"
|
|
|
+ and question.get("body") == "# Storage choice"
|
|
|
+ and question.get("show_body") is True,
|
|
|
+ "answered question shows body + selected answer")
|
|
|
+
|
|
|
print("== feature 5: rules ==")
|
|
|
rules_state = slot_public(auth, "/rules", "rules")
|
|
|
for name, body in [
|