-
Notifications
You must be signed in to change notification settings - Fork 1
Test/lightning #251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test/lightning #251
Conversation
Pull Request Review: Test/LightningThanks for the PR! This adds test identifiers to enable ✅ Positive Aspects
🐛 Potential Issues1. Race Condition Risk in FundManualAmountView (High Priority)The
Location: 2. Missing StateLocker for Lightning Operations (High Priority)The new Location: The method should wrap the connection logic with 3. Inconsistent Test ID Placement (Medium Priority)In Location: 4. Keyboard Type Addition Should Be Separate (Low Priority)The port field gained Location: 🎨 Code Quality & Best Practices
🔒 Security ConsiderationsNo security concerns identified. The changes do not introduce new attack vectors. ⚡ Performance Considerations
✅ Test CoverageThis PR adds test identifiers but does not include the actual tests. Consider adding the UI tests that use these identifiers in the same PR, or linking to the test PR/issue in the description. 📝 RecommendationsMust fix before merge:
Should fix: Nice to have: 📚 Testing Checklist
Let me know if you would like me to clarify any of these points or if you have questions about the suggested fixes! |
f03b1c8 to
ca8c3d5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds accessibility identifiers to enable UI testing for Lightning-related flows. The changes primarily focus on adding test identifiers to various views and components, along with introducing peer connection logic to the manual channel funding flow.
Key Changes
- Added parameterized test identifiers to
MoneyStackandWalletBalanceViewcomponents for flexible testing - Introduced automatic peer connection in
FundManualAmountViewwhen the view appears - Added new
connectPeermethods toLightningServiceandWalletViewModelto support peer connection functionality
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
Bitkit/Components/MoneyStack.swift |
Added testIdPrefix parameter to allow customization of accessibility identifiers |
Bitkit/Components/WalletBalanceView.swift |
Added optional amountTestIdentifier parameter and applied it to amount text views |
Bitkit/Views/Wallets/SpendingWalletView.swift |
Added "TotalBalance" test ID prefix to MoneyStack |
Bitkit/Views/Wallets/SavingsWalletView.swift |
Added "TotalBalance" test ID prefix to MoneyStack |
Bitkit/Views/Wallets/HomeView.swift |
Added "ActivitySavings" and "ActivitySpending" test identifiers to wallet balances |
Bitkit/Views/Wallets/Sheets/ReceivedTx.swift |
Replaced direct accessibilityIdentifier with testIdPrefix parameter for MoneyStack |
Bitkit/Views/Wallets/Send/SendConfirmationView.swift |
Added "ReviewAmount" test ID prefix to MoneyStack instances |
Bitkit/Views/Transfer/FundManualSetupView.swift |
Added accessibility identifiers to input fields and continue button, plus numberPad keyboard type |
Bitkit/Views/Transfer/FundManualAmountView.swift |
Added automatic peer connection on view appearance with error handling |
Bitkit/Views/Sheets/QuickpaySheet.swift |
Changed test ID from "QuickpaySheet" to "QuickpayIntro" |
Bitkit/Views/Sheets/NotificationsSheet.swift |
Changed test ID from "NotificationsSheet" to "BackgroundPayments" |
Bitkit/Views/Settings/Advanced/LightningConnectionsView.swift |
Added "NavigationAction" and "Channel" accessibility identifiers |
Bitkit/Views/Settings/Advanced/LightningConnectionDetailView.swift |
Added optional test identifiers to detail row helper functions and applied them to specific rows |
Bitkit/Views/Settings/Advanced/CloseConnectionConfirmation.swift |
Added "CloseConnectionButton" accessibility identifier |
Bitkit/ViewModels/WalletViewModel.swift |
Added connectPeer method that delegates to LightningService |
Bitkit/Services/LightningService.swift |
Added connectPeer method with proper error handling and logging |
c436d3e to
d171927
Compare
d171927 to
c3dbee4
Compare
pwltr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK
This flow needs some work, but that is outside of this PR
c3dbee4 to
29fc26d
Compare
Whoops, pushed one more commit 29fc26d, if you think it's too much, I can revert :) |
Yes please :) that navigation logic is too hacky and I think we can simplify by trying to connect on "Continue" press and showing error if it fails. That is good enough UX imo, the user understands that they can retry. |
29fc26d to
3e53a74
Compare
Fair enough. Reverted 👍 |
pwltr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reACK
Test/lightning
Description
Adjustments to enable
@ligntningtests.Linked Issues/Tasks
Screenshot / Video
Simulator.Screen.Recording.-.iPhone.17.-.2025-12-03.at.15.51.06-1.mov