Skip to content
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

Fix Part of #4938: Profile Configuration and Migration #5387

Merged
merged 368 commits into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
368 commits
Select commit Hold shift + click to select a range
b458e19
Fix forward databinding error from upstream
adhiamboperes Jun 5, 2024
1a77d9c
Add forward navigation
adhiamboperes Jun 5, 2024
b542733
Remove modules from upstream
adhiamboperes Jun 5, 2024
a6ee4f5
Add navigation tests
adhiamboperes Jun 5, 2024
fac5719
Fix alignment on tablet landscape
adhiamboperes Jun 5, 2024
93a29ab
Remove PrimeTopicAssetsControllerModule
adhiamboperes Jun 5, 2024
c18a4b1
Move files to onboarding package
adhiamboperes Jun 5, 2024
c3f922a
Merge remote-tracking branch 'upstream/onboarding-learner-intro-scree…
adhiamboperes Jun 5, 2024
b165913
Refactor layouts based on upstream changes.
adhiamboperes Jun 5, 2024
1c64112
Remove unused imports
adhiamboperes Jun 5, 2024
403a8fa
Create style for language dropdown
adhiamboperes Jun 6, 2024
539e740
Refactor tablet layout styling
adhiamboperes Jun 6, 2024
d11d221
Refactor rename AudioLanguageFragmentPresenter to V1 suffix
adhiamboperes Jun 6, 2024
52fbf56
Add tests
adhiamboperes Jun 6, 2024
f14bbb1
Merge remote-tracking branch 'upstream/develop' into new-onboarding-s…
adhiamboperes Jun 11, 2024
ea056af
Merge branch 'new-onboarding-screen' into onboarding-profile-type-screen
adhiamboperes Jun 11, 2024
5237f63
Merge remote-tracking branch 'upstream/onboarding-profile-type-screen…
adhiamboperes Jun 11, 2024
3fdf74f
Fix merge conflict
adhiamboperes Jun 11, 2024
c2c244b
Merge branch 'new-onboarding-screen' into onboarding-profile-type-screen
adhiamboperes Jun 11, 2024
b802921
Merge branch 'onboarding-profile-type-screen' into create-profile-screen
adhiamboperes Jun 11, 2024
66b664c
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 11, 2024
a435c11
Create new style for error messages
adhiamboperes Jun 11, 2024
3f3b810
Add textwatcher test
adhiamboperes Jun 11, 2024
5b3ecba
Fix small issues
adhiamboperes Jun 11, 2024
5b43705
Fix small issues
adhiamboperes Jun 11, 2024
43274da
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 11, 2024
1d7f954
Fix merge conflicts
adhiamboperes Jun 11, 2024
a3e7168
Merge remote-tracking branch 'upstream/onboarding-learner-intro-scree…
adhiamboperes Jun 11, 2024
027c745
Merge branch 'onboarding-audio-language-screen' into onboarding-profi…
adhiamboperes Jun 13, 2024
ae9886f
Create sole learner profile with tests
adhiamboperes Jun 13, 2024
5257e30
Create profile onboarding event logs
adhiamboperes Jun 13, 2024
edd2151
Exit app for sole learner profile
adhiamboperes Jun 13, 2024
c1698ed
Add login pathway for sole learner
adhiamboperes Jun 13, 2024
441b2d0
fix import order
adhiamboperes Jun 13, 2024
bcc2cbf
Add tests for migrated login routes
adhiamboperes Jun 17, 2024
6c1a28f
Add tests for migrated login routes
adhiamboperes Jun 17, 2024
822e1fb
Log onboarding started event
adhiamboperes Jun 17, 2024
d71ed56
Update test initialization for onboarding v2 off
adhiamboperes Jun 17, 2024
1e9c136
Update test initialization for onboarding v2 off
adhiamboperes Jun 17, 2024
72624f5
Merge branch 'develop' into new-onboarding-screen
adhiamboperes Jun 17, 2024
13d9ac5
Merge branch 'new-onboarding-screen' into onboarding-profile-type-screen
adhiamboperes Jun 17, 2024
f0d0c57
Merge branch 'onboarding-profile-type-screen' into create-profile-screen
adhiamboperes Jun 17, 2024
199447d
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 17, 2024
a0fc7d6
Merge branch 'onboarding-learner-intro-screen' into onboarding-audio-…
adhiamboperes Jun 17, 2024
9c2e1d6
Merge branch 'onboarding-audio-language-screen' into onboarding-profi…
adhiamboperes Jun 17, 2024
485dc54
Replace Lifecycle.State check with activity.isFinishing
adhiamboperes Jun 18, 2024
33624d7
Flatten layout
adhiamboperes Jun 19, 2024
2b10f80
Resolve merge conflicts
adhiamboperes Jun 19, 2024
1ade253
Merge branch 'onboarding-profile-type-screen' into create-profile-screen
adhiamboperes Jun 19, 2024
49586cc
Adjust profile picture prompt
adhiamboperes Jun 19, 2024
2d5d438
Add assertions for image loaded
adhiamboperes Jun 19, 2024
41dea0b
Replace Lifecycle.State check with activity.isFinishing
adhiamboperes Jun 19, 2024
e6a1b24
Addressed reviewer comments
adhiamboperes Jun 19, 2024
85081cc
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 19, 2024
4e91b89
Merge branch 'onboarding-learner-intro-screen' into onboarding-audio-…
adhiamboperes Jun 19, 2024
66f8fac
Fix tests
adhiamboperes Jun 19, 2024
c10ba82
Fix failing tests
adhiamboperes Jun 19, 2024
c386024
Add missing test initialization
adhiamboperes Jun 19, 2024
0b74249
Merge branch 'onboarding-audio-language-screen' into onboarding-profi…
adhiamboperes Jun 19, 2024
db36244
Fix merge conflict
adhiamboperes Jun 19, 2024
35a839e
Add missing bazel dependency
adhiamboperes Jun 19, 2024
59c4665
Complete login migration route tests
adhiamboperes Jun 20, 2024
ab36c03
Fix tests/flows broken by changes
adhiamboperes Jun 20, 2024
c327be9
Add tests for end profile onboarding event log
adhiamboperes Jun 20, 2024
fccac67
Add tests for profile creation errors
adhiamboperes Jun 20, 2024
4cd3918
General cleanup
adhiamboperes Jun 21, 2024
2c33188
General cleanup
adhiamboperes Jun 21, 2024
026ff1d
Revert breaking change
adhiamboperes Jun 21, 2024
7304449
Add kdoc
adhiamboperes Jun 21, 2024
2cb0469
Fix static check failures
adhiamboperes Jun 21, 2024
c32d2e9
Fix failing event log events
adhiamboperes Jun 21, 2024
cb8b21e
Fix failing app deprecation tests
adhiamboperes Jun 22, 2024
c827a68
Refactor the app startup state
adhiamboperes Jun 23, 2024
5a570b2
Fix event logs
adhiamboperes Jun 23, 2024
381c883
Revert changes to app init
adhiamboperes Jun 24, 2024
bdcf5c1
Enforce v2 onboarding flow
adhiamboperes Jun 24, 2024
0a59cfc
Enforce conditional profile exit for sole learner
adhiamboperes Jun 24, 2024
5ee3a20
Revert unnecessary test file changes
adhiamboperes Jun 24, 2024
df789ea
Fix proto field case
adhiamboperes Jun 24, 2024
a1b0964
Fix SplashActivityTests
adhiamboperes Jun 24, 2024
1bb7508
Merge branch 'develop' into onboarding-profile-type-screen
adhiamboperes Jun 24, 2024
6e0401f
Update test_file_exemptions to the new format
adhiamboperes Jun 24, 2024
2f84098
Fix indent
adhiamboperes Jun 24, 2024
d979d1b
Merge branch 'onboarding-profile-type-screen' into create-profile-screen
adhiamboperes Jun 24, 2024
2d83378
Update test_file_exemptions
adhiamboperes Jun 24, 2024
3f5c8c2
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 24, 2024
e3565b5
Address reviewer comment
adhiamboperes Jun 24, 2024
3641559
Merge branch 'onboarding-learner-intro-screen' into onboarding-audio-…
adhiamboperes Jun 24, 2024
b19014c
Address reviewer comments
adhiamboperes Jun 24, 2024
2412618
Populate the language dropdown list
adhiamboperes Jun 25, 2024
8d8ab17
Merge branch 'onboarding-audio-language-screen' into onboarding-profi…
adhiamboperes Jun 25, 2024
61a7724
Fix test file exemption path
adhiamboperes Jun 25, 2024
5512216
Add missing bazel dep
adhiamboperes Jun 25, 2024
a0fe5c6
Add dropdown view id
adhiamboperes Jun 25, 2024
2bf2eda
Hook up app language options
adhiamboperes Jun 26, 2024
04acfa9
Merge branch 'develop' into onboarding-profile-type-screen
adhiamboperes Jun 30, 2024
223150b
Replace png images with svgs
adhiamboperes Jun 30, 2024
90428af
Add exemptions for new svgs
adhiamboperes Jun 30, 2024
e248fb1
Pull upstream and fix conflicts
adhiamboperes Jun 30, 2024
9fd9fbc
Change default avatar bg in v2
adhiamboperes Jun 30, 2024
2ec249d
Fix profile prompt background
adhiamboperes Jun 30, 2024
988ab47
Merge branch 'develop' into create-profile-screen
adhiamboperes Jun 30, 2024
af6ed95
Fix deprecated api
adhiamboperes Jun 30, 2024
53e7b9b
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 30, 2024
05d02c3
Fix kdoc
adhiamboperes Jun 30, 2024
ce9660d
Merge branch 'create-profile-screen' into onboarding-learner-intro-sc…
adhiamboperes Jun 30, 2024
ce46838
Merge remote-tracking branch 'upstream/onboarding-learner-intro-scree…
adhiamboperes Jun 30, 2024
86416a1
Fix test_file_exemption
adhiamboperes Jun 30, 2024
b3b7d6c
Merge branch 'develop' into onboarding-audio-language-screen
adhiamboperes Jul 1, 2024
29eb9d5
Replace ConstraintLayout with FrameLayout
adhiamboperes Jul 1, 2024
fbe6ac3
Add dropdown view id
adhiamboperes Jun 25, 2024
264f827
Hook up app language options
adhiamboperes Jun 26, 2024
320fc14
Create language dropdown list and the default selection
adhiamboperes Jul 2, 2024
d96d29e
Make otter graphic respond to rtl layouts
adhiamboperes Jul 2, 2024
9073e8c
Add mechanisms to check if a default profile exists: wip
adhiamboperes Jul 2, 2024
31fb8f5
Pass the created profileId and update profile details
adhiamboperes Jul 2, 2024
d65b9f8
Refactored IntroFragment arguments to proto, and decorated with the p…
adhiamboperes Jul 2, 2024
cf138ab
Prime AudioLanguageActivity to receive a profileId args
adhiamboperes Jul 2, 2024
b0e47c9
Fix merge conflicts
adhiamboperes Jul 3, 2024
866fff4
Refactor to the new central hasProtoExtra
adhiamboperes Jul 3, 2024
8d96257
Remove redundant non-null assertion
adhiamboperes Jul 3, 2024
470a476
Fix duplicating default profile creation
adhiamboperes Jul 5, 2024
89d5c67
Bind audiolanguage pre-selection to the dropdown
adhiamboperes Jul 5, 2024
c901f9d
Fix persist selection on config change
adhiamboperes Jul 5, 2024
b71d6bd
Setup audio language pre-selection logic
adhiamboperes Jul 5, 2024
682355d
Fix lint errors
adhiamboperes Jul 5, 2024
185d8d4
Cleanup language selection and profile creation
adhiamboperes Jul 9, 2024
a0884c8
Fix missing kdocs
adhiamboperes Jul 9, 2024
efe460e
Update profile error message view
adhiamboperes Jul 11, 2024
0be7286
Refactor IntroActivity intent creation
adhiamboperes Jul 11, 2024
8508ea5
Update intent tests to reflect new intent extras
adhiamboperes Jul 11, 2024
beb6f7c
Add tests for language switching
adhiamboperes Jul 11, 2024
e653a7b
Add helper for creating a default empty profile
adhiamboperes Jul 11, 2024
4d2c48d
Update updateNewProfileDetails() kdocs
adhiamboperes Jul 11, 2024
002cc38
Helper for creating the default empty profile in tests
adhiamboperes Jul 11, 2024
eff4cbb
Tests for the new profile update api
adhiamboperes Jul 11, 2024
d6423c2
Additional tests for the profile creation flow
adhiamboperes Jul 11, 2024
7730225
Add tests for language selection
adhiamboperes Jul 11, 2024
af11961
Fix missing kdoc
adhiamboperes Jul 11, 2024
4d81441
Fix self-review pass issues.
adhiamboperes Jul 12, 2024
d08df8b
Exempt OnboardingFragmentTest from locale checks
adhiamboperes Jul 12, 2024
0932981
Fix failing tests
adhiamboperes Jul 12, 2024
d76307b
Revert conflicting/already implemented UI layer code
adhiamboperes Jul 12, 2024
844c0e2
Temporary comments
adhiamboperes Jul 12, 2024
9ba0b9b
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Jul 12, 2024
36f3cf6
Fix leftover refactor issue
adhiamboperes Jul 12, 2024
de5783c
Complete the sole learner onboarding flow
adhiamboperes Jul 15, 2024
fc85e9d
Update admin profile profileType in v2
adhiamboperes Jul 15, 2024
7564eba
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Jul 15, 2024
56f668a
Destroy onboarding activities after onboarding completed.
adhiamboperes Jul 15, 2024
7a97741
Fix failing SplashActivityTests
adhiamboperes Jul 15, 2024
8efa8b9
Fix failing SplashActivityTests + finish migration pathways
adhiamboperes Jul 17, 2024
318334f
Onboard existing learner profiles
adhiamboperes Jul 17, 2024
0bf61cc
Toggle homescreen with multiple classrooms flag
adhiamboperes Jul 17, 2024
b00217a
General cleanup
adhiamboperes Jul 18, 2024
5f01efb
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Jul 18, 2024
cd25696
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Jul 18, 2024
eb64975
General cleanup
adhiamboperes Jul 18, 2024
e7ee78a
Fix failing test
adhiamboperes Jul 23, 2024
f4f652e
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Jul 25, 2024
08f67c6
Address part of reviewer comments
adhiamboperes Aug 1, 2024
e942263
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Aug 1, 2024
9a8024b
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 1, 2024
e67f67b
Fix lint errors
adhiamboperes Aug 1, 2024
ac6b501
Merge branch 'onboarding-language-domain-config' of github.com:oppia/…
adhiamboperes Aug 1, 2024
ef1fd91
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 1, 2024
666ad36
Create test suite for TextInputLayoutBindingAdapters
adhiamboperes Aug 5, 2024
9ad283a
Address more reviewer comments.
adhiamboperes Aug 5, 2024
ee841fa
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Aug 5, 2024
4e6a2a6
Create test suite for TextInputLayoutBindingAdapters
adhiamboperes Aug 5, 2024
5389819
Address more reviewer comments.
adhiamboperes Aug 5, 2024
4b37f24
Fixed static check failures
adhiamboperes Aug 5, 2024
5503aee
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 6, 2024
da1787b
Fix empty strings assertion
adhiamboperes Aug 12, 2024
3e068bb
Addressed test comments
adhiamboperes Aug 12, 2024
990dc5a
Use proto for app language
adhiamboperes Aug 14, 2024
30cf1db
Refactor language binding logic
adhiamboperes Aug 19, 2024
9193b4a
Allow user to progress on continue clicked.
adhiamboperes Aug 21, 2024
bc140c5
Fix failing test
adhiamboperes Aug 21, 2024
6635c0d
Fix failing audio language tests
adhiamboperes Aug 21, 2024
d604e53
Fix failing profile creation tests
adhiamboperes Aug 21, 2024
622edb3
Temporarily remove failing adapter tests
adhiamboperes Aug 22, 2024
0133cd0
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 22, 2024
f838bab
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Aug 23, 2024
dd03357
Update profile creation exceptions and tests
adhiamboperes Aug 23, 2024
da2fb5f
Properly set up binding adapter tests
adhiamboperes Aug 23, 2024
d982d06
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 23, 2024
0fc0078
Fix self review issues
adhiamboperes Aug 23, 2024
7589da6
Remove unused code
adhiamboperes Aug 23, 2024
ded1640
Fix nit
adhiamboperes Aug 23, 2024
b2084e6
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Aug 23, 2024
e06d28f
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 23, 2024
6cf179f
Remove duplicate exemption
adhiamboperes Aug 23, 2024
1cc21bb
Remove leftover profile audiolanguage
adhiamboperes Aug 24, 2024
f89ed7a
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Aug 27, 2024
946c79b
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Aug 27, 2024
ca334d6
Integrate classrooms and onboarding
adhiamboperes Aug 27, 2024
831fa1c
Fix Admin profile creation and onboarding
adhiamboperes Aug 27, 2024
b94a0f8
Add missing argument proto
adhiamboperes Aug 27, 2024
b3d6ee3
Update broken tests
adhiamboperes Aug 27, 2024
daea15f
Fix profile migration bugs
adhiamboperes Aug 28, 2024
0397de7
Fix failing audio language tests
adhiamboperes Sep 4, 2024
9993552
Add test for arabic inTextInputLayoutBindingAdaptersTest
adhiamboperes Sep 9, 2024
dea8c06
Refactor formatting
adhiamboperes Sep 9, 2024
47af3d1
Address reviewer comment
adhiamboperes Sep 9, 2024
cc7147a
Cleanup language selection impl
adhiamboperes Sep 9, 2024
7c713c6
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Sep 9, 2024
063b97a
Address general comments
adhiamboperes Sep 9, 2024
73105a0
Nit
adhiamboperes Sep 10, 2024
fac0a95
Nit
adhiamboperes Sep 10, 2024
1a4d82d
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Sep 10, 2024
0ceb9fc
Fix failing tests
adhiamboperes Sep 10, 2024
28d2742
Fix failing tests
adhiamboperes Sep 10, 2024
6ae7968
Merge branch 'onboarding-profile-domain-config' of github.com:oppia/o…
adhiamboperes Sep 10, 2024
6a5634e
remove unused import
adhiamboperes Sep 10, 2024
7d2c1a7
Refactor event log management
adhiamboperes Sep 11, 2024
6d90cd2
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Sep 11, 2024
59df467
Refactor function
adhiamboperes Sep 11, 2024
45719dd
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Sep 12, 2024
41c6a68
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Sep 16, 2024
9961d00
Merge branch 'develop' into onboarding-language-domain-config
adhiamboperes Oct 1, 2024
4ff4680
Refactor language selection to use supported languages only
adhiamboperes Oct 1, 2024
9d60f13
Merge branch 'onboarding-language-domain-config' of github.com:oppia/…
adhiamboperes Oct 1, 2024
0047916
Merge branch 'onboarding-language-domain-config' into onboarding-prof…
adhiamboperes Oct 4, 2024
e6f821a
Refactor test to use existing eventlog util function
adhiamboperes Oct 8, 2024
21c85a9
Null check and readability improvements
adhiamboperes Oct 8, 2024
6fbea02
Refactor test setup
adhiamboperes Oct 9, 2024
b30dd7e
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Oct 15, 2024
fd3a10c
Fix failing tests
adhiamboperes Oct 15, 2024
a57310e
Fix failing profile chooser tests
adhiamboperes Oct 16, 2024
943aa87
Resolve merge conflicts
adhiamboperes Oct 22, 2024
8d5a78d
Refactor backpress callback
adhiamboperes Oct 22, 2024
b200e0f
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Nov 4, 2024
7a52213
Fix synchronisation issues caused by createEmptyComposeRule()
adhiamboperes Nov 6, 2024
241d58e
Revert formatting changes
adhiamboperes Nov 6, 2024
537b6b9
Refactor callback code
adhiamboperes Nov 6, 2024
4899492
Revert formatting only changes
adhiamboperes Nov 6, 2024
a133e6d
Add missing tests
adhiamboperes Nov 7, 2024
885a193
Pull latest changes
adhiamboperes Nov 7, 2024
8d294c7
Fix merge issues
adhiamboperes Nov 7, 2024
13ad7ee
Resolve merge conflicts
adhiamboperes Nov 18, 2024
f18fb54
Address reviewer comments
adhiamboperes Nov 19, 2024
e8251c1
Run test on CI without espresso annotation
adhiamboperes Nov 20, 2024
066ea9f
Fix failing tests and livedata bug
adhiamboperes Nov 26, 2024
5f5ea04
Add tests for profile type migration
adhiamboperes Nov 26, 2024
f3f4c6d
Merge branch 'develop' into onboarding-profile-domain-config
BenHenning Nov 26, 2024
fefbd84
Add tests for complete app onboarding
adhiamboperes Nov 26, 2024
0ba097d
Merge branch 'develop' of github.com:oppia/oppia-android into onboard…
adhiamboperes Nov 26, 2024
c83fc69
Added test coverage for onboarding events
adhiamboperes Nov 29, 2024
0d435e4
Merge branch 'onboarding-profile-domain-config' of github.com:oppia/o…
adhiamboperes Nov 29, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class ExitProfileDialogFragment : InjectableDialogFragment() {
if (soleLearnerProfile) {
requireActivity().finish()
} else {
// TODO(#3641): Investigate on using finish instead of intent.
val intent = ProfileChooserActivity.createProfileChooserActivity(requireActivity())
if (!restoreLastCheckedItem) {
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ class SplashActivityPresenter @Inject constructor(
resumeOnboarding(profile.id, profile.name)
}
profile.startedProfileOnboarding && profile.completedProfileOnboarding -> {
loginToProfile(profile.id)
logInToProfile(profile.id)
}
else -> launchOnboardingActivity()
}
Expand All @@ -392,7 +392,7 @@ class SplashActivityPresenter @Inject constructor(
activity.startActivity(intent)
}

private fun loginToProfile(profileId: ProfileId) {
private fun logInToProfile(profileId: ProfileId) {
profileManagementController.loginToProfile(profileId).toLiveData().observe(activity) { result ->
if (result is AsyncResult.Success && !activity.isFinishing) {
launchHomeScreen(profileId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1086,17 +1086,25 @@ class SplashActivityTest {
}

@Test
@RunOn(TestPlatform.ESPRESSO)
fun testSplashActivity_onboardingV2Enabled_onboardedSoleLearnerProfile_routesToHomeActivity() {
runInNewTestApplication {
profileTestHelper.addOnlyAdminProfileWithoutPin()
appStartupStateController.markOnboardingFlowCompleted()
testCoroutineDispatchers.advanceUntilIdle()
}
simulateAppAlreadyOnboarded()
initializeTestApplication(onboardingV2Enabled = true)
profileTestHelper.addOnlyAdminProfileWithoutPin()
testCoroutineDispatchers.runCurrent()

val profileId = ProfileId.newBuilder().setInternalId(0).build()
profileTestHelper.markProfileOnboardingStarted(profileId)
profileTestHelper.markProfileOnboardingEnded(profileId)
monitorFactory.ensureDataProviderExecutes(
profileTestHelper.updateProfileType(profileId, ProfileType.SOLE_LEARNER)
)

monitorFactory.ensureDataProviderExecutes(
profileTestHelper.markProfileOnboardingStarted(profileId)
)
monitorFactory.ensureDataProviderExecutes(
profileTestHelper.markProfileOnboardingEnded(profileId)
)
testCoroutineDispatchers.advanceUntilIdle()

launchSplashActivityPartially {
intended(hasComponent(HomeActivity::class.java.name))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,13 @@ class ProfileTestHelper @Inject constructor(
*
* @returns the [AsyncResult] designating the result of attempting to log into the admin profile
adhiamboperes marked this conversation as resolved.
Show resolved Hide resolved
*/
fun addOnlyAdminProfileWithoutPin(): AsyncResult<Any?> {
fun addOnlyAdminProfileWithoutPin() {
addProfileAndWait(
name = "Admin",
pin = "",
allowDownloadAccess = true,
isAdmin = true
)
return monitorFactory.createMonitor(logIntoAdmin()).waitForNextResult()
}

/** Create [numProfiles] number of user profiles. */
Expand Down
Loading