Merge pull request 't_2fb507c6: F8 rotate prekey (Node::rotate_prekey + invite re-encode)' (#101) from wt/t_2fb507c6 into main
Some checks failed
android-ci / android (push) Successful in 8m28s
ci / test (push) Has been cancelled
ci / sdk (push) Has been cancelled
ci / fuzz (push) Has been cancelled

Reviewed-on: #101
This commit is contained in:
sirius 2026-09-18 01:21:45 +00:00
commit 24b5c93c43
7 changed files with 177 additions and 2 deletions

View file

@ -130,3 +130,27 @@ fn rotate_prompt_text_matches_spec() {
assert!(t.contains("Type ROTATE to confirm"));
assert!(t.contains("Esc to cancel"));
}
#[test]
fn f8_prekey_rotation_screen_text_matches_spec() {
let t = onionwire::tui::prekey_screen_text();
assert!(t.contains("Rotate prekey?"));
assert!(t.contains("Your identity and onion stay the same."));
assert!(
t.contains("F3-paste"),
"the re-paste requirement is the whole point of the screen"
);
assert!(t.contains("Type ROTATE to confirm"));
assert!(t.contains("Esc to cancel"));
}
#[test]
fn f8_reuses_the_type_rotate_confirm_prompt() {
let mut p = RotatePrompt::new();
assert_eq!(p.on_esc(), RotateDecision::Cancel);
for c in "ROTA".chars() {
assert_eq!(p.on_char(c), RotateDecision::Pending);
}
assert_eq!(p.on_char('T'), RotateDecision::Pending);
assert_eq!(p.on_char('E'), RotateDecision::Confirm);
}

View file

@ -46,6 +46,7 @@ fn help_overlay_lists_core_bindings() {
"F4",
"F5",
"F6",
"F8",
"send chat",
"/profile",
"/pay",