1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-27 00:28:10 +00:00

tests/ui: omit the red square from screenshots

except the first one on homescreen because it gets rendered only once
This commit is contained in:
Tomas Susanka 2020-01-07 13:36:55 +00:00
parent 23b3a59a5d
commit 30858c4969
2 changed files with 5 additions and 3 deletions

View File

@ -37,9 +37,11 @@ if __debug__:
layout_change_chan = loop.chan()
current_content = None # type: Optional[List[str]]
def screenshot() -> None:
def screenshot() -> bool:
if utils.SAVE_SCREEN or save_screen:
ui.display.save(save_screen_directory + "/refresh-")
return True
return False
def notify_layout_change(layout: ui.Layout) -> None:
global current_content

View File

@ -42,9 +42,9 @@ if __debug__:
from apps.debug import screenshot
def refresh() -> None:
display.bar(Display.WIDTH - 8, 0, 8, 8, 0xF800)
if not screenshot():
display.bar(Display.WIDTH - 8, 0, 8, 8, 0xF800)
display.refresh()
screenshot()
else: