test: Add UI layer unit tests for joint account feature#519
Closed
yasin-ce wants to merge 16 commits intomultisig/08-inbox-pagesfrom
Closed
test: Add UI layer unit tests for joint account feature#519yasin-ce wants to merge 16 commits intomultisig/08-inbox-pagesfrom
yasin-ce wants to merge 16 commits intomultisig/08-inbox-pagesfrom
Conversation
2f7bc2a to
c1aa803
Compare
d5616cf to
8a6c613
Compare
c1aa803 to
c003291
Compare
b81f5ca to
0be0c1b
Compare
This commit adds complete joint account functionality including: SDK Layer (common-sdk): - Local data layer: JointEntity, JointDao, JointMapper, JointAccountRepository - Account core: AccountType.Joint, TransactionSigner.Joint, AddJointAccountUseCase - Inbox module: InboxRepository, InboxCacheManager, AssetInboxRepository - JointAccount module: JointAccountRepository, JointSignRequest handling - DeepLink support for joint account imports - Tests for all SDK modules App Layer: - Joint Account Detail screen with participant management - Joint Account Creation flow (Add, Create, Name, Edit, SetThreshold screens) - Joint Account Transaction signing flow with pending signatures UI - Inbox screen for joint account invitations - Add Account Intro screen - Joint Account Info dialog - Transaction signing helpers for joint accounts - Resources, navigation, and integration updates Documentation: - AI_ASSISTED_DEVELOPMENT_STORY.md - CODE_REVIEW_GUIDE.md - JOINT_ACCOUNT_HAPPY_PATHS.md - QA_JOINT_ACCOUNT_TESTING.md
c003291 to
ec9a896
Compare
0be0c1b to
9162ece
Compare
* multisig/08-inbox-pages: (25 commits) fix: Update app inbox mappers to use correct domain model names fix: Update app module to use correct domain model names fix: Rename GetInboxMessages to FetchInboxMessages to avoid redeclaration fix: Move initSavedStateListener() from onResume to onViewCreated refactor: Apply correct architecture with use case pattern fix(di): Add missing GetJointAccount and GetJointAccountParticipantCount bindings fix(test): Use correct domain model class names in HasInboxItemsForAddressUseCaseTest Fix rule violations on branch 06 Fix domain model naming violations - remove DTO suffix fix: remove unreachable code after TODO() statements fix: resolve merge conflicts after merging 03 into 04 docs: clarify test helper function placement rules refactor: remove unnecessary @before in tests, add rule refactor: use companion object for test constants in JointSignRequestMapperTest docs: add rules to prevent common PR review issues refactor: split use case interfaces into separate files refactor: simplify use cases by removing unnecessary implementations refactor: split use case interfaces into separate file fix: remove DTO suffix from domain models per PR review refactor: Remove unused use cases and DTOs per PR review ...
- Update JointAccountInboxOperationsUseCaseTest to use: - FetchInboxMessages instead of JointAccountRepository - DeleteInboxJointInvitationNotification from correct package - PeraResult instead of Result - InboxMessages instead of InboxMessagesDTO - Delete obsolete JointAccountCreationApiUseCaseTest (class was moved to common-sdk) - Update NameJointAccountViewModelTest to use: - CreateJointAccount from common-sdk - JointAccount instead of JointAccountDTO - PeraResult instead of Result
- Delete obsolete test files that test internal common-sdk classes: - JointSignRequestApiUseCaseTest.kt - CreateJointAccountUseCaseTest.kt - DeleteInboxJointInvitationNotificationUseCaseTest.kt - JointAccountInboxApiUseCaseTest.kt - Update DefaultNameJointAccountProcessorTest.kt to use: - DeleteInboxJointInvitationNotification from common-sdk - PeraResult instead of Result
Add tests for use cases that were previously tested in app module but now reside in common-sdk: - CreateJointAccountUseCaseTest: Tests repository delegation for creating joint accounts with correct input mapping - FetchInboxMessagesUseCaseTest: Tests repository delegation for fetching inbox messages with InboxSearchInput wrapping - DeleteInboxJointInvitationNotificationUseCaseTest: Tests repository delegation for deleting inbox notifications This restores the test coverage that was reduced when obsolete test files were deleted from the app module.
* dev: PERA-3478 Prevent xo swap webview state loss (#520)
- Add new fields to JointSignRequestResponse and domain model - Update mapper to map the new fields - Simplify SignatureRequestInboxItemMapper to use creationDatetime - Remove block-based time estimation logic - Update tests for new fields
* multisig/08-inbox-pages: fix: Address PR review feedback and add coding rules refactor: Implement ViewState/ViewEvent pattern for Inbox refactor: Fix InboxLastOpenedTimeLocalSource DI with PersistentCacheProvider refactor: Simplify InboxScreenPreview by using StateFlow overload refactor: Move account display logic to JointAccountInvitationDetailViewModel refactor: Move deep link handling flag to ViewModel and implement InboxScreenListener refactor: Use TimeProvider and RelativeTimeDifference in SignatureRequestInboxItemMapper fix: Address PR #518 review comments fix: Remove @nAmed annotation referencing removed INJECTION_NAME # Conflicts: # app/src/main/kotlin/com/algorand/android/modules/inbox/allaccounts/ui/mapper/SignatureRequestInboxItemMapper.kt
* multisig/08-inbox-pages: fix: Address PR review feedback and add coding rules
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add comprehensive unit tests for joint account UI layer:
CreateJointAccountParticipantItemUseCaseTestJointAccountInboxOperationsUseCaseTestJointAccountDetailViewModelTestCreateAlgo25AccountUseCaseTestCreateHdKeyAccountUseCaseTestGetAddAccountIntroPreviewUseCaseTestJointAccountCreationApiUseCaseTestJointAccountInboxApiUseCaseTestJointSignRequestApiUseCaseTestCreateJointAccountUseCaseTestDeleteInboxJointInvitationNotificationUseCaseTestCreateJointAccountViewModelTestDefaultNameJointAccountProcessorTestNameJointAccountViewModelTestCreateExternalAddressAsContactUseCaseTestGetDefaultJointAccountNameUseCaseTestDefaultJointAccountTransactionProcessorTestTest Plan
./gradlew :app:testProdDebugUnitTest