Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 153 Lines • ▼ Show 20 Lines | void TestGUI() { | ||||
RemoveWallet(wallet); | RemoveWallet(wallet); | ||||
// Send two transactions, and verify they are added to transaction list. | // Send two transactions, and verify they are added to transaction list. | ||||
SendCoinsDialog sendCoinsDialog(platformStyle.get(), &walletModel); | SendCoinsDialog sendCoinsDialog(platformStyle.get(), &walletModel); | ||||
TransactionTableModel *transactionTableModel = | TransactionTableModel *transactionTableModel = | ||||
walletModel.getTransactionTableModel(); | walletModel.getTransactionTableModel(); | ||||
QCOMPARE(transactionTableModel->rowCount({}), 105); | QCOMPARE(transactionTableModel->rowCount({}), 105); | ||||
TxId txid1 = SendCoins(*wallet.get(), sendCoinsDialog, | TxId txid1 = SendCoins(*wallet.get(), sendCoinsDialog, | ||||
CTxDestination(CKeyID()), 5 * COIN); | CTxDestination(PKHash()), 5 * COIN); | ||||
TxId txid2 = SendCoins(*wallet.get(), sendCoinsDialog, | TxId txid2 = SendCoins(*wallet.get(), sendCoinsDialog, | ||||
CTxDestination(CKeyID()), 10 * COIN); | CTxDestination(PKHash()), 10 * COIN); | ||||
QCOMPARE(transactionTableModel->rowCount({}), 107); | QCOMPARE(transactionTableModel->rowCount({}), 107); | ||||
QVERIFY(FindTx(*transactionTableModel, txid1).isValid()); | QVERIFY(FindTx(*transactionTableModel, txid1).isValid()); | ||||
QVERIFY(FindTx(*transactionTableModel, txid2).isValid()); | QVERIFY(FindTx(*transactionTableModel, txid2).isValid()); | ||||
// Check current balance on OverviewPage | // Check current balance on OverviewPage | ||||
OverviewPage overviewPage(platformStyle.get()); | OverviewPage overviewPage(platformStyle.get()); | ||||
overviewPage.setWalletModel(&walletModel); | overviewPage.setWalletModel(&walletModel); | ||||
QLabel *balanceLabel = overviewPage.findChild<QLabel *>("labelBalance"); | QLabel *balanceLabel = overviewPage.findChild<QLabel *>("labelBalance"); | ||||
▲ Show 20 Lines • Show All 90 Lines • Show Last 20 Lines |