ui(dsh): use sliding intervention switch and clarify automatic repair
Core regression / Python core and release configuration (push) Successful in 24s
Core regression / JavaScript syntax (push) Successful in 3s
Core regression / Python core and release configuration (pull_request) Successful in 15s
Core regression / JavaScript syntax (pull_request) Successful in 3s
Core regression / Python core and release configuration (push) Successful in 24s
Core regression / JavaScript syntax (push) Successful in 3s
Core regression / Python core and release configuration (pull_request) Successful in 15s
Core regression / JavaScript syntax (pull_request) Successful in 3s
This commit is contained in:
1 parent
e28c6d0d6e
commit
389fc917b9
5 files changed
+79
-4
No files matched your search
@@ -145,6 +145,22 @@ def test_auto_intervention_toggle_persists_and_disabled_errors_do_not_enqueue(ui
|
||||
reopened.close()
|
||||
|
||||
|
||||
def test_intervention_switch_has_colored_track_and_supports_keyboard(ui, qtbot):
|
||||
from PySide6.QtCore import QPoint
|
||||
switch = ui.window.auto_intervention_check
|
||||
def track_color():
|
||||
image = switch.grab().toImage()
|
||||
scale = image.devicePixelRatio()
|
||||
return image.pixelColor(round((switch.width() - 38) * scale), round(switch.height() / 2 * scale))
|
||||
green = track_color()
|
||||
assert green.green() > green.red() + 30
|
||||
qtbot.mouseClick(switch, Qt.MouseButton.LeftButton, pos=QPoint(switch.width() - 5, switch.height() // 2))
|
||||
assert not switch.isChecked()
|
||||
switch.setFocus()
|
||||
qtbot.keyClick(switch, Qt.Key.Key_Space)
|
||||
assert switch.isChecked()
|
||||
|
||||
|
||||
def test_taskless_error_automatically_queues_diagnosis(ui):
|
||||
window = ui.window
|
||||
window._task_id = None
|
||||
|
||||
Reference in new issue
Block a user