From 74eac3a82fc948467d5a15a5af420b36ce8eb04a Mon Sep 17 00:00:00 2001 From: furszy Date: Wed, 14 Dec 2022 10:52:33 -0300 Subject: test: add coverage for 'useAvailableBalance' functionality The following cases were covered: Case 1: No coin control selected coins. - 'useAvailableBalance' should fill the amount edit box with the total available balance. Case 2: With coin control selected coins. - 'useAvailableBalance' should fill the amount edit box with the sum of the selected coins values. --- src/qt/sendcoinsdialog.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/qt/sendcoinsdialog.h') diff --git a/src/qt/sendcoinsdialog.h b/src/qt/sendcoinsdialog.h index 2fcdf5b32a..ac05cd98e5 100644 --- a/src/qt/sendcoinsdialog.h +++ b/src/qt/sendcoinsdialog.h @@ -49,6 +49,9 @@ public: void pasteEntry(const SendCoinsRecipient &rv); bool handlePaymentRequest(const SendCoinsRecipient &recipient); + // Only used for testing-purposes + wallet::CCoinControl* getCoinControl() { return m_coin_control.get(); } + public Q_SLOTS: void clear(); void reject() override; -- cgit v1.2.3