WIP: coordinate rename green; tile-route walk admits the coordinate (improvise-fdk1)
This commit is contained in:
@@ -5236,7 +5236,9 @@ mod cell_identity {
|
||||
/// so `Derived` is never right here (improvise-hoxy).
|
||||
fn names_its_column(col: Option<&RecordCol>, id: Option<&CellId>) -> bool {
|
||||
match (col, id) {
|
||||
(Some(RecordCol::Category(_)), Some(CellId::Coordinate)) => true,
|
||||
(Some(RecordCol::Category(c)), Some(CellId::Coordinate { category, .. })) => {
|
||||
category == c
|
||||
}
|
||||
(Some(RecordCol::Measure(m)), Some(CellId::Record(cell))) => {
|
||||
cell.measure.as_deref() == Some(m.as_str())
|
||||
}
|
||||
|
||||
@@ -471,6 +471,7 @@ fn the_tile_bar_route_into_records_mode_does_not_strand_the_user() {
|
||||
cols >= 3,
|
||||
"the fixture must reach past the coordinate column"
|
||||
);
|
||||
let mut coordinates = 0;
|
||||
for col in 0..cols {
|
||||
while client.state().view.cursor().selected.1 < col {
|
||||
press(&mut host, id, &mut client, "l");
|
||||
@@ -483,6 +484,17 @@ fn the_tile_bar_route_into_records_mode_does_not_strand_the_user() {
|
||||
// a keypress this client might decline.
|
||||
client.state_mut().view.status_msg = "\u{0}unsaid".to_string();
|
||||
press(&mut host, id, &mut client, "i");
|
||||
// A coordinate's Enter composes a rename since improvise-fdk1, so its
|
||||
// editor is a door rather than a black hole.
|
||||
if kind.starts_with("Some(Coordinate") {
|
||||
coordinates += 1;
|
||||
assert!(
|
||||
client.state().view.mode.is_editing(),
|
||||
"column {col} ({kind}): a coordinate's editor must open"
|
||||
);
|
||||
press(&mut host, id, &mut client, "Escape");
|
||||
continue;
|
||||
}
|
||||
assert_ne!(
|
||||
client.state().view.status_msg,
|
||||
"\u{0}unsaid",
|
||||
@@ -495,6 +507,10 @@ fn the_tile_bar_route_into_records_mode_does_not_strand_the_user() {
|
||||
client cannot commit — an Enter that is a black hole"
|
||||
);
|
||||
}
|
||||
assert!(
|
||||
coordinates > 0 && coordinates < cols,
|
||||
"the walk must cover both a coordinate and a declined column"
|
||||
);
|
||||
}
|
||||
|
||||
// ── Ctrl-S, all the way to storage (improvise-jz6w) ─────────────────────
|
||||
|
||||
Reference in New Issue
Block a user