mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Popup-in-popup (draft)
This commit is contained in:
@@ -17,6 +17,14 @@ pub struct Node<'tree> {
|
||||
pub(crate) queue: &'tree EventQueue,
|
||||
}
|
||||
|
||||
impl PartialEq for Node<'_> {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.accesskit_node.id() == other.accesskit_node.id()
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for Node<'_> {}
|
||||
|
||||
impl Debug for Node<'_> {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
debug_fmt_node(self, f)
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user