Merge pull request 't_2fb507c6: F8 rotate prekey (Node::rotate_prekey + invite re-encode)' (#101) from wt/t_2fb507c6 into main
Reviewed-on: #101
This commit is contained in:
commit
24b5c93c43
7 changed files with 177 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ fn help_overlay_lists_core_bindings() {
|
|||
"F4",
|
||||
"F5",
|
||||
"F6",
|
||||
"F8",
|
||||
"send chat",
|
||||
"/profile",
|
||||
"/pay",
|
||||
|
|
|
|||
Loading…
Reference in a new issue