egui/crates/egui_kittest/tests
Lucas Meurer 6d312cc4c7
Add support for scrolling via accesskit / kittest (#7286)
I need to scroll in a snapshot test in my app, and kittest had no
utilities for this. Event::MouseWheel is error prone. This adds support
for some accesskit scroll actions, and uses this in kittest to add
helpers to scroll to a node / scroll the scroll area surrounding a node.

The accesskit code says down/up/left/right `Scrolls by approximately one
screen in a specific direction.`. Unfortunately it's difficult to get
the size of a "screen" (I guess that would be the size of the containing
scroll area)where I implemented the scrolling, so for now I've hardcoded
it to 100px. I think scrolling a fixed amount is still better than not
scrolling at all.

---------

Co-authored-by: Emil Ernerfeldt <emil.ernerfeldt@gmail.com>
2025-07-03 12:02:05 +02:00
..
snapshots Add support for scrolling via accesskit / kittest (#7286) 2025-07-03 12:02:05 +02:00
accesskit.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
menu.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
popup.rs Create custom `egui_kittest::Node` (#7138) 2025-06-17 12:17:38 +02:00
regression_tests.rs Use Rust edition 2024 (#7280) 2025-06-30 14:01:57 +02:00
tests.rs Add support for scrolling via accesskit / kittest (#7286) 2025-07-03 12:02:05 +02:00