mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Report image alt text as text if widget contains no other text (#7142)
- Same as https://github.com/emilk/egui/pull/7136 but now for atomics
This commit is contained in:
14
tests/egui_tests/tests/regression_tests.rs
Normal file
14
tests/egui_tests/tests/regression_tests.rs
Normal file
@@ -0,0 +1,14 @@
|
||||
use egui::{include_image, Image};
|
||||
use egui_kittest::kittest::Queryable as _;
|
||||
use egui_kittest::Harness;
|
||||
|
||||
#[test]
|
||||
fn image_button_should_have_alt_text() {
|
||||
let harness = Harness::new_ui(|ui| {
|
||||
_ = ui.button(
|
||||
Image::new(include_image!("../../../crates/eframe/data/icon.png")).alt_text("Egui"),
|
||||
);
|
||||
});
|
||||
|
||||
harness.get_by_label("Egui");
|
||||
}
|
||||
Reference in New Issue
Block a user