From 32efef07e00a098fb32d4cc31bb7720734ad7204 Mon Sep 17 00:00:00 2001 From: obrusvit Date: Thu, 3 Oct 2024 16:15:12 +0200 Subject: [PATCH] fix(tests): UI diff mercury timeout status screen [no changelog] --- .../src/ui/model_mercury/component/status_screen.rs | 10 ++++++---- tests/input_flows.py | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/core/embed/rust/src/ui/model_mercury/component/status_screen.rs b/core/embed/rust/src/ui/model_mercury/component/status_screen.rs index a20688e856..b5c8e01dab 100644 --- a/core/embed/rust/src/ui/model_mercury/component/status_screen.rs +++ b/core/embed/rust/src/ui/model_mercury/component/status_screen.rs @@ -149,7 +149,7 @@ impl StatusScreen { icon: Icon, icon_color: Color, circle_color: Color, - dismiss_style: DismissType, + dismiss_type: DismissType, msg: TString<'static>, ) -> Self { Self { @@ -157,7 +157,7 @@ impl StatusScreen { icon, icon_color, circle_color, - dismiss_type: dismiss_style, + dismiss_type, anim: StatusAnimation::default(), msg: Label::new(msg, Alignment::Start, theme::TEXT_NORMAL).vertically_centered(), } @@ -174,11 +174,12 @@ impl StatusScreen { } pub fn new_success_timeout(msg: TString<'static>) -> Self { + let timeout_ms = if !animation_disabled() { TIMEOUT_MS } else { 0 }; Self::new( theme::ICON_SIMPLE_CHECKMARK30, theme::GREEN_LIME, theme::GREEN_LIGHT, - DismissType::Timeout(Timeout::new(TIMEOUT_MS)), + DismissType::Timeout(Timeout::new(timeout_ms)), msg, ) } @@ -194,11 +195,12 @@ impl StatusScreen { } pub fn new_neutral_timeout(msg: TString<'static>) -> Self { + let timeout_ms = if !animation_disabled() { TIMEOUT_MS } else { 0 }; Self::new( theme::ICON_SIMPLE_CHECKMARK30, theme::GREY_EXTRA_LIGHT, theme::GREY_DARK, - DismissType::Timeout(Timeout::new(TIMEOUT_MS)), + DismissType::Timeout(Timeout::new(timeout_ms)), msg, ) } diff --git a/tests/input_flows.py b/tests/input_flows.py index 0b543751d3..50f2e24805 100644 --- a/tests/input_flows.py +++ b/tests/input_flows.py @@ -663,7 +663,7 @@ class InputFlowShowXpubQRCode(InputFlowBase): layout = self.debug.swipe_up() self.debug.synchronize_at("PromptScreen") # tap to confirm - self.debug.press_yes() + self.debug.click(buttons.TAP_TO_CONFIRM) class InputFlowPaymentRequestDetails(InputFlowBase):