mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
[test] qt: add send screen balance test
This commit is contained in:
parent
0ee914ba9e
commit
2689c8fd71
1 changed files with 10 additions and 0 deletions
|
@ -170,6 +170,16 @@ void TestGUI(interfaces::Node& node)
|
|||
sendCoinsDialog.setModel(&walletModel);
|
||||
transactionView.setModel(&walletModel);
|
||||
|
||||
{
|
||||
// Check balance in send dialog
|
||||
QLabel* balanceLabel = sendCoinsDialog.findChild<QLabel*>("labelBalance");
|
||||
QString balanceText = balanceLabel->text();
|
||||
int unit = walletModel.getOptionsModel()->getDisplayUnit();
|
||||
CAmount balance = walletModel.wallet().getBalance();
|
||||
QString balanceComparison = BitcoinUnits::formatWithUnit(unit, balance, false, BitcoinUnits::separatorAlways);
|
||||
QCOMPARE(balanceText, balanceComparison);
|
||||
}
|
||||
|
||||
// Send two transactions, and verify they are added to transaction list.
|
||||
TransactionTableModel* transactionTableModel = walletModel.getTransactionTableModel();
|
||||
QCOMPARE(transactionTableModel->rowCount({}), 105);
|
||||
|
|
Loading…
Reference in a new issue