Skip to content

Conversation

TheSecurityDev
Copy link
Contributor

Adds a screenshot test for the openpilot longitudinal control (alpha) toggle and confirmation dialog.

@Copilot Copilot AI review requested due to automatic review settings October 13, 2025 22:40
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a screenshot test case for the openpilot longitudinal control alpha toggle and its confirmation dialog in the UI test suite.

  • Adds car import for CarParams configuration
  • Creates setup function to enable alpha longitudinal control toggle visibility
  • Registers new test case for the confirmation dialog

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines 85 to +87
def setup_settings_developer(click, pm: PubMaster):
CP = car.CarParams()
CP.alphaLongitudinalAvailable = True # show alpha long control toggle
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The CarParams object creation and configuration should be extracted to avoid code duplication if this pattern is used elsewhere in tests. Consider creating a helper function like create_car_params_with_alpha_long().

Suggested change
def setup_settings_developer(click, pm: PubMaster):
CP = car.CarParams()
CP.alphaLongitudinalAvailable = True # show alpha long control toggle
def create_car_params_with_alpha_long():
CP = car.CarParams()
CP.alphaLongitudinalAvailable = True # show alpha long control toggle
return CP
def setup_settings_developer(click, pm: PubMaster):
CP = create_car_params_with_alpha_long()

Copilot uses AI. Check for mistakes.


def setup_openpilot_long_confirmation_dialog(click, pm: PubMaster):
setup_settings_developer(click, pm)
click(2000, 960) # toggle openpilot longitudinal control
Copy link

Copilot AI Oct 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The hardcoded coordinates (2000, 960) make the test brittle. Consider using more descriptive constants or a coordinate mapping system to improve maintainability.

Copilot uses AI. Check for mistakes.

@github-actions github-actions bot added the ui label Oct 13, 2025
Copy link
Contributor

raylib UI Preview

experimental_mode_description : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
openpilot_long_confirmation_dialog : $${\color{cyan}\text{NEW}}$$
settings_developer : $${\color{red}\text{DIFFERENT}}$$
master proposed
diff composite diff
All Screenshots

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant