mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-07-17 12:29:27 +00:00
Add program-neutral wallet access, a stable account model, reusable QML controls, transaction confirmation, submitted-transaction presentation, and isolated contract tests.\n\nRefs #227
44 lines
1.2 KiB
QML
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)
|
|
}
|
|
}
|
|
}
|