Skip to content
Draft
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,8 @@ jobs:
-destination "platform=iOS Simulator,name=$SIMULATOR_NAME,OS=$OS_VERSION" \
-derivedDataPath DerivedData \
SWIFT_ACTIVE_COMPILATION_CONDITIONS='DEBUG E2E_BUILD' \
TREZOR_BRIDGE=true \
TREZOR_BRIDGE_URL=http://127.0.0.1:21325 \
Comment thread
piotr-iohk marked this conversation as resolved.
-allowProvisioningUpdates \
build

Expand Down Expand Up @@ -238,7 +240,7 @@ jobs:
# - { name: onchain_boost_receive_widgets, grep: "@onchain|@boost|@receive|@widgets" }
# - { name: settings, grep: "@settings" }
# - { name: security, grep: "@security" }
- { name: e2e, grep: '@transfer|@send|@lnurl|@lightning|@backup|@onboarding|@onchain_1|@onchain_2|@numberpad|@widgets|@boost|@receive|@settings|@security|@multi_address_1|@multi_address_3|@multi_address_4' }
- { name: e2e, grep: '@transfer|@send|@lnurl|@lightning|@backup|@onboarding|@onchain_1|@onchain_2|@numberpad|@widgets|@boost|@receive|@settings|@security|@multi_address_1|@multi_address_3|@multi_address_4|@hardware_wallet' }

name: e2e-tests-local - ${{ matrix.shard.name }}

Expand Down
6 changes: 6 additions & 0 deletions Bitkit/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
<string>$(E2E_BACKEND)</string>
<key>E2E_NETWORK</key>
<string>$(E2E_NETWORK)</string>
<key>TREZOR_BRIDGE</key>
<string>$(TREZOR_BRIDGE)</string>
<key>TREZOR_BRIDGE_URL</key>
<string>$(TREZOR_BRIDGE_URL)</string>
<key>TREZOR_ELECTRUM_URL</key>
<string>$(TREZOR_ELECTRUM_URL)</string>
Comment on lines +30 to +31

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Define Electrum URL

The local E2E build now defines TREZOR_BRIDGE and TREZOR_BRIDGE_URL, but this new TREZOR_ELECTRUM_URL plist value has no matching build setting in the workflow. When the app falls back to the plist, the hardware-wallet regtest path can receive the literal $(TREZOR_ELECTRUM_URL) value as its Electrum URL. That leaves bridge-backed hardware-wallet tests able to find the emulator, but unable to sync or sign through the expected regtest Electrum endpoint.

<key>LSApplicationQueriesSchemes</key>
<array>
<string>pubkyauth</string>
Expand Down
43 changes: 23 additions & 20 deletions Bitkit/Views/Settings/General/HardwareWalletsSettingsScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ struct HardwareWalletsSettingsScreen: View {
.padding(.bottom, 16)
}
.navigationBarHidden(true)
.accessibilityElement(children: .contain)
.accessibilityIdentifier("HardwareWalletsScreen")
.alert(
t("hardware__remove_dialog_title", variables: ["name": pendingRemoval?.name ?? ""]),
Expand All @@ -46,7 +47,10 @@ struct HardwareWalletsSettingsScreen: View {
guard let wallet = pendingRemoval else { return }
Task { await remove(wallet) }
}
.accessibilityIdentifier("DialogConfirm")

Button(t("common__dialog_cancel"), role: .cancel) {}
.accessibilityIdentifier("DialogCancel")
} message: {
Text(t("hardware__remove_dialog_text"))
}
Expand Down Expand Up @@ -116,14 +120,13 @@ private struct HwWalletRow: View {
HStack(spacing: 12) {
HwConnectionBadge(isConnected: wallet.isConnected)

Button(action: onRename) {
BodyMText(wallet.name, textColor: .textPrimary)
.lineLimit(1)
.frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
}
.buttonStyle(.plain)
.accessibilityIdentifier("HardwareWalletRowName_\(wallet.id)")
BodyMText(wallet.name, textColor: .textPrimary)
.lineLimit(1)
.frame(maxWidth: .infinity, alignment: .leading)
.contentShape(Rectangle())
.onTapGesture(perform: onRename)
.accessibilityAddTraits(.isButton)
.accessibilityIdentifier("HardwareWalletRowName\(wallet.id)")

MoneyText(
sats: Int(clamping: wallet.balanceSats),
Expand All @@ -133,20 +136,20 @@ private struct HwWalletRow: View {
symbolColor: .white64
)

Button(action: onRemove) {
Image("trash")
.renderingMode(.template)
.resizable()
.scaledToFit()
.frame(width: 24, height: 24)
.foregroundColor(.white)
.padding(.vertical, 8)
.contentShape(Rectangle())
}
.buttonStyle(.plain)
.accessibilityIdentifier("HardwareWalletRowDelete_\(wallet.id)")
Image("trash")
.renderingMode(.template)
.resizable()
.scaledToFit()
.frame(width: 24, height: 24)
.foregroundColor(.white)
.padding(.vertical, 8)
.contentShape(Rectangle())
.onTapGesture(perform: onRemove)
.accessibilityAddTraits(.isButton)
.accessibilityIdentifier("HardwareWalletRowDelete_\(wallet.id)")
}
.frame(height: 50)
.accessibilityElement(children: .contain)
.accessibilityIdentifier("HardwareWalletRow_\(wallet.id)")
}
}
Expand Down
5 changes: 3 additions & 2 deletions Bitkit/Views/Sheets/HardwareConnect/HwFoundView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ struct HwFoundView: View {
CustomButton(title: t("common__cancel"), variant: .secondary, shouldExpand: true) {
onCancel()
}
.accessibilityIdentifier("HwFoundCancel")
.accessibilityIdentifier("HardwareWalletFoundCancel")

CustomButton(
title: t("common__connect"),
Expand All @@ -48,11 +48,12 @@ struct HwFoundView: View {
) {
onConnect()
}
.accessibilityIdentifier("HwFoundConnect")
.accessibilityIdentifier("HardwareWalletFoundConnect")
}
.padding(.horizontal, 32)
.padding(.bottom, 16)
}
.accessibilityElement(children: .contain)
.accessibilityIdentifier("HardwareWalletFoundScreen")
}
}
Expand Down
1 change: 1 addition & 0 deletions Bitkit/Views/Sheets/HardwareConnect/HwPairedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct HwPairedView: View {
.padding(.bottom, 16)
}
}
.accessibilityElement(children: .contain)
.accessibilityIdentifier("HardwareWalletPairedScreen")
}
}
Expand Down
7 changes: 5 additions & 2 deletions Bitkit/Views/Sheets/HardwareConnect/HwSearchingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ struct HwSearchingView: View {
textColor: errorMessage != nil ? .redAccent : .textSecondary
)
.frame(minHeight: 40, alignment: .top)
.accessibilityIdentifier(errorMessage != nil ? "HwSearchingError" : "HwSearchingText")
.accessibilityIdentifier(
errorMessage != nil ? "HardwareWalletSearchingError" : "HardwareWalletSearchingText"
)
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.horizontal, 32)
Expand All @@ -30,10 +32,11 @@ struct HwSearchingView: View {
CustomButton(title: t("common__cancel"), variant: .secondary, shouldExpand: true) {
onCancel()
}
.accessibilityIdentifier("HwSearchingCancel")
.accessibilityIdentifier("HardwareWalletSearchingCancel")
.padding(.horizontal, 32)
.padding(.bottom, 16)
}
.accessibilityElement(children: .contain)
.accessibilityIdentifier("HardwareWalletSearchingScreen")
}
}
Expand Down
7 changes: 4 additions & 3 deletions Bitkit/Views/Sheets/HardwareConnectSheet.swift
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,20 @@ private struct HardwareConnectFlow: View {
CustomButton(title: t("common__cancel"), variant: .secondary, shouldExpand: true) {
sheets.hideSheet()
}
.accessibilityIdentifier("HwIntroCancel")
.accessibilityIdentifier("HardwareWalletIntroCancel")

CustomButton(title: t("common__continue"), shouldExpand: true) {
onContinueTapped()
}
.accessibilityIdentifier("HwIntroContinue")
.accessibilityIdentifier("HardwareWalletIntroContinue")
}
.padding(.top, 32)
.padding(.bottom, 16)
}
.padding(.horizontal, 32)
}
.accessibilityIdentifier("HwIntroSheet")
.accessibilityElement(children: .contain)
.accessibilityIdentifier("HardwareWalletIntroScreen")
}

private func onContinueTapped() {
Expand Down
2 changes: 2 additions & 0 deletions Bitkit/Views/Transfer/Hardware/SpendingAmountHw.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ struct SpendingAmountHw: View {
}
.accessibilityIdentifier("HardwareTransferAmountContinue")
}
.accessibilityElement(children: .contain)
.accessibilityIdentifier("HardwareTransferAmount")
.navigationBarHidden(true)
.padding(.horizontal, 16)
.bottomSafeAreaPadding()
Expand Down
2 changes: 2 additions & 0 deletions Bitkit/Views/Transfer/Hardware/SpendingHwSign.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ struct SpendingHwSign: View {
belowNav(order: order)
}
}
.accessibilityElement(children: .contain)
.accessibilityIdentifier("HardwareTransferSign")
.navigationBarHidden(true)
.padding(.horizontal, 16)
.bottomSafeAreaPadding()
Expand Down
2 changes: 2 additions & 0 deletions Bitkit/Views/Wallets/HardwareWalletScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ struct HardwareWalletScreen: View {
}
}
.navigationBarHidden(true)
.accessibilityElement(children: .contain)
.accessibilityIdentifier("HardwareWalletScreen")
.task(id: wallet?.walletId) {
await loadActivities()
}
Expand Down
Loading