raylib: add confirmation dialog (#36252)

* conf

* update case

* fix

* fix

* rm

* back

* alread setup

* avail
pull/36254/head
Shane Smiskol 3 days ago committed by GitHub
parent 7b2b10bc9e
commit 9670e3a5eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 25
      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,
}

Loading…
Cancel
Save