Skip to content

Commit

Permalink
fix(tests): show final StatusScreen in UI tests
Browse files Browse the repository at this point in the history
[no changelog]
  • Loading branch information
obrusvit committed Oct 3, 2024
1 parent 644b663 commit b88f7e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions core/embed/rust/src/ui/model_mercury/component/status_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,15 +149,15 @@ impl StatusScreen {
icon: Icon,
icon_color: Color,
circle_color: Color,
dismiss_style: DismissType,
dismiss_type: DismissType,
msg: TString<'static>,
) -> Self {
Self {
area: Rect::zero(),
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(),
}
Expand All @@ -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,
)
}
Expand All @@ -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,
)
}
Expand Down
2 changes: 1 addition & 1 deletion tests/input_flows.py
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ def input_flow_t3t1(self) -> BRGeneratorType:
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):
Expand Down

0 comments on commit b88f7e8

Please sign in to comment.