From 70d3adea189f0c3ccb636c2cbd8e63913412b962 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 8 Jul 2026 15:33:48 +0200 Subject: [PATCH 1/3] chore: add trezor bridge plist keys for e2e --- Bitkit/Info.plist | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Bitkit/Info.plist b/Bitkit/Info.plist index 5c1c3f538..5ae0d535c 100644 --- a/Bitkit/Info.plist +++ b/Bitkit/Info.plist @@ -23,6 +23,12 @@ $(E2E_BACKEND) E2E_NETWORK $(E2E_NETWORK) + TREZOR_BRIDGE + $(TREZOR_BRIDGE) + TREZOR_BRIDGE_URL + $(TREZOR_BRIDGE_URL) + TREZOR_ELECTRUM_URL + $(TREZOR_ELECTRUM_URL) LSApplicationQueriesSchemes pubkyauth From c4e4fed918305f992d676bc7fb8da3c721fe7b15 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 8 Jul 2026 16:12:37 +0200 Subject: [PATCH 2/3] test: align hw wallet ids with android e2e --- .../HardwareWalletsSettingsScreen.swift | 43 ++++++++++--------- .../Sheets/HardwareConnect/HwFoundView.swift | 5 ++- .../Sheets/HardwareConnect/HwPairedView.swift | 1 + .../HardwareConnect/HwSearchingView.swift | 7 ++- .../Views/Sheets/HardwareConnectSheet.swift | 7 +-- .../Transfer/Hardware/SpendingAmountHw.swift | 2 + .../Transfer/Hardware/SpendingHwSign.swift | 2 + .../Views/Wallets/HardwareWalletScreen.swift | 2 + 8 files changed, 42 insertions(+), 27 deletions(-) diff --git a/Bitkit/Views/Settings/General/HardwareWalletsSettingsScreen.swift b/Bitkit/Views/Settings/General/HardwareWalletsSettingsScreen.swift index 58e9b0719..5456d5305 100644 --- a/Bitkit/Views/Settings/General/HardwareWalletsSettingsScreen.swift +++ b/Bitkit/Views/Settings/General/HardwareWalletsSettingsScreen.swift @@ -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 ?? ""]), @@ -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")) } @@ -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), @@ -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)") } } diff --git a/Bitkit/Views/Sheets/HardwareConnect/HwFoundView.swift b/Bitkit/Views/Sheets/HardwareConnect/HwFoundView.swift index 12fa50e9a..1f7e63b60 100644 --- a/Bitkit/Views/Sheets/HardwareConnect/HwFoundView.swift +++ b/Bitkit/Views/Sheets/HardwareConnect/HwFoundView.swift @@ -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"), @@ -48,11 +48,12 @@ struct HwFoundView: View { ) { onConnect() } - .accessibilityIdentifier("HwFoundConnect") + .accessibilityIdentifier("HardwareWalletFoundConnect") } .padding(.horizontal, 32) .padding(.bottom, 16) } + .accessibilityElement(children: .contain) .accessibilityIdentifier("HardwareWalletFoundScreen") } } diff --git a/Bitkit/Views/Sheets/HardwareConnect/HwPairedView.swift b/Bitkit/Views/Sheets/HardwareConnect/HwPairedView.swift index 9141897e5..8e91098cd 100644 --- a/Bitkit/Views/Sheets/HardwareConnect/HwPairedView.swift +++ b/Bitkit/Views/Sheets/HardwareConnect/HwPairedView.swift @@ -58,6 +58,7 @@ struct HwPairedView: View { .padding(.bottom, 16) } } + .accessibilityElement(children: .contain) .accessibilityIdentifier("HardwareWalletPairedScreen") } } diff --git a/Bitkit/Views/Sheets/HardwareConnect/HwSearchingView.swift b/Bitkit/Views/Sheets/HardwareConnect/HwSearchingView.swift index 512614d4e..c2c989c4f 100644 --- a/Bitkit/Views/Sheets/HardwareConnect/HwSearchingView.swift +++ b/Bitkit/Views/Sheets/HardwareConnect/HwSearchingView.swift @@ -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) @@ -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") } } diff --git a/Bitkit/Views/Sheets/HardwareConnectSheet.swift b/Bitkit/Views/Sheets/HardwareConnectSheet.swift index 2b4ac44b2..6b6147a52 100644 --- a/Bitkit/Views/Sheets/HardwareConnectSheet.swift +++ b/Bitkit/Views/Sheets/HardwareConnectSheet.swift @@ -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() { diff --git a/Bitkit/Views/Transfer/Hardware/SpendingAmountHw.swift b/Bitkit/Views/Transfer/Hardware/SpendingAmountHw.swift index a9f18a6fa..145a205fd 100644 --- a/Bitkit/Views/Transfer/Hardware/SpendingAmountHw.swift +++ b/Bitkit/Views/Transfer/Hardware/SpendingAmountHw.swift @@ -102,6 +102,8 @@ struct SpendingAmountHw: View { } .accessibilityIdentifier("HardwareTransferAmountContinue") } + .accessibilityElement(children: .contain) + .accessibilityIdentifier("HardwareTransferAmount") .navigationBarHidden(true) .padding(.horizontal, 16) .bottomSafeAreaPadding() diff --git a/Bitkit/Views/Transfer/Hardware/SpendingHwSign.swift b/Bitkit/Views/Transfer/Hardware/SpendingHwSign.swift index f16d60990..729a4c2b1 100644 --- a/Bitkit/Views/Transfer/Hardware/SpendingHwSign.swift +++ b/Bitkit/Views/Transfer/Hardware/SpendingHwSign.swift @@ -41,6 +41,8 @@ struct SpendingHwSign: View { belowNav(order: order) } } + .accessibilityElement(children: .contain) + .accessibilityIdentifier("HardwareTransferSign") .navigationBarHidden(true) .padding(.horizontal, 16) .bottomSafeAreaPadding() diff --git a/Bitkit/Views/Wallets/HardwareWalletScreen.swift b/Bitkit/Views/Wallets/HardwareWalletScreen.swift index 343f965c0..ae4f0b248 100644 --- a/Bitkit/Views/Wallets/HardwareWalletScreen.swift +++ b/Bitkit/Views/Wallets/HardwareWalletScreen.swift @@ -35,6 +35,8 @@ struct HardwareWalletScreen: View { } } .navigationBarHidden(true) + .accessibilityElement(children: .contain) + .accessibilityIdentifier("HardwareWalletScreen") .task(id: wallet?.walletId) { await loadActivities() } From 1081e125c4ccfd66f7bd0d786a0bd07286464c05 Mon Sep 17 00:00:00 2001 From: Piotr Stachyra Date: Wed, 8 Jul 2026 16:22:55 +0200 Subject: [PATCH 3/3] ci: add hardware wallet e2e to local ios --- .github/workflows/e2e-tests.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 354d1004d..1a63daefc 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -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 \ -allowProvisioningUpdates \ build @@ -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 }} @@ -281,6 +283,12 @@ jobs: working-directory: bitkit-e2e-tests run: npm ci + - name: Pull Trezor emulator image + working-directory: bitkit-e2e-tests + run: | + cd docker + docker compose --profile trezor pull --quiet trezor-user-env + - name: Docker info run: | docker --version