Fusion du lot B : le vote déplié sous l'article, le panier, le vote par transaction Ğ1 (bulletin scellé)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Yvv
2026-10-31 00:15:46 +01:00
co-authored by Claude Opus 5.5
59 changed files with 7228 additions and 370 deletions
+17 -2
View File
@@ -516,9 +516,24 @@ async fn e1_and_e2_go_to_level_4_once_and_an_open_change_stays_open_voted_at_4()
let at = if *code == "E1" { 4 } else { 3 };
assert_eq!(d["proposal"]["votedAtInertia"], at, "{group} {code}");
}
// And votable: in Monnaie libre, judged at level 4.
// And votable: in Monnaie libre, judged at level 4. A vote there is confirmed on the
// chain (tests/ballots.rs); here, one such vote is written as the confirmation writes it.
let (_, _, e1_ml) = &proposals[1];
c.vote(e1_ml, "for").await;
sqlx::query(
"INSERT INTO identities (id, kind, display_name, g1_member, admin, created_at)
VALUES ('idty:9001', 'g1', 'Alice', 1, 0, '2026-10-30T00:00:00Z')",
)
.execute(&pool)
.await
.expect("identity");
sqlx::query(
"INSERT INTO votes (proposal_id, identity_id, choice, revision, cast_at, source, block, event_index)
VALUES (?, 'idty:9001', 'for', 1, '2026-10-30T00:00:00Z', 'chain', 100, 1)",
)
.bind(e1_ml)
.execute(&pool)
.await
.expect("vote");
let d = c.get(&format!("/api/proposals/{e1_ml}")).await;
let ratio = d["proposal"]["evaluation"]["requiredRatio"].as_f64().expect("ratio");
let p = d["participation"]["ratio"].as_f64().expect("p");