Skip to content

Fix InvestModalsViewFixesTest timing: accept any valid progress text#782

Merged
dangershony merged 1 commit intomainfrom
fix/invest-modals-test-timing
Apr 24, 2026
Merged

Fix InvestModalsViewFixesTest timing: accept any valid progress text#782
dangershony merged 1 commit intomainfrom
fix/invest-modals-test-timing

Conversation

@dangershony
Copy link
Copy Markdown
Member

Summary

Fix flaky InvestModalsViewFixesTest that always fails because PaymentStatusText assertions expect exact strings that get overwritten by the reactive command synchronous preamble.

Root Cause

ShowInvoice() sets PaymentStatusText then immediately fires PayViaInvoice(). The ReactiveCommand runs synchronously up to its first await - when no wallet exists (clean test profile), EnsureWalletExistsAsync overwrites the text to Creating wallet before the test assertion runs. Same issue on the Lightning tab path.

Fix

Replace exact string assertions with BeOneOf(validProgressStrings) that accept any legitimate progress message. The test still verifies the core invariant: the user sees immediate feedback (not a frozen placeholder).

@dangershony dangershony merged commit 95a636b into main Apr 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant