mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-25 17:09:44 +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.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)
|
||||
|
Loading…
Reference in New Issue
Block a user