Skip to content

Commit 4633611

Browse files
committed
test(core): don't wait on StatusScreen if animation is disabled
[no changelog]
1 parent f331b13 commit 4633611

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

core/embed/rust/src/ui/layout_delizia/component/status_screen.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,12 @@ enum DismissType {
143143
Timeout(Timeout),
144144
}
145145

146+
impl DismissType {
147+
fn limited_timeout(time_ms: u32) -> Self {
148+
Self::Timeout(Timeout::new(if animation_disabled() { 0 } else { time_ms }))
149+
}
150+
}
151+
146152
impl StatusScreen {
147153
fn new(
148154
icon: Icon,
@@ -177,7 +183,7 @@ impl StatusScreen {
177183
theme::ICON_SIMPLE_CHECKMARK30,
178184
theme::GREEN_LIME,
179185
theme::GREEN_LIGHT,
180-
DismissType::Timeout(Timeout::new(time_ms)),
186+
DismissType::limited_timeout(time_ms),
181187
msg,
182188
)
183189
}
@@ -197,7 +203,7 @@ impl StatusScreen {
197203
theme::ICON_SIMPLE_CHECKMARK30,
198204
theme::GREY_EXTRA_LIGHT,
199205
theme::GREY_DARK,
200-
DismissType::Timeout(Timeout::new(TIMEOUT_MS)),
206+
DismissType::limited_timeout(TIMEOUT_MS),
201207
msg,
202208
)
203209
}

core/embed/rust/src/ui/layout_eckhart/firmware/action_bar.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ impl ActionBar {
8787
Mode::Timeout,
8888
None,
8989
Some(button.initially_enabled(false)),
90-
Some(Timeout::new(timeout_ms)),
90+
Some(Timeout::new(if animation_disabled() {
91+
0
92+
} else {
93+
timeout_ms
94+
})),
9195
)
9296
}
9397

tests/input_flows.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,6 @@ def input_flow_eckhart(self) -> BRGeneratorType:
13221322
self.debug.click(self.debug.screen_buttons.vertical_menu_items()[2])
13231323
self.debug.synchronize_at("TextScreen")
13241324
self.debug.click(self.debug.screen_buttons.ok())
1325-
self.debug.click(self.debug.screen_buttons.ok())
13261325

13271326

13281327
class InputFlowSignTxInformationReplacement(InputFlowBase):

0 commit comments

Comments
 (0)