mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-30 12:48:46 +00:00
chore(core/mercury): fix UI test for everstake
[no changelog]
This commit is contained in:
parent
ba8f0ea4bc
commit
3de7256103
@ -459,7 +459,6 @@ def test_signtx_data_pagination(client: Client, flow):
|
|||||||
_sign_tx_call()
|
_sign_tx_call()
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skip_t3t1(reason="Not yet implemented in new UI")
|
|
||||||
@pytest.mark.skip_t1b1("T1 does not support Everstake")
|
@pytest.mark.skip_t1b1("T1 does not support Everstake")
|
||||||
@parametrize_using_common_fixtures("ethereum/sign_tx_staking.json")
|
@parametrize_using_common_fixtures("ethereum/sign_tx_staking.json")
|
||||||
@pytest.mark.parametrize("chunkify", (True, False))
|
@pytest.mark.parametrize("chunkify", (True, False))
|
||||||
|
@ -499,7 +499,9 @@ class EthereumFlow:
|
|||||||
self,
|
self,
|
||||||
info: bool = False,
|
info: bool = False,
|
||||||
) -> BRGeneratorType:
|
) -> BRGeneratorType:
|
||||||
yield
|
br = yield
|
||||||
|
assert br.code == B.SignTx
|
||||||
|
assert br.name == "confirm_ethereum_staking_tx"
|
||||||
TR.assert_equals_multiple(
|
TR.assert_equals_multiple(
|
||||||
self.debug.wait_layout().title(),
|
self.debug.wait_layout().title(),
|
||||||
[
|
[
|
||||||
@ -516,7 +518,7 @@ class EthereumFlow:
|
|||||||
"ethereum__staking_claim_intro",
|
"ethereum__staking_claim_intro",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
if self.client.model in (models.T2T1, models.T3T1):
|
if self.client.model in (models.T2T1, ):
|
||||||
# confirm intro
|
# confirm intro
|
||||||
if info:
|
if info:
|
||||||
self.debug.click(buttons.CORNER_BUTTON, wait=True)
|
self.debug.click(buttons.CORNER_BUTTON, wait=True)
|
||||||
@ -532,7 +534,7 @@ class EthereumFlow:
|
|||||||
yield
|
yield
|
||||||
|
|
||||||
# confirm summary
|
# confirm summary
|
||||||
if info and self.client.model != models.T3T1:
|
if info:
|
||||||
self.debug.press_info(wait=True)
|
self.debug.press_info(wait=True)
|
||||||
TR.assert_in(
|
TR.assert_in(
|
||||||
self.debug.wait_layout().text_content(), "ethereum__gas_limit"
|
self.debug.wait_layout().text_content(), "ethereum__gas_limit"
|
||||||
@ -545,7 +547,46 @@ class EthereumFlow:
|
|||||||
yield
|
yield
|
||||||
|
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
else:
|
elif self.client.model in (models.T3T1,):
|
||||||
|
# confirm intro
|
||||||
|
if info:
|
||||||
|
self.debug.click(buttons.CORNER_BUTTON, wait=True)
|
||||||
|
self.debug.synchronize_at("VerticalMenu")
|
||||||
|
self.debug.click(buttons.VERTICAL_MENU[0], wait=True)
|
||||||
|
TR.assert_equals_multiple(
|
||||||
|
self.debug.wait_layout().title(),
|
||||||
|
[
|
||||||
|
"ethereum__staking_stake_address",
|
||||||
|
"ethereum__staking_claim_address",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
self.debug.click(buttons.CORNER_BUTTON, wait=True)
|
||||||
|
self.debug.click(buttons.CORNER_BUTTON, wait=True)
|
||||||
|
|
||||||
|
self.debug.swipe_up()
|
||||||
|
br = yield
|
||||||
|
assert br.code == B.SignTx
|
||||||
|
assert br.name == "confirm_total"
|
||||||
|
|
||||||
|
# confirm summary
|
||||||
|
if info:
|
||||||
|
self.debug.click(buttons.CORNER_BUTTON, wait=True)
|
||||||
|
self.debug.synchronize_at("VerticalMenu")
|
||||||
|
self.debug.click(buttons.VERTICAL_MENU[0], wait=True)
|
||||||
|
TR.assert_in(
|
||||||
|
self.debug.wait_layout().text_content(), "ethereum__gas_limit"
|
||||||
|
)
|
||||||
|
TR.assert_in(
|
||||||
|
self.debug.wait_layout().text_content(), "ethereum__gas_price"
|
||||||
|
)
|
||||||
|
self.debug.click(buttons.CORNER_BUTTON, wait=True)
|
||||||
|
self.debug.click(buttons.CORNER_BUTTON, wait=True)
|
||||||
|
self.debug.swipe_up()
|
||||||
|
# br = yield # FIXME: no BR on sign transaction
|
||||||
|
|
||||||
|
self.debug.press_yes()
|
||||||
|
|
||||||
|
elif self.client.model in (models.T2B1, models.T3B1, ):
|
||||||
# confirm intro
|
# confirm intro
|
||||||
if info:
|
if info:
|
||||||
self.debug.press_right(wait=True)
|
self.debug.press_right(wait=True)
|
||||||
@ -576,3 +617,5 @@ class EthereumFlow:
|
|||||||
yield
|
yield
|
||||||
|
|
||||||
self.debug.press_yes()
|
self.debug.press_yes()
|
||||||
|
else:
|
||||||
|
raise ValueError("Unknown model!")
|
||||||
|
Loading…
Reference in New Issue
Block a user