Skip to content

Commit 0611703

Browse files
committed
qml, test: add password wallet functional coverage
1 parent 535712c commit 0611703

16 files changed

Lines changed: 553 additions & 7 deletions

qml/components/BitcoinAddressInputField.qml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ ColumnLayout {
1616
property string errorText: ""
1717
property string labelText: qsTr("Send to")
1818
property bool enabled: true
19+
property alias text: addressInput.text
20+
property string inputObjectName: ""
1921

2022
signal editingFinished()
2123

@@ -40,6 +42,7 @@ ColumnLayout {
4042

4143
TextArea {
4244
id: addressInput
45+
objectName: root.inputObjectName
4346
anchors.left: label.right
4447
anchors.right: parent.right
4548
anchors.top: parent.top

qml/components/WalletMigrationPopup.qml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,20 @@ import "../controls"
1111
Popup {
1212
id: root
1313

14+
property string popupObjectName: ""
1415
property string titleText: qsTr("Wallet update required")
1516
property string descriptionText: ""
1617
property string confirmText: qsTr("Update wallet")
1718
property string busyConfirmText: qsTr("Updating...")
1819
property string errorText: ""
20+
property string errorTextObjectName: ""
21+
property string cancelButtonObjectName: ""
22+
property string confirmButtonObjectName: ""
1923
property bool busy: false
2024

2125
signal confirmed()
2226

27+
objectName: popupObjectName
2328
modal: true
2429
padding: 0
2530
implicitWidth: 420
@@ -62,6 +67,7 @@ Popup {
6267
}
6368

6469
CoreText {
70+
objectName: root.errorTextObjectName
6571
Layout.fillWidth: true
6672
Layout.leftMargin: 20
6773
Layout.rightMargin: 20
@@ -80,6 +86,7 @@ Popup {
8086
spacing: 15
8187

8288
OutlineButton {
89+
objectName: root.cancelButtonObjectName
8390
Layout.fillWidth: true
8491
Layout.minimumWidth: 120
8592
enabled: !root.busy
@@ -88,6 +95,7 @@ Popup {
8895
}
8996

9097
ContinueButton {
98+
objectName: root.confirmButtonObjectName
9199
Layout.fillWidth: true
92100
Layout.minimumWidth: 120
93101
enabled: !root.busy

qml/pages/wallet/Activity.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ PageStack {
3232

3333
header: CoreText {
3434
id: title
35+
objectName: "walletActivityTitle"
3536
horizontalAlignment: Text.AlignLeft
3637
text: qsTr("Activity")
3738
font.pixelSize: 21

qml/pages/wallet/CreateBackup.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Page {
6262
}
6363

6464
ContinueButton {
65+
objectName: "createWalletBackupViewFileButton"
6566
Layout.preferredWidth: Math.min(300, parent.width - 2 * Layout.leftMargin)
6667
Layout.topMargin: 30
6768
Layout.leftMargin: 20
@@ -78,6 +79,7 @@ Page {
7879
}
7980

8081
ContinueButton {
82+
objectName: "createWalletBackupDoneButton"
8183
Layout.preferredWidth: Math.min(300, parent.width - 2 * Layout.leftMargin)
8284
Layout.topMargin: 30
8385
Layout.leftMargin: 20
@@ -89,4 +91,4 @@ Page {
8991
}
9092
}
9193
}
92-
}
94+
}

qml/pages/wallet/CreateConfirm.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ Page {
6262
}
6363

6464
ContinueButton {
65+
objectName: "createWalletConfirmNextButton"
6566
Layout.preferredWidth: Math.min(300, parent.width - 2 * Layout.leftMargin)
6667
Layout.topMargin: 30
6768
Layout.leftMargin: 20
@@ -73,4 +74,4 @@ Page {
7374
}
7475
}
7576
}
76-
}
77+
}

qml/pages/wallet/CreateIntro.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ Page {
102102
}
103103

104104
ContinueButton {
105+
objectName: "createWalletIntroStartButton"
105106
Layout.preferredWidth: Math.min(300, parent.width - 2 * Layout.leftMargin)
106107
Layout.topMargin: 30
107108
Layout.leftMargin: 20
@@ -113,4 +114,4 @@ Page {
113114
}
114115
}
115116
}
116-
}
117+
}

qml/pages/wallet/CreateName.qml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ Page {
4444

4545
CoreTextField {
4646
id: walletNameInput
47+
objectName: "createWalletNameField"
4748
focus: true
4849
Layout.fillWidth: true
4950
Layout.leftMargin: 20
@@ -57,6 +58,7 @@ Page {
5758

5859
ContinueButton {
5960
id: continueButton
61+
objectName: "createWalletNameContinueButton"
6062
Layout.preferredWidth: Math.min(300, parent.width - 2 * Layout.leftMargin)
6163
Layout.leftMargin: 20
6264
Layout.rightMargin: 20
@@ -70,4 +72,4 @@ Page {
7072
}
7173
}
7274
}
73-
}
75+
}

qml/pages/wallet/CreatePassword.qml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Page {
3030
}
3131
}
3232
rightItem: NavButton {
33+
objectName: "createWalletPasswordSkipButton"
3334
text: qsTr("Skip")
3435
enabled: walletController.initialized
3536
onClicked: {
@@ -65,6 +66,7 @@ Page {
6566

6667
CoreTextField {
6768
id: password
69+
objectName: "createWalletPasswordField"
6870
Layout.fillWidth: true
6971
Layout.topMargin: 5
7072
Layout.leftMargin: 20
@@ -83,6 +85,7 @@ Page {
8385
}
8486
CoreTextField {
8587
id: passwordRepeat
88+
objectName: "createWalletPasswordRepeatField"
8689
Layout.fillWidth: true
8790
Layout.leftMargin: 20
8891
Layout.rightMargin: 20
@@ -92,6 +95,7 @@ Page {
9295

9396
Setting {
9497
id: confirmToggle
98+
objectName: "createWalletPasswordConfirmToggle"
9599
Layout.fillWidth: true
96100
Layout.leftMargin: 20
97101
Layout.rightMargin: 20
@@ -105,6 +109,7 @@ Page {
105109
}
106110

107111
ContinueButton {
112+
objectName: "createWalletPasswordContinueButton"
108113
Layout.preferredWidth: Math.min(300, parent.width - 2 * Layout.leftMargin)
109114
Layout.topMargin: 40
110115
Layout.leftMargin: 20
@@ -120,6 +125,7 @@ Page {
120125
}
121126

122127
CoreText {
128+
objectName: "createWalletPasswordErrorText"
123129
Layout.fillWidth: true
124130
Layout.leftMargin: 20
125131
Layout.rightMargin: 20

qml/pages/wallet/DesktopWallets.qml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,19 @@ Page {
9595
visible: walletController.isWalletLoaded
9696
NavigationTab {
9797
id: activityTabButton
98+
objectName: "walletActivityTab"
9899
text: qsTr("Activity")
99100
property int index: 0
100101
ButtonGroup.group: navigationTabs
101102
}
102103
NavigationTab {
104+
objectName: "walletSendTab"
103105
text: qsTr("Send")
104106
property int index: 1
105107
ButtonGroup.group: navigationTabs
106108
}
107109
NavigationTab {
110+
objectName: "walletReceiveTab"
108111
text: qsTr("Receive")
109112
property int index: 2
110113
ButtonGroup.group: navigationTabs
@@ -198,6 +201,10 @@ Page {
198201
id: migrationRequiredPopup
199202
parent: Overlay.overlay
200203
width: Math.min(420, root.width - 40)
204+
popupObjectName: "walletMigrationPopup"
205+
errorTextObjectName: "walletMigrationErrorText"
206+
cancelButtonObjectName: "walletMigrationCancelButton"
207+
confirmButtonObjectName: "walletMigrationConfirmButton"
201208
descriptionText: qsTr("This wallet uses a legacy format and needs to be updated before it can be opened.")
202209
busy: walletController.walletMigrationInProgress
203210
onConfirmed: {
@@ -211,6 +218,11 @@ Page {
211218
id: migrationPassphrasePopup
212219
parent: Overlay.overlay
213220
width: Math.min(420, root.width - 40)
221+
popupObjectName: "walletMigrationPassphrasePopup"
222+
passphraseFieldObjectName: "walletMigrationPassphraseField"
223+
errorTextObjectName: "walletMigrationPassphraseErrorText"
224+
cancelButtonObjectName: "walletMigrationPassphraseCancelButton"
225+
confirmButtonObjectName: "walletMigrationPassphraseConfirmButton"
214226
titleText: qsTr("Enter wallet password")
215227
descriptionText: qsTr("Enter the wallet password to complete the legacy wallet update.")
216228
confirmText: qsTr("Unlock and update")

qml/pages/wallet/MultipleSendReview.qml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ Page {
142142

143143
ContinueButton {
144144
id: confirmationButton
145+
objectName: "sendTransactionButton"
145146
Layout.fillWidth: true
146147
Layout.topMargin: 30
147148
text: qsTr("Send")
@@ -158,6 +159,7 @@ Page {
158159
}
159160

160161
CoreText {
162+
objectName: "sendTransactionErrorText"
161163
Layout.fillWidth: true
162164
visible: text.length > 0
163165
text: root.wallet.transactionError
@@ -172,6 +174,11 @@ Page {
172174
id: sendPassphrasePopup
173175
parent: Overlay.overlay
174176
width: Math.min(420, root.width - 40)
177+
popupObjectName: "sendPassphrasePopup"
178+
passphraseFieldObjectName: "sendPassphraseField"
179+
errorTextObjectName: "sendPassphraseErrorText"
180+
cancelButtonObjectName: "sendPassphraseCancelButton"
181+
confirmButtonObjectName: "sendPassphraseConfirmButton"
175182
titleText: qsTr("Enter wallet password")
176183
descriptionText: qsTr("Enter your wallet password to sign and send this transaction.")
177184
confirmText: qsTr("Sign and send")

0 commit comments

Comments
 (0)