mirror of
https://github.com/storytold/photocraft.git
synced 2026-12-02 06:20:48 +01:00
Test: drive toolbar double-clicks within the click interval (#18744)
This commit is contained in:
1 parent
82cc01b712
commit
1ba9c55f8e
1 file changed
+6
-2
@@ -3,12 +3,16 @@
|
||||
use super::*;
|
||||
use egui::{Modifiers, PointerButton};
|
||||
use egui_kittest::Harness;
|
||||
use egui_kittest::kittest::{NodeT, Queryable};
|
||||
use egui_kittest::kittest::Queryable;
|
||||
|
||||
/// Use 60 Hz frames so two clicks fall inside the double-click interval.
|
||||
fn harness(documents: usize) -> Harness<'static, Box<PhotocraftApp>> {
|
||||
let mut h = Harness::builder().with_size(egui::vec2(1200.0, 1100.0)).with_max_steps(64).build_eframe(move |cc| {
|
||||
let mut h = Harness::builder().with_step_dt(1.0 / 60.0).with_size(egui::vec2(1200.0, 1100.0)).with_max_steps(64).build_eframe(move |cc| {
|
||||
PhotocraftApp::setup_context(&cc.egui_ctx, crate::theme::AppTheme::pro());
|
||||
let mut app = PhotocraftApp::with_context(cc.egui_ctx.clone(), photocraft_engine::Session::new(), crate::Services::default());
|
||||
app.run("prefs.set", json!({"values": {"general.animatedZoom": false}})).expect("disable zoom animation");
|
||||
// Home hides the toolbar, so the empty-document case uses the workspace.
|
||||
app.session.edit_prefs(|prefs| prefs.general.auto_show_home_screen = false);
|
||||
for _ in 0..documents {
|
||||
app.run("file.new", json!({"width": 3000, "height": 2000})).expect("new document");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user