From 9670e3a5eb4add3a26a7875d455b6101d4bfcebe Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Fri, 3 Oct 2025 17:34:53 -0700 Subject: [PATCH] raylib: add confirmation dialog (#36252) * conf * update case * fix * fix * rm * back * alread setup * avail --- .../ui/tests/test_ui/raylib_screenshots.py | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/selfdrive/ui/tests/test_ui/raylib_screenshots.py b/selfdrive/ui/tests/test_ui/raylib_screenshots.py index acb317cbaa..d7e08112b2 100755 --- a/selfdrive/ui/tests/test_ui/raylib_screenshots.py +++ b/selfdrive/ui/tests/test_ui/raylib_screenshots.py @@ -12,10 +12,12 @@ import pywinctl from cereal import log from cereal import messaging from cereal.messaging import PubMaster +from openpilot.common.basedir import BASEDIR from openpilot.common.params import Params from openpilot.common.prefix import OpenpilotPrefix from openpilot.selfdrive.test.helpers import with_processes from openpilot.selfdrive.selfdrived.alertmanager import set_offroad_alert +from openpilot.system.updated.updated import parse_release_notes TEST_DIR = pathlib.Path(__file__).parent TEST_OUTPUT_DIR = TEST_DIR / "raylib_report" @@ -34,6 +36,10 @@ def setup_settings_device(click, pm: PubMaster): click(100, 100) +def close_settings(click, pm: PubMaster): + click(240, 216) + + def setup_settings_network(click, pm: PubMaster): setup_settings_device(click, pm) click(278, 450) @@ -75,7 +81,22 @@ def setup_offroad_alert(click, pm: PubMaster): set_offroad_alert(alert, True) setup_settings_device(click, pm) - click(240, 216) + close_settings(click, pm) + + +def setup_confirmation_dialog(click, pm: PubMaster): + setup_settings_device(click, pm) + click(1985, 791) # reset calibration + + +def setup_update_available(click, pm: PubMaster): + params = Params() + params.put_bool("UpdateAvailable", True) + params.put("UpdaterNewReleaseNotes", parse_release_notes(BASEDIR)) + description = "0.10.1 / html-release-notes-2 / 7864838 / Oct 03" + params.put("UpdaterCurrentDescription", description) + setup_settings_device(click, pm) + close_settings(click, pm) CASES = { @@ -89,6 +110,8 @@ CASES = { "keyboard": setup_keyboard, "pair_device": setup_pair_device, "offroad_alert": setup_offroad_alert, + "update_available": setup_update_available, + "confirmation_dialog": setup_confirmation_dialog, }