Skip to content

Conversation

@yasin-ce
Copy link
Collaborator

Summary

Add comprehensive unit tests for joint account UI layer:

  • CreateJointAccountParticipantItemUseCaseTest
  • JointAccountInboxOperationsUseCaseTest
  • JointAccountDetailViewModelTest
  • CreateAlgo25AccountUseCaseTest
  • CreateHdKeyAccountUseCaseTest
  • GetAddAccountIntroPreviewUseCaseTest
  • JointAccountCreationApiUseCaseTest
  • JointAccountInboxApiUseCaseTest
  • JointSignRequestApiUseCaseTest
  • CreateJointAccountUseCaseTest
  • DeleteInboxJointInvitationNotificationUseCaseTest
  • CreateJointAccountViewModelTest
  • DefaultNameJointAccountProcessorTest
  • NameJointAccountViewModelTest
  • CreateExternalAddressAsContactUseCaseTest
  • GetDefaultJointAccountNameUseCaseTest
  • DefaultJointAccountTransactionProcessorTest

Test Plan

  • Run all tests: ./gradlew :app:testProdDebugUnitTest
  • Verify all tests pass
  • Check test coverage for new code

@yasin-ce yasin-ce self-assigned this Jan 20, 2026
@yasin-ce yasin-ce force-pushed the multisig/08-inbox-pages branch from 2f7bc2a to c1aa803 Compare January 20, 2026 09:33
@yasin-ce yasin-ce force-pushed the multisig/09-ui-layer-tests branch from d5616cf to 8a6c613 Compare January 20, 2026 09:33
@yasin-ce yasin-ce force-pushed the multisig/08-inbox-pages branch from c1aa803 to c003291 Compare January 20, 2026 09:50
@yasin-ce yasin-ce force-pushed the multisig/09-ui-layer-tests branch 2 times, most recently from b81f5ca to 0be0c1b Compare January 20, 2026 09:54
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
@yasin-ce yasin-ce force-pushed the multisig/08-inbox-pages branch from c003291 to ec9a896 Compare January 20, 2026 13:49
@yasin-ce yasin-ce force-pushed the multisig/09-ui-layer-tests branch from 0be0c1b to 9162ece Compare January 20, 2026 13:49
mitsinsar and others added 9 commits January 20, 2026 21:23
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants