mirror of
https://github.com/storytold/deckcraft.git
synced 2026-11-29 09:47:30 +01:00
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>
19 lines
731 B
Rust
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}");
|
|
}
|