mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
test(cardano): allow tests with details on mercury
This commit is contained in:
parent
f746993ca6
commit
16a8d504e2
@ -21,7 +21,7 @@ from trezorlib.debuglink import LayoutType
|
|||||||
from trezorlib.debuglink import TrezorClientDebugLink as Client
|
from trezorlib.debuglink import TrezorClientDebugLink as Client
|
||||||
from trezorlib.exceptions import TrezorFailure
|
from trezorlib.exceptions import TrezorFailure
|
||||||
|
|
||||||
from ...common import parametrize_using_common_fixtures
|
from ...common import buttons, parametrize_using_common_fixtures
|
||||||
from ...input_flows import InputFlowConfirmAllWarnings
|
from ...input_flows import InputFlowConfirmAllWarnings
|
||||||
|
|
||||||
pytestmark = [
|
pytestmark = [
|
||||||
@ -34,12 +34,16 @@ pytestmark = [
|
|||||||
def show_details_input_flow(client: Client):
|
def show_details_input_flow(client: Client):
|
||||||
yield
|
yield
|
||||||
client.debug.wait_layout()
|
client.debug.wait_layout()
|
||||||
# Touch screen click vs pressing right for T2B1
|
if client.layout_type is LayoutType.TT:
|
||||||
if client.layout_type in (LayoutType.TT, LayoutType.Mercury):
|
|
||||||
SHOW_ALL_BUTTON_POSITION = (143, 167)
|
SHOW_ALL_BUTTON_POSITION = (143, 167)
|
||||||
client.debug.click(SHOW_ALL_BUTTON_POSITION)
|
client.debug.click(SHOW_ALL_BUTTON_POSITION)
|
||||||
elif client.layout_type is LayoutType.TR:
|
elif client.layout_type is LayoutType.TR:
|
||||||
|
# model R - right button for "Show all"
|
||||||
client.debug.press_yes()
|
client.debug.press_yes()
|
||||||
|
elif client.layout_type is LayoutType.Mercury:
|
||||||
|
# mercury - "Show all" button from context menu
|
||||||
|
client.debug.click(buttons.CORNER_BUTTON)
|
||||||
|
client.debug.click(buttons.VERTICAL_MENU[0])
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError
|
raise NotImplementedError
|
||||||
# reset ui flow to continue "automatically"
|
# reset ui flow to continue "automatically"
|
||||||
@ -63,7 +67,6 @@ def test_cardano_sign_tx(client: Client, parameters, result):
|
|||||||
assert response == _transform_expected_result(result)
|
assert response == _transform_expected_result(result)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.models(skip="mercury", reason="Not yet implemented in new UI")
|
|
||||||
@parametrize_using_common_fixtures("cardano/sign_tx.show_details.json")
|
@parametrize_using_common_fixtures("cardano/sign_tx.show_details.json")
|
||||||
def test_cardano_sign_tx_show_details(client: Client, parameters, result):
|
def test_cardano_sign_tx_show_details(client: Client, parameters, result):
|
||||||
response = call_sign_tx(client, parameters, show_details_input_flow, chunkify=True)
|
response = call_sign_tx(client, parameters, show_details_input_flow, chunkify=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user