test: verify approved panel minimum and native toolbar outputs

This commit is contained in:
阿白叔 committed 2026-10-11 11:56:34 +08:00
1 parent f00dee7791
commit c96a27c033
4 files changed
+192 -7

No files matched your search

+2 -1
View File
@@ -32,7 +32,8 @@ def main():
assert bounds[3] * 96 / dpi <= 46, (bounds, dpi)
assert win32gui.GetWindowLong(handle, -20) & 0x8
buttons = [button.rectangle() for button in ui.toolbar.descendants(control_type="Button")]
assert len({(rect.top, rect.bottom) for rect in buttons}) == 1, buttons
centers = [(rect.top + rect.bottom) / 2 for rect in buttons]
assert max(centers) - min(centers) <= 2, buttons
ui.toolbar.capture_as_image().save(str(evidence / "toolbar.png"))
if ui.panel.exists(timeout=0.2) and ui.panel.is_visible():
ui.collapse()