Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/wallettests.cpp
Show First 20 Lines • Show All 216 Lines • ▼ Show 20 Lines | for (QWidget *widget : QApplication::topLevelWidgets()) { | ||||
if (widget->inherits("ReceiveRequestDialog")) { | if (widget->inherits("ReceiveRequestDialog")) { | ||||
ReceiveRequestDialog *receiveRequestDialog = | ReceiveRequestDialog *receiveRequestDialog = | ||||
qobject_cast<ReceiveRequestDialog *>(widget); | qobject_cast<ReceiveRequestDialog *>(widget); | ||||
QTextEdit *rlist = | QTextEdit *rlist = | ||||
receiveRequestDialog->QObject::findChild<QTextEdit *>("outUri"); | receiveRequestDialog->QObject::findChild<QTextEdit *>("outUri"); | ||||
QString paymentText = rlist->toPlainText(); | QString paymentText = rlist->toPlainText(); | ||||
QStringList paymentTextList = paymentText.split('\n'); | QStringList paymentTextList = paymentText.split('\n'); | ||||
QCOMPARE(paymentTextList.at(0), QString("Payment information")); | QCOMPARE(paymentTextList.at(0), QString("Payment information")); | ||||
QVERIFY(paymentTextList.at(1).indexOf(QString("URI: bchreg:")) != | QVERIFY(paymentTextList.at(1).indexOf(QString("URI: abcreg:")) != | ||||
-1); | -1); | ||||
QVERIFY(paymentTextList.at(2).indexOf(QString("Address:")) != -1); | QVERIFY(paymentTextList.at(2).indexOf(QString("Address:")) != -1); | ||||
QCOMPARE(paymentTextList.at(3), | QCOMPARE(paymentTextList.at(3), | ||||
QString("Amount: 0.00000001 ") + | QString("Amount: 0.00000001 ") + | ||||
QString::fromStdString(CURRENCY_UNIT)); | QString::fromStdString(CURRENCY_UNIT)); | ||||
QCOMPARE(paymentTextList.at(4), QString("Label: TEST_LABEL_1")); | QCOMPARE(paymentTextList.at(4), QString("Label: TEST_LABEL_1")); | ||||
QCOMPARE(paymentTextList.at(5), QString("Message: TEST_MESSAGE_1")); | QCOMPARE(paymentTextList.at(5), QString("Message: TEST_MESSAGE_1")); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 42 Lines • Show Last 20 Lines |