mirror of
https://github.com/logos-blockchain/lez-programs.git
synced 2026-08-26 14:41:12 +00:00
feat(wallet): humanize shared wallet experience
Consolidate wallet account decoding and portfolio handling around the shared Rust IDL decoder. Simplify AMM wallet integration, remove obsolete caches and network plumbing, and cover account selection and live flows.
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
import QtQuick
|
||||
import QtTest
|
||||
|
||||
import Logos.Wallet as Wallet
|
||||
|
||||
Item {
|
||||
id: root
|
||||
|
||||
width: 360
|
||||
height: 240
|
||||
|
||||
Component {
|
||||
id: copyButtonComponent
|
||||
|
||||
Wallet.CopyButton {}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: clipboardSinkComponent
|
||||
|
||||
TextEdit {}
|
||||
}
|
||||
|
||||
TestCase {
|
||||
name: "CopyButton"
|
||||
when: windowShown
|
||||
|
||||
function test_copiesText() {
|
||||
const value = "1thX6LZfHDZZKUs92febYZhYRcXddmzfzF2NvTkPNE"
|
||||
const copyButton = createTemporaryObject(copyButtonComponent, root, {
|
||||
"copyText": value,
|
||||
"copyLabel": "Copy address"
|
||||
})
|
||||
const sink = createTemporaryObject(clipboardSinkComponent, root)
|
||||
verify(copyButton, "Copy button exists")
|
||||
verify(sink, "Clipboard sink exists")
|
||||
compare(copyButton.implicitWidth, 36)
|
||||
compare(copyButton.implicitHeight, 36)
|
||||
|
||||
copyButton.click()
|
||||
|
||||
verify(copyButton.copied)
|
||||
sink.paste()
|
||||
tryCompare(sink, "text", value)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user