1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Popup-in-popup (draft)

This commit is contained in:
lucasmerlin
2026-01-09 12:01:37 +01:00
parent f8e763378a
commit 5d2ddbfb15
9 changed files with 201 additions and 78 deletions

View File

@@ -1,31 +0,0 @@
use kittest::Queryable as _;
#[test]
fn test_interactive_tooltip() {
struct State {
link_clicked: bool,
}
let mut harness = egui_kittest::Harness::new_ui_state(
|ui, state| {
ui.label("I have a tooltip").on_hover_ui(|ui| {
if ui.link("link").clicked() {
state.link_clicked = true;
}
});
},
State {
link_clicked: false,
},
);
harness.get_by_label_contains("tooltip").hover();
harness.run();
harness.get_by_label("link").hover();
harness.run();
harness.get_by_label("link").click();
harness.run();
assert!(harness.state().link_clicked);
}