mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-24 10:37:03 -06:00
Replace Fonts test: a window wide enough to hold Home's ribbon
Home's ribbon has grown since the test was written. At the harness's 1400x900 the Editing group starts at x=1398, so the Replace Fonts button is two pixels wide on screen and a click at its centre lands outside the window: the button is found and enabled, but never clicked, and the dialog assertion fails. The ribbon does not scroll sideways, so the window has to hold it; 1800x1100 is what the other full-ribbon tests here use. cargo xtask ci fails at `test` on main without this.
This commit is contained in:
@@ -15,7 +15,11 @@ fn harness() -> Harness<'static, SlideApp> {
|
||||
s.execute("format.font", &json!({"family": "Comic Neue"})).unwrap();
|
||||
s.execute("format.size", &json!({"size": 40})).unwrap();
|
||||
let app = SlideApp::new(s, Services::default());
|
||||
let mut h = Harness::builder().with_size(egui::vec2(1400.0, 900.0)).with_step_dt(1.0 / 60.0).build_ui_state(
|
||||
// Home's ribbon is wider than it was when this test was written: at 1400 the Editing group
|
||||
// begins at x=1398, so the Replace Fonts button is two pixels wide on screen and a click at
|
||||
// its centre lands outside the window. The ribbon does not scroll sideways, so the window has
|
||||
// to be wide enough to hold it -- 1800 is what the other full-ribbon tests here use.
|
||||
let mut h = Harness::builder().with_size(egui::vec2(1800.0, 1100.0)).with_step_dt(1.0 / 60.0).build_ui_state(
|
||||
|ui, app: &mut SlideApp| {
|
||||
app.logic(ui.ctx());
|
||||
app.ui(ui);
|
||||
|
||||
Reference in New Issue
Block a user