Ribbon height test: check the master tab is the one shown

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Dylan M. Taylor
2026-11-30 16:54:06 +00:00
co-authored by Claude Opus 5.5
parent 5f87b680dd
commit d44cee711c
+3 -1
View File
@@ -269,7 +269,7 @@ mod popup_tests;
#[cfg(test)]
mod height_tests {
use deckcraft_engine::Session;
use egui_kittest::kittest::Queryable;
use egui_kittest::kittest::{NodeT, Queryable};
use serde_json::json;
use super::{TabKey, tab_entries};
@@ -304,6 +304,8 @@ mod height_tests {
h.state_mut().session.execute(view, &json!({})).unwrap();
h.state_mut().ui.tab = tab.into();
h.run_steps(3);
let selected = h.get_by_role_and_label(egui::accesskit::Role::Tab, tab).accesskit_node().is_selected();
assert_eq!(selected, Some(true), "{tab} is the shown tab, not a fallback to Home");
let shown = ribbon(&h);
assert_eq!((shown.top(), shown.bottom()), (home.top(), home.bottom()), "{tab} keeps Home's ribbon height");
h.state_mut().session.execute("view.closeMaster", &json!({})).unwrap();