mirror of
https://github.com/meshtastic/firmware.git
synced 2026-06-15 14:56:19 +00:00
de23e5199d
CI / setup (all) (push) Has been cancelled
CI / setup (check) (push) Has been cancelled
CI / version (push) Has been cancelled
CI / check (push) Has been cancelled
CI / build (push) Has been cancelled
CI / build-debian-src (push) Has been cancelled
CI / package-pio-deps-native-tft (push) Has been cancelled
CI / test-native (push) Has been cancelled
CI / docker (alpine, native, linux/amd64) (push) Has been cancelled
CI / docker (alpine, native, linux/arm64) (push) Has been cancelled
CI / docker (alpine, native-tft, linux/amd64) (push) Has been cancelled
CI / docker (debian, native, linux/amd64) (push) Has been cancelled
CI / docker (debian, native, linux/arm/v7) (push) Has been cancelled
CI / docker (debian, native, linux/arm64) (push) Has been cancelled
CI / docker (debian, native-tft, linux/amd64) (push) Has been cancelled
CI / gather-artifacts (esp32) (push) Has been cancelled
CI / gather-artifacts (esp32c3) (push) Has been cancelled
CI / gather-artifacts (esp32c6) (push) Has been cancelled
CI / gather-artifacts (esp32s3) (push) Has been cancelled
CI / gather-artifacts (nrf52840) (push) Has been cancelled
CI / gather-artifacts (rp2040) (push) Has been cancelled
CI / gather-artifacts (rp2350) (push) Has been cancelled
CI / gather-artifacts (stm32) (push) Has been cancelled
CI / shame (push) Has been cancelled
CI / release-artifacts (push) Has been cancelled
CI / release-firmware (esp32) (push) Has been cancelled
CI / release-firmware (esp32c3) (push) Has been cancelled
CI / release-firmware (esp32c6) (push) Has been cancelled
CI / release-firmware (esp32s3) (push) Has been cancelled
CI / release-firmware (nrf52840) (push) Has been cancelled
CI / release-firmware (rp2040) (push) Has been cancelled
CI / release-firmware (rp2350) (push) Has been cancelled
CI / release-firmware (stm32) (push) Has been cancelled
CI / publish-firmware (push) Has been cancelled
* Add USB camera and uhubctl support for new test suite. Also added some bug fixes * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Potential fix for pull request finding Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> * Refactor test messages for clarity and consistency in regex tests --------- Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
52 lines
1.7 KiB
Python
52 lines
1.7 KiB
Python
"""On the nodelist_nodes frame, UP/DOWN scrolls the list via
|
|
`NodeListRenderer::scrollUp/scrollDown` (src/graphics/Screen.cpp:1779-1788).
|
|
The firmware returns 0 before notifying observers, so no frame-change
|
|
log fires. Verify the path doesn't crash and we stay on nodelist_nodes.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
import time
|
|
|
|
import pytest
|
|
from meshtastic_mcp.input_events import InputEventCode
|
|
|
|
from ._screen_log import assert_no_frame_change, get_current_frame, wait_for_frame
|
|
from .conftest import FrameCapture, send_event
|
|
|
|
|
|
@pytest.mark.timeout(180)
|
|
def test_up_down_on_nodelist_no_frame_change(
|
|
ui_port: str,
|
|
frame_capture: FrameCapture,
|
|
request: pytest.FixtureRequest,
|
|
) -> None:
|
|
lines: list[str] = request.node._debug_log_buffer
|
|
frame_capture("initial")
|
|
|
|
# Walk RIGHT until we land on nodelist_nodes.
|
|
for _i in range(15):
|
|
send_event(ui_port, InputEventCode.RIGHT)
|
|
time.sleep(0.3)
|
|
current = get_current_frame(lines)
|
|
if current is not None and current.name == "nodelist_nodes":
|
|
break
|
|
else:
|
|
pytest.skip("couldn't reach nodelist_nodes within 15 RIGHTs")
|
|
|
|
wait_for_frame(lines, "nodelist_nodes", timeout_s=5.0)
|
|
frame_capture("on-nodelist")
|
|
|
|
# UP/DOWN on nodelist scroll internally + `return 0` before
|
|
# notifyObservers — no frame-change log. Verify.
|
|
send_event(ui_port, InputEventCode.UP)
|
|
assert_no_frame_change(lines, wait_s=1.5)
|
|
send_event(ui_port, InputEventCode.DOWN)
|
|
assert_no_frame_change(lines, wait_s=1.5)
|
|
|
|
final = get_current_frame(lines)
|
|
assert (
|
|
final is not None and final.name == "nodelist_nodes"
|
|
), f"UP/DOWN moved us off nodelist_nodes; now on {final!r}"
|
|
frame_capture("after-up-down")
|