From f389d644fcb24f86e08a0fcf072df78aea5b3e77 Mon Sep 17 00:00:00 2001 From: dotCooCoo Date: Sun, 15 Nov 2026 15:57:06 -0800 Subject: [PATCH] Tests: the plain-label paste test changes a graph option before its undo Graph Type options that leave a graph as it is no longer record a step of history, so the test's third undo had nothing to take back. The test now turns on Add Drop Shadow, which redraws the graph and records a step. --- crates/engine/src/tests/clipboard.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/tests/clipboard.rs b/crates/engine/src/tests/clipboard.rs index 519974f33d..0e0bd500c1 100644 --- a/crates/engine/src/tests/clipboard.rs +++ b/crates/engine/src/tests/clipboard.rs @@ -596,8 +596,8 @@ fn a_graph_pasted_without_formatting_keeps_plain_labels_when_drawn_again() { let r = node(&s, p).extras().graph.as_deref().unwrap().rect; let off = [r.x0 - plot.x0 - 10.0, r.y0 - plot.y0 - 20.0, r.x1 - plot.x1 - 10.0, r.y1 - plot.y1 - 20.0]; assert!(off.iter().all(|d| d.abs() < 1e-6), "the plot moves by the offset and keeps its size: {plot:?} → {r:?}"); - s.execute("graph.setType", &json!({"id": p.0, "type": "column"})).unwrap(); - assert_eq!(graph_label_looks(&s, p), pasted, "a change of type draws them the same way"); + s.execute("graph.setType", &json!({"id": p.0, "type": "column", "dropShadow": true})).unwrap(); + assert_eq!(graph_label_looks(&s, p), pasted, "a change of graph type options draws them the same way"); s.execute("edit.undo", &json!({})).unwrap(); s.execute("edit.undo", &json!({})).unwrap();