Files
deckcraft/crates/ui-egui/src/presenter_tests.rs
T
Zach BerryandClaude Sonnet 5.5 1ca71474a2 [JJ3] show.presenter answers {on, window}
The answer was null. Presenter view is its own window beside the show window,
so window is true; the doc says where it appears.

PowerPoint: Presenter View opens in a separate window on the second display
when the show starts (the Use Presenter View option); same here.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-27 20:34:18 -05:00

19 lines
731 B
Rust

//! JJ3: `show.presenter` answers the setting and where presenter view appears.
#![allow(clippy::unwrap_used, clippy::expect_used)]
use serde_json::json;
use crate::{Services, SlideApp};
use deckcraft_engine::Session;
#[test]
fn show_presenter_answers_on_and_window() {
let mut app = SlideApp::new(Session::with_new(), Services::default());
let v = app.run("show.presenter", json!({"on": true})).unwrap();
assert_eq!(v, json!({"on": true, "window": true}));
let v = app.run("show.presenter", json!({})).unwrap();
assert_eq!(v["on"], false, "no `on` toggles: {v}");
let doc = crate::UI_COMMANDS.iter().find(|c| c.0 == "show.presenter").unwrap().3;
assert!(doc.contains("separate window"), "{doc}");
}