Skip to content

Commit

Permalink
[test] remove MetaScreen from TezosUseCaseAddressConfirmation
Browse files Browse the repository at this point in the history
The MetaScreen metaclass prevent TezosUseCaseAddressConfirmation to
inherit properly UseCaseAddressConfirmation
  • Loading branch information
spalmer25 committed Jul 5, 2024
1 parent 8813b20 commit bd0f6d0
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions test/utils/navigator.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,17 @@
from ragger.backend import BackendInterface
from ragger.firmware import Firmware
from ragger.firmware.touch.screen import MetaScreen
from ragger.firmware.touch.layouts import ChoiceList, TappableCenter
from ragger.firmware.touch.layouts import ChoiceList
from ragger.firmware.touch.use_cases import (
UseCaseHome,
UseCaseSettings,
UseCaseReview,
UseCaseAddressConfirmation
)
from ragger.firmware.touch.positions import Position
from ragger.firmware.touch.positions import (
Position,
STAX_CENTER
)
from ragger.navigator import Navigator, NavInsID, NavIns

from common import TESTS_ROOT_DIR, EMPTY_PATH
Expand Down Expand Up @@ -66,19 +69,15 @@ def send_and_navigate(send: Callable[[], RESPONSE], navigate: Callable[[], None]

return result

class TezosUseCaseAddressConfirmation(UseCaseAddressConfirmation, metaclass=MetaScreen):
class TezosUseCaseAddressConfirmation(UseCaseAddressConfirmation):
"""Extension of UseCaseAddressConfirmation for our app."""

layout_tappable_center = TappableCenter

tappable_center: TappableCenter

@property
def qr_position(self) -> Position:
"""Position of the qr code.
Y-285 = common space shared by buttons under a key displayed on 2 or 3 lines
"""
return Position(self.tappable_center.positions.x, 285)
return Position(STAX_CENTER.x, 285)

def show_qr(self) -> None:
"""Tap to show qr code."""
Expand Down

0 comments on commit bd0f6d0

Please sign in to comment.