Add regression tests for Plot Preview toolbar button (fixes #442) (#653)

Squash of PR #653 by @rangoDJ.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rangoDJ
2026-10-11 20:42:14 -04:00
committed by GitHub
co-authored by Claude Opus 5.5
parent ac9483c9c1
commit 90cd443000
2 changed files with 11 additions and 0 deletions
+3
View File
@@ -157,6 +157,9 @@ mod tests {
app.cmdline("pre");
assert_eq!(app.ui.dialog.as_deref(), Some("preview"));
app.ui.dialog = None;
app.start("preview");
assert_eq!(app.ui.dialog.as_deref(), Some("preview"));
app.ui.dialog = None;
let _ = app.run("export", json!({ "format": "svg" }));
let _ = app.run("import", json!({}));
+8
View File
@@ -84,3 +84,11 @@ fn compact_toolbar_overflow_keeps_help_reachable() {
h.run_steps(3);
assert_eq!(h.state().ui.dialog.as_deref(), Some("about"));
}
#[test]
fn toolbar_plot_preview_opens_dialog() {
let mut h = harness(1200.0, 760.0, 1.0, false);
h.get_by_label("Plot Preview").click();
h.run_steps(3);
assert_eq!(h.state().ui.dialog.as_deref(), Some("preview"));
}