|
|
@ -80,6 +80,9 @@ def test_show_tt(
|
|
|
|
yield
|
|
|
|
yield
|
|
|
|
client.debug.click(CORNER_BUTTON)
|
|
|
|
client.debug.click(CORNER_BUTTON)
|
|
|
|
yield
|
|
|
|
yield
|
|
|
|
|
|
|
|
# synchronize; TODO get rid of this once we have single-global-layout
|
|
|
|
|
|
|
|
client.debug.synchronize_at("HorizontalPage")
|
|
|
|
|
|
|
|
|
|
|
|
client.debug.swipe_left(wait=True)
|
|
|
|
client.debug.swipe_left(wait=True)
|
|
|
|
client.debug.swipe_right(wait=True)
|
|
|
|
client.debug.swipe_right(wait=True)
|
|
|
|
client.debug.swipe_left(wait=True)
|
|
|
|
client.debug.swipe_left(wait=True)
|
|
|
@ -114,6 +117,9 @@ def test_show_cancel(
|
|
|
|
yield
|
|
|
|
yield
|
|
|
|
client.debug.click(CORNER_BUTTON)
|
|
|
|
client.debug.click(CORNER_BUTTON)
|
|
|
|
yield
|
|
|
|
yield
|
|
|
|
|
|
|
|
# synchronize; TODO get rid of this once we have single-global-layout
|
|
|
|
|
|
|
|
client.debug.synchronize_at("HorizontalPage")
|
|
|
|
|
|
|
|
|
|
|
|
client.debug.swipe_left(wait=True)
|
|
|
|
client.debug.swipe_left(wait=True)
|
|
|
|
client.debug.click(CORNER_BUTTON)
|
|
|
|
client.debug.click(CORNER_BUTTON)
|
|
|
|
yield
|
|
|
|
yield
|
|
|
@ -242,8 +248,6 @@ VECTORS_MULTISIG = ( # script_type, bip48_type, address, xpubs, ignore_xpub_mag
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# NOTE: contains wait_layout race that manifests on hw sometimes
|
|
|
|
|
|
|
|
@pytest.mark.flaky(max_runs=5)
|
|
|
|
|
|
|
|
@pytest.mark.skip_t1
|
|
|
|
@pytest.mark.skip_t1
|
|
|
|
@pytest.mark.multisig
|
|
|
|
@pytest.mark.multisig
|
|
|
|
@pytest.mark.parametrize(
|
|
|
|
@pytest.mark.parametrize(
|
|
|
@ -276,7 +280,7 @@ def test_show_multisig_xpubs(
|
|
|
|
|
|
|
|
|
|
|
|
def input_flow():
|
|
|
|
def input_flow():
|
|
|
|
yield # show address
|
|
|
|
yield # show address
|
|
|
|
layout = client.debug.wait_layout() # TODO: do not need to *wait* now?
|
|
|
|
layout = client.debug.wait_layout()
|
|
|
|
assert layout.get_title() == "RECEIVE ADDRESS (MULTISIG)"
|
|
|
|
assert layout.get_title() == "RECEIVE ADDRESS (MULTISIG)"
|
|
|
|
assert layout.get_content().replace(" ", "") == address
|
|
|
|
assert layout.get_content().replace(" ", "") == address
|
|
|
|
|
|
|
|
|
|
|
@ -284,9 +288,8 @@ def test_show_multisig_xpubs(
|
|
|
|
yield # show QR code
|
|
|
|
yield # show QR code
|
|
|
|
assert "Qr" in client.debug.wait_layout().text
|
|
|
|
assert "Qr" in client.debug.wait_layout().text
|
|
|
|
|
|
|
|
|
|
|
|
client.debug.swipe_left()
|
|
|
|
layout = client.debug.swipe_left(wait=True)
|
|
|
|
# address details
|
|
|
|
# address details
|
|
|
|
layout = client.debug.wait_layout()
|
|
|
|
|
|
|
|
assert "Multisig 2 of 3" in layout.text
|
|
|
|
assert "Multisig 2 of 3" in layout.text
|
|
|
|
|
|
|
|
|
|
|
|
# Three xpub pages with the same testing logic
|
|
|
|
# Three xpub pages with the same testing logic
|
|
|
@ -295,8 +298,7 @@ def test_show_multisig_xpubs(
|
|
|
|
"(YOURS)" if i == xpub_num else "(COSIGNER)"
|
|
|
|
"(YOURS)" if i == xpub_num else "(COSIGNER)"
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
client.debug.swipe_left()
|
|
|
|
layout = client.debug.swipe_left(wait=True)
|
|
|
|
layout = client.debug.wait_layout()
|
|
|
|
|
|
|
|
assert layout.get_title() == expected_title
|
|
|
|
assert layout.get_title() == expected_title
|
|
|
|
content = layout.get_content().replace(" ", "")
|
|
|
|
content = layout.get_content().replace(" ", "")
|
|
|
|
assert xpubs[xpub_num] in content
|
|
|
|
assert xpubs[xpub_num] in content
|
|
|
@ -310,8 +312,9 @@ def test_show_multisig_xpubs(
|
|
|
|
client.debug.press_yes()
|
|
|
|
client.debug.press_yes()
|
|
|
|
|
|
|
|
|
|
|
|
with client:
|
|
|
|
with client:
|
|
|
|
client.watch_layout()
|
|
|
|
|
|
|
|
client.set_input_flow(input_flow)
|
|
|
|
client.set_input_flow(input_flow)
|
|
|
|
|
|
|
|
client.debug.synchronize_at("Homescreen")
|
|
|
|
|
|
|
|
client.watch_layout()
|
|
|
|
btc.get_address(
|
|
|
|
btc.get_address(
|
|
|
|
client,
|
|
|
|
client,
|
|
|
|
"Bitcoin",
|
|
|
|
"Bitcoin",
|
|
|
|