1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-07-01 12:22:34 +00:00

fix(tests): copy actual screens to recorded when accepting UI diff

This commit is contained in:
grdddj 2023-01-18 14:15:33 +01:00
parent 6b7ee55868
commit 84b9f703b4

View File

@ -226,6 +226,12 @@ def update_fixtures_with_diff() -> int:
diff = json.loads(line)
FILE_HASHES[diff["test_name"]] = diff["actual_hash"]
# Copying the recorded screens to "recorded" dir
actual = SCREENS_DIR / diff["test_name"] / "actual"
recorded = SCREENS_DIR / diff["test_name"] / "recorded"
shutil.rmtree(recorded, ignore_errors=True)
shutil.copytree(actual, recorded)
write_fixtures(remove_missing=False)
# Returning the amount of updated hashes