mirror of
https://github.com/Retropex/bitcoin.git
synced 2025-05-29 13:32:33 +02:00
[test] qt: add send screen balance test
This commit is contained in:
parent
0ee914ba9e
commit
2689c8fd71
@ -170,6 +170,16 @@ void TestGUI(interfaces::Node& node)
|
|||||||
sendCoinsDialog.setModel(&walletModel);
|
sendCoinsDialog.setModel(&walletModel);
|
||||||
transactionView.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.
|
// Send two transactions, and verify they are added to transaction list.
|
||||||
TransactionTableModel* transactionTableModel = walletModel.getTransactionTableModel();
|
TransactionTableModel* transactionTableModel = walletModel.getTransactionTableModel();
|
||||||
QCOMPARE(transactionTableModel->rowCount({}), 105);
|
QCOMPARE(transactionTableModel->rowCount({}), 105);
|
||||||
|
Loading…
Reference in New Issue
Block a user