|
|
@@ -439,6 +439,27 @@ def main():
|
|
|
check(status == 200 and "quote-comment-dialog" in page,
|
|
|
"terminal page keeps its quote dialog")
|
|
|
|
|
|
+ print("== B3: review section hides the duplicate body ==")
|
|
|
+ status, body = saddle_api("POST", "/api/saddle/%d/update" % fake_id, fake_token,
|
|
|
+ {"type": "block", "session_id": session_id, "data": {
|
|
|
+ "question": "Review the diff",
|
|
|
+ "type": "review",
|
|
|
+ "body": "# The change\n\nReworks the flange module."}})
|
|
|
+ check(status == 200 and body.get("block_id"), "review block raised")
|
|
|
+ detail = task_state(auth, plan_task)
|
|
|
+ review_block = [b for b in detail["blocks"] if b["block_type"] == "review"][0]
|
|
|
+ check(detail.get("review_pending") is True,
|
|
|
+ "review section shows while the review is unanswered")
|
|
|
+ check(review_block.get("show_body") is False,
|
|
|
+ "pending review block hides its duplicate body preview")
|
|
|
+ check(review_block.get("body", "").startswith("# The change"),
|
|
|
+ "review body itself still arrives in state (B2 counterpart)")
|
|
|
+ act(auth, review_block["answer_action"], {"answer": "Human approved the review"})
|
|
|
+ detail = task_state(auth, plan_task)
|
|
|
+ review_block = [b for b in detail["blocks"] if b["block_type"] == "review"][0]
|
|
|
+ check(review_block.get("show_body") is True,
|
|
|
+ "answered review shows the body again (banner gone)")
|
|
|
+
|
|
|
print("== feature 5: rules ==")
|
|
|
rules_state = slot_public(auth, "/rules", "rules")
|
|
|
for name, body in [
|