use crate::test_support::window::{painted, recorded, seated};
use crate::ui::Model;
#[test]
fn the_conversation_s_card_carries_its_facts() {
let mut model = recorded();
model.context = None;
let text = painted(&mut model);
for word in [
"port the paint probe",
"on home — (this box's own server)",
"under 20260830T050000Z-root",
] {
assert!(text.contains(word), "{word:?}:\n{text}");
}
assert!(text.contains("120 tokens"), "{text}");
}
#[test]
fn the_seat_s_facts_stand_on_the_status_bar_and_no_card_does() {
let version = crate::cli::version();
for conversation in [None, seated().conversation] {
let mut model = Model {
conversation,
..seated()
};
model.roster[0].workspaces[0].attention = 2;
let text = painted(&mut model);
for word in [version.as_str(), "2 waiting"] {
assert!(text.contains(word), "{word:?}:\n{text}");
}
assert!(!text.contains("1 workspace,"), "{text}");
}
}
mod held;
mod refused;