From 16a8d504e2e98c7f44385ddf3128d583b4d8eb25 Mon Sep 17 00:00:00 2001 From: obrusvit Date: Mon, 28 Oct 2024 12:42:04 +0100 Subject: [PATCH] test(cardano): allow tests with details on mercury --- tests/device_tests/cardano/test_sign_tx.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tests/device_tests/cardano/test_sign_tx.py b/tests/device_tests/cardano/test_sign_tx.py index 5523d93d72..4d9a666594 100644 --- a/tests/device_tests/cardano/test_sign_tx.py +++ b/tests/device_tests/cardano/test_sign_tx.py @@ -21,7 +21,7 @@ from trezorlib.debuglink import LayoutType from trezorlib.debuglink import TrezorClientDebugLink as Client 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 pytestmark = [ @@ -34,12 +34,16 @@ pytestmark = [ def show_details_input_flow(client: Client): yield client.debug.wait_layout() - # Touch screen click vs pressing right for T2B1 - if client.layout_type in (LayoutType.TT, LayoutType.Mercury): + if client.layout_type is LayoutType.TT: SHOW_ALL_BUTTON_POSITION = (143, 167) client.debug.click(SHOW_ALL_BUTTON_POSITION) elif client.layout_type is LayoutType.TR: + # model R - right button for "Show all" 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: raise NotImplementedError # 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) -@pytest.mark.models(skip="mercury", reason="Not yet implemented in new UI") @parametrize_using_common_fixtures("cardano/sign_tx.show_details.json") def test_cardano_sign_tx_show_details(client: Client, parameters, result): response = call_sign_tx(client, parameters, show_details_input_flow, chunkify=True)