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

refactor(tests/ui): use internal names for UI fixtures

This commit is contained in:
matejcik 2024-04-30 12:51:07 +02:00 committed by Ioan Bizău
parent 394a86dd1c
commit 421b2d8db1
3 changed files with 15369 additions and 15375 deletions

View File

@ -17,7 +17,6 @@ import pytest
from PIL import Image
from typing_extensions import Self
from trezorlib import models
from trezorlib.debuglink import TrezorClientDebugLink as Client
LANGUAGES = ["cs", "de", "en", "es", "fr"]
@ -234,17 +233,12 @@ class TestCase:
@classmethod
def build(cls, client: Client, request: pytest.FixtureRequest) -> Self:
model_name = {
models.T1B1: "T1",
models.T2T1: "TT",
models.T2B1: "TR",
}.get(client.model, client.model.internal_name)
name, group = _get_test_name_and_group(request.node.nodeid)
full_language = client.features.language
assert full_language
language = full_language[:2]
return cls(
model=model_name,
model=client.model.internal_name,
name=name,
group=group,
language=language,

File diff suppressed because it is too large Load Diff

View File

@ -63,13 +63,13 @@ tr.bad a:visited {
display: none;
}
.model-T1 img,
.model-TR img {
.model-T1B1 img,
.model-T2B1 img {
image-rendering: pixelated;
width: 256px;
}
.model-TR canvas {
.model-T2B1 canvas {
image-rendering: pixelated;
width: 256px;
}