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

fix(tests): differentiate passed vs new testcases

This commit is contained in:
matejcik 2023-02-27 12:06:07 +01:00 committed by matejcik
parent 1e44f712e2
commit be920d7cec

View File

@ -350,10 +350,10 @@ def passed(result: TestResult) -> Path:
def missing(result: TestResult) -> Path:
"""Generate an HTML file for a newly seen test-case."""
return recorded(result, header="New testcase")
return recorded(result, header="New testcase", dir="new")
def recorded(result: TestResult, header: str = "Recorded") -> Path:
def recorded(result: TestResult, header: str = "Recorded", dir: str = "passed") -> Path:
"""Generate an HTML file for a passed test-case.
Shows all the screens from it in exact order.
@ -371,6 +371,6 @@ def recorded(result: TestResult, header: str = "Recorded") -> Path:
for screen in result.images:
with tr():
html.image_column(screen, TESTREPORT_PATH / "new")
html.image_column(screen, TESTREPORT_PATH / dir)
return html.write(TESTREPORT_PATH / "new", doc, result.test.id + ".html")
return html.write(TESTREPORT_PATH / dir, doc, result.test.id + ".html")