mirror of
https://github.com/storytold/egui.git
synced 2026-11-23 02:52:15 +01:00
kittest: mention how to disable the accessibility check in its failure message (#8630)
Broken out of #8617. The panic message now points to `HarnessBuilder::with_accessibility_check(false)`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b689ffde5b
commit
7903bf6c4e
2 files changed
+2
-2
No files matched your search
@@ -36,7 +36,7 @@ impl<State> Harness<'_, State> {
|
||||
let unnamed = self.unnamed_widgets();
|
||||
assert!(
|
||||
unnamed.is_empty(),
|
||||
"{} widget(s) have no accessible name:\n{}",
|
||||
"{} widget(s) lack accessible name. You can disable this check with HarnessBuilder::with_accessibility_check(false). The widgets:\n{}",
|
||||
unnamed.len(),
|
||||
unnamed.join("\n")
|
||||
);
|
||||
|
||||
@@ -14,7 +14,7 @@ fn names_of(harness: &Harness<'_>, role: Role) -> Vec<Option<String>> {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic(expected = "1 widget(s) have no accessible name")]
|
||||
#[should_panic(expected = "1 widget(s) lack accessible name")]
|
||||
fn unnamed_button_fails_the_harness() {
|
||||
let _harness = Harness::new_ui(|ui| {
|
||||
let _ = ui.add(Button::new(""));
|
||||
|
||||
Reference in new issue
Block a user