1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-29 10:58:21 +00:00

fixup! feat(tests): simplify asserts on translated strings

This commit is contained in:
matejcik 2024-11-20 14:04:45 +01:00
parent f9218ae59e
commit 18f0557f95
3 changed files with 464 additions and 453 deletions

View File

@ -153,8 +153,7 @@ def test_tutorial_menu_funfact(device_handler: "BackgroundDeviceHandler"):
layout = debug.click(buttons.CORNER_BUTTON) layout = debug.click(buttons.CORNER_BUTTON)
assert TR.tutorial__did_you_know in layout.text_content() assert TR.tutorial__did_you_know in layout.text_content()
layout = debug.click(buttons.VERTICAL_MENU[0]) layout = debug.click(buttons.VERTICAL_MENU[0])
text_content = [s.replace("\n", " ") for s in TR.tutorial__first_wallet] assert layout.text_content() in TR.tutorial__first_wallet.replace("\n", " ")
assert layout.text_content() in text_content
layout = debug.click(buttons.CORNER_BUTTON) layout = debug.click(buttons.CORNER_BUTTON)
assert TR.tutorial__did_you_know in layout.text_content() assert TR.tutorial__did_you_know in layout.text_content()

View File

@ -629,7 +629,7 @@ class InputFlowShowXpubQRCode(InputFlowBase):
br = yield br = yield
layout = self.debug.read_layout() layout = self.debug.read_layout()
assert layout.title() in (TR.address__public_key, ["XPUB"]) assert layout.title() in (TR.address__public_key, "XPUB")
self.debug.click(buttons.CORNER_BUTTON) self.debug.click(buttons.CORNER_BUTTON)
assert "VerticalMenu" in self.all_components() assert "VerticalMenu" in self.all_components()

File diff suppressed because it is too large Load Diff