lez-programs/apps/shared/wallet/tests/qml/tst_SubmittedTransaction.qml
Ricardo Guilherme Schmidt fe979400af
feat(wallet): add reusable wallet modules
Add program-neutral wallet access, a stable account model, reusable QML controls, transaction confirmation, submitted-transaction presentation, and isolated contract tests.\n\nRefs #227
2026-07-15 11:55:39 -03:00

44 lines
1.2 KiB
QML

import QtQuick
import QtTest
import Logos.Wallet as Wallet
Item {
id: root
width: 360
height: 400
Component {
id: resultComponent
Wallet.SubmittedTransaction {
width: 280
}
}
TestCase {
name: "SubmittedTransaction"
when: windowShown
function test_presentsBase58AndCopyFeedback() {
const result = createTemporaryObject(resultComponent, root, {
transactionId: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
})
verify(result, "Submitted result exists")
verify(result.base58Shape)
const label = findChild(result, "submittedTransactionId")
verify(label, "Transaction label exists")
compare(label.text, result.transactionId)
verify(label.implicitHeight > 0)
const copyButton = findChild(result, "copySubmittedTransactionButton")
verify(copyButton, "Copy button exists")
mouseClick(copyButton)
verify(copyButton.copied)
result.transactionId = "0OIl"
verify(!result.base58Shape)
}
}
}