Merge commit '15249ed99' into look-fix/theme

This commit is contained in:
Dylan M. Taylor
2026-11-21 13:22:54 -05:00
2 changed files with 10 additions and 0 deletions
+1
View File
@@ -203,6 +203,7 @@ impl PdfCraftApp {
/// The app over `host` and `services`, with no document open: every queue runs on the host's
/// jobs, so a test passes a host over `ManualJobs` and `ScriptedFiles`.
pub fn with_host(host: Arc<Host>, services: AppServices) -> Self {
crate::icons::register();
let AppServices {
wake,
clipboard,
+9
View File
@@ -44,6 +44,15 @@ fn home_shows_welcome_and_tools() {
assert!(h.query_all_by_role_and_label(egui::accesskit::Role::Button, "Open…").count() >= 2, "Home offers Open");
}
/// Starting the app makes its Home and navigation rail icons available to the renderer.
#[test]
fn app_start_registers_its_icons() {
let _app = crate::control::new_app();
for name in ["file-output", "code-xml", "message-square-text", "files", "text-cursor-input", "paperclip", "signature", "tag"] {
assert!(craft::ui::primitives::has_icon(&craft::behavior::IconId::new(name)), "missing icon {name}");
}
}
/// A side string of the control state's `side_panels` (`tools_side`, `rail_side`).
fn side(h: &mut Harness<'static, PdfCraftApp>, key: &str) -> String {
pdfcraft_ui_egui::side_panels::state(h.state())[key].as_str().unwrap_or_default().to_owned()