Test connect mode's named styles, n and the Note view
Three things the stage 8d summary lists, checked end to end before listing them: a named line style picked with <Space>s, aiming with n after a search, and connecting from the Note view, where l goes to the next sibling. Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
ebe8a5988e
commit
95c6c3ca37
1 file changed
+23
@@ -138,3 +138,26 @@ fn connect_mode_aims_with_the_mouse_and_works_in_the_outline() {
|
||||
assert_eq!(look.line, Some(Stroke::Dashed), "a branch starts solid: dashed is next");
|
||||
assert_eq!((h.label(), h.cursor().as_str()), ("NORMAL", "Soil"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_named_style_n_and_the_note_view() {
|
||||
let mut h = Harness::new();
|
||||
// n aims at the next match of the last search.
|
||||
h.type_keys(":find compost<CR>ggglC");
|
||||
h.type_keys("n");
|
||||
assert_eq!((h.label(), h.cursor().as_str()), ("CONNECT", "ask about compost"));
|
||||
// <Space>s: a named line style, which brings its label.
|
||||
h.type_keys("<Space>s/blocks<CR>");
|
||||
assert_eq!(h.label(), "CONNECT");
|
||||
h.type_keys("<CR>");
|
||||
let link = h.link_between("Soil", "ask about compost").unwrap();
|
||||
assert_eq!(link.look.style.as_ref().map(|style| style.as_str()), Some("blocks"));
|
||||
// In the Note view, l goes to the next sibling to aim at it.
|
||||
h.type_keys("<Space>vnglC");
|
||||
assert_eq!(h.cursor(), "Soil");
|
||||
h.type_keys("l");
|
||||
assert!(h.status().contains("Soil → Raised beds"), "{}", h.status());
|
||||
h.type_keys("<CR>");
|
||||
assert_eq!(h.message(), "linked Soil → Raised beds");
|
||||
assert!(h.screen().contains("→ Raised beds"), "the note lists the new link:\n{}", h.screen());
|
||||
}
|
||||
Reference in new issue
Block a user