mirror of
https://github.com/flipperdevices/flipperzero-firmware.git
synced 2026-03-09 17:57:04 +01:00
35 lines
920 B
Python
35 lines
920 B
Python
import os
|
|
import time
|
|
|
|
import pytest
|
|
from flippigator.case import BaseCase
|
|
from termcolor import colored
|
|
|
|
os.system("color")
|
|
|
|
|
|
@pytest.mark.smoke
|
|
@pytest.mark.gpio
|
|
class TestGpio(BaseCase):
|
|
async def test_gpio_menu(self, nav):
|
|
await nav.gpio.go_into()
|
|
menu_ref = [
|
|
"USB-UART Bridge",
|
|
"GPIO Manual Control",
|
|
"5V on GPIO",
|
|
]
|
|
assert (
|
|
await nav.get_menu_list(
|
|
ref=nav.get_ref_from_list(menu_ref, nav.font_haxrcorp_4089, invert=1)
|
|
)
|
|
== menu_ref
|
|
), "GPIO menu list is wrong"
|
|
|
|
async def test_manual_control(self, nav):
|
|
await nav.gpio.go_into()
|
|
await nav.go_to("GPIO Manual Control")
|
|
await nav.press_ok()
|
|
state = await nav.get_current_state()
|
|
assert "GPIO Output Mode Test" in state, "GPIO Manual Control failed"
|
|
await nav.go_to_main_screen()
|