Repeat edit test: compare the repeat's actual settings

RepeatSpec keeps rows, columns and spacing under kind; the test now
compares that, and checks it was read.
This commit is contained in:
Don Omondi
2026-11-02 14:36:14 +07:00
committed by bflatastic
parent 046e443944
commit 55a28d2455
+2 -1
View File
@@ -36,5 +36,6 @@ fn a_double_click_on_a_repeat_isolates_it_to_edit_its_text() {
let NodeKind::Text(t) = &s.doc().unwrap().doc.node(text).unwrap().kind else { panic!("not type") };
assert_eq!(t.plain_text(), "Bob");
assert_eq!(s.doc().unwrap().doc.position(text).and_then(|(p, ..)| p), Some(repeat), "still the repeat's source");
assert_eq!(spec(&s)["rows"], before["rows"], "the repeat keeps its settings");
assert_eq!(spec(&s)["kind"], before["kind"], "the repeat keeps its settings (rows, columns, spacing)");
assert!(before["kind"].is_object(), "the settings are read: {before}");
}