use super::fixture::world;
use super::painted;
use crate::cli_outbound::Cli;
#[test]
fn a_wireless_window_paints_the_refusal_and_no_operable_control() {
let (lernie, bl) = (Cli::new("lernie"), Cli::new("bl"));
let mut world = world();
let shell = painted(&mut world, &lernie, &bl);
assert!(
shell.contains("Workspaces:"),
"the wired frame paints the shell:\n{shell}"
);
world
.model
.refuse_wire("bind 127.0.0.1:7737: Address already in use".to_owned());
let refused = painted(&mut world, &lernie, &bl);
assert!(
refused.contains(crate::wire::post::NO_WIRE),
"the one sentence every wireless act receipt carries heads the frame:\n{refused}"
);
assert!(
refused.contains("Address already in use"),
"the engine's own reason, verbatim:\n{refused}"
);
assert!(
refused.contains("127.0.0.1:0"),
"the remedy names the port-zero path:\n{refused}"
);
for control in ["Workspaces:", "new conversation", "Start"] {
assert!(
!refused.contains(control),
"{control:?} would only look actionable (bl-dc14):\n{refused}"
);
}
}