oppia-android icon indicating copy to clipboard operation
oppia-android copied to clipboard

Fixes #5972: Profile name accepts invalid inputs like single dot (.) or single space ( )

Open ShankhanilSaha opened this issue 1 month ago • 18 comments

Explanation

Fixes #5972

  • Updates utility/src/main/java/org/oppia/android/util/profile/ProfileNameValidator.kt to only allow names which have only alphabets and spaces.
  • Now names with single dots(.) and single spaces( ) are not allowed anymore which previously were.
  • Creates function createDefaultProfile() in domain/src/main/java/org/oppia/android/domain/profile/ProfileManagementController.kt to create a default profile during onboarding with no checks other than checking no accounts are already present to prevent create a invalid account.
  • Create exception type PROFILES_ALREADY_EXIST for function to return if condition not met.
  • Replace addProfile() with createDefaultProfile() in createDefaultAdminProfile() and createDefaultProfile().

Essential Checklist

  • [x] The PR title and explanation each start with "Fix #bugnum: " (If this PR fixes part of an issue, prefix the title with "Fix part of #bugnum: ...".)
  • [x] Any changes to scripts/assets files have their rationale included in the PR explanation.
  • [x] The PR follows the style guide.
  • [x] The PR does not contain any unnecessary code changes from Android Studio (reference).
  • [x] The PR is made from a branch that's not called "develop" and is up-to-date with "develop".
  • [x] The PR is assigned to the appropriate reviewers (reference).

ShankhanilSaha avatar Nov 03 '25 14:11 ShankhanilSaha

Hi @adhiamboperes, the tests are primarily failing because of the tests in utility/src/test/java/org/oppia/android/util/profile/ProfileNameValidatorTest.kt should i completely remove the tests which are verifying names which were formerly allowed? or should i update them to something like the code in the attatchment which will expect false to formerly allowed names. Screenshot_20251105_230528

ShankhanilSaha avatar Nov 05 '25 17:11 ShankhanilSaha

@adhiamboperes could you please check the error logs once, some tests were failing previously so i fixed them by changing the functions to addAdminProfileAndWait() which fixed the issue of the test looking for a profile before it was even created. But now it seems like there is some maven related dependency downloading issue which i believe has not arrived from my code, could be wrong.

ShankhanilSaha avatar Nov 13 '25 14:11 ShankhanilSaha

@ShankhanilSaha I've re-run the tests, they should work fine now.

theMr17 avatar Nov 13 '25 14:11 theMr17

@adhiamboperes upon making the file changes in this PR a few tests fail in app/src/sharedTest/java/org/oppia/android/app/onboarding/CreateProfileFragmentTest.kt and testing/src/test/java/org/oppia/android/testing/profile/ProfileTestHelperTest.kt even tho tests are unrelated to the changes since they don't use any name which passed previously but gets rejected with the changes. I could use some help with this one.

ShankhanilSaha avatar Nov 13 '25 17:11 ShankhanilSaha

Hi @ShankhanilSaha, those tests are failing because they rely on the ProfileManagementController, which relies on the ProfileNameValidator

adhiamboperes avatar Nov 13 '25 19:11 adhiamboperes

Looking at the traces, it appears that the failing functions rely on an exception that has changed, so there are changes needed downstream as well. I need to review the code first.

adhiamboperes avatar Nov 13 '25 19:11 adhiamboperes

CreateProfileFragmentTest

@ShankhanilSaha, the failing tests in CreateProfileFragmentTest and ProfileTestHelperTest are most likely due to the fact that we are no longer allowing empty names, but in the OnboardingFragmentPresenter, we have a createDefaultProfile function which is meant to create a dummy profile, to be filled later. This lead to the creation of fun createDefaultAdminProfile() in ProfileTestHelper as a helper functions for the scenarios where we need a default empty profile.

The failing tests are probably usages of ProfileTestHelper.createDefaultAdminProfile(). Please review each of the failing tests and see if any usage of createDefaultAdminProfile can be replaced by addOnlyAdminProfile, and in cases where the function cannot be replaced(because it is the functionality under test), or you are unsure, please raise these in the group chat for resolution.

adhiamboperes avatar Nov 18 '25 15:11 adhiamboperes

Hi @adhiamboperes , in CreateProfileFragmentTest and ProfileTestHelperTest, the appropriate files are not loaded for the addAdminProfileAndWait() function.

However, profileTestHelper has another function addOnlyAdminProfile(). Unlike createDefaultAdminProfile(), this starts the setup fresh and ensures there is initially only a single admin profile. I believe this is more suitable for tests, and it fixes the failures (verified locally).

That said, since this doesn't relate directly to the name validation logic, I am not sure why createDefaultAdminProfile() causes the failures. I noticed in previous tests I fixed that createDefaultAdminProfile() was often the root cause. It may not be suitable for tests due to slow execution (I tried using addAdminProfileAndWait() because the logs showed the test checking for a profile before the function had finished creating it).

ShankhanilSaha avatar Nov 20 '25 17:11 ShankhanilSaha

Hi @ShankhanilSaha,

That said, since this doesn't relate directly to the name validation logic, I am not sure why createDefaultAdminProfile() causes the failures. I noticed in previous tests I fixed that createDefaultAdminProfile() was often the root cause. It may not be suitable for tests due to slow execution (I tried using addAdminProfileAndWait() because the logs showed the test checking for a profile before the function had finished creating it).

createDefaultAdminProfile() fails because if you look at the implementation of the function, it creates a profile with an empty name. The new validation logic prohibits empty names. So the function should be updated to have a profile name, e.g. John.

adhiamboperes avatar Nov 24 '25 12:11 adhiamboperes

Please also remember to update the default profile in OnboardingFragmentPresenter to have a default name, "Admin" while keeping the rest of the fields blank as they are. Refer to my previous explanation quoted below.

@ShankhanilSaha, the failing tests in CreateProfileFragmentTest and ProfileTestHelperTest are most likely due to the fact that we are no longer allowing empty names, but in the OnboardingFragmentPresenter, we have a createDefaultProfile function which is meant to create a dummy profile, to be filled later. This lead to the creation of fun createDefaultAdminProfile() in ProfileTestHelper as a helper functions for the scenarios where we need a default empty profile.

adhiamboperes avatar Nov 24 '25 12:11 adhiamboperes

Hi @adhiamboperes could you please let me know about the new function replacing the createDefaultAdminProfile() in brief.

ShankhanilSaha avatar Nov 27 '25 05:11 ShankhanilSaha

Hi Shankhanil, Please create a new function in the ProfileManagementController for creating a default profile. It would have no validations(such as the name validation) and all fields would have default values. It should however check that there are no existing profiles(to avoid misuse).

This function should only be used on the onboarding fargment presenter(where the default profile is currently being created) and the test helper(also as a replacement of the create default profile helper).

Please let me know if you need any further support.

adhiamboperes avatar Nov 27 '25 11:11 adhiamboperes

Hi @adhiamboperes , i am primarily referring to the addProfile() fucntion in the ProfileManagementController file as it is somewhat similar to the function I need to make. Had some questions about the default profile being created, the parameters being passed name: String, pin: String, avatarImagePath: Uri?, allowDownloadAccess: Boolean, colorRgb: Int, isAdmin: Boolean you said should all be default values. Should I just hard code the default values in the function definition or can just make the newProfileBuilder without any parameters and it somehow automatically handles them. If not the later what should the default values be such as name, etc. Also should the profile be admin?

ShankhanilSaha avatar Dec 03 '25 14:12 ShankhanilSaha

Hi @adhiamboperes , i am primarily referring to the addProfile() fucntion in the ProfileManagementController file as it is somewhat similar to the function I need to make. Had some questions about the default profile being created, the parameters being passed name: String, pin: String, avatarImagePath: Uri?, allowDownloadAccess: Boolean, colorRgb: Int, isAdmin: Boolean you said should all be default values. Should I just hard code the default values in the function definition or can just make the newProfileBuilder without any parameters and it somehow automatically handles them. If not the later what should the default values be such as name, etc. Also should the profile be admin?

You should hard code them in the arguments, similar to what is passed in the createDefaultAdminProfile()

adhiamboperes avatar Dec 04 '25 03:12 adhiamboperes

Hi @adhiamboperes , for checking if there are no existing profile

if (it.profilesCount > 0) {
    //Returns in case profiles 
    return@storeDataWithCustomChannelAsync Pair(it, ProfileActionStatus.PROFILES_EXIST) do exist in the db
}

what should I pair in the return statement? Shall I add a attribute in ProfileActionStatus called PROFILES_EXIST? Also should the default profile have admin access?

ShankhanilSaha avatar Dec 04 '25 16:12 ShankhanilSaha

Also this is my proposed function, i just took addProfile() as a reference. Could you please take a look and let me know the changes needed?

    fun createDefaultProfile(): DataProvider<Any?> {
    val deferred = profileDataStore.storeDataWithCustomChannelAsync(
      updateInMemoryCache = true
    ) {
      if (it.profilesCount > 0) {
        return@storeDataWithCustomChannelAsync Pair(it, ProfileActionStatus.PROFILES_EXIST)
      }

      val nextProfileId = it.nextProfileId
      val profileDir = directoryManagementUtil.getOrCreateDir(nextProfileId.toString())

      val newProfile = Profile.newBuilder().apply {
        this.name = ""
        this.pin = ""
        this.allowDownloadAccess = false
        this.allowInLessonQuickLanguageSwitching = false
        this.id = ProfileId.newBuilder().setInternalId(nextProfileId).build()
        dateCreatedTimestampMs = oppiaClock.getCurrentTimeMs()
        this.isAdmin = false
        readingTextSize = ReadingTextSize.MEDIUM_TEXT_SIZE
        numberOfLogins = 0

        avatar = ProfileAvatar.newBuilder().apply {
          avatarColorRgb = -10710042
        }.build()
      }.build()

      val wasProfileEverAdded = it.profilesCount > 0

      val profileDatabaseBuilder =
        it.toBuilder()
          .putProfiles(nextProfileId, newProfile)
          .setWasProfileEverAdded(wasProfileEverAdded)
          .setNextProfileId(nextProfileId + 1)
      Pair(profileDatabaseBuilder.build(), ProfileActionStatus.SUCCESS)
    }
    return dataProviders.createInMemoryDataProviderAsync(ADD_PROFILE_PROVIDER_ID) {
      return@createInMemoryDataProviderAsync getDeferredResult(null, name, deferred)
    }
  }

ShankhanilSaha avatar Dec 04 '25 16:12 ShankhanilSaha

Unassigning @ShankhanilSaha since a re-review was requested. @ShankhanilSaha, please make sure you have addressed all review comments. Thanks!

oppiabot[bot] avatar Dec 04 '25 16:12 oppiabot[bot]

@adhiamboperes The function is created and applied in the necessary places, Please take a look. Also the tests seem to be failing again for those dependencies download issue.

ShankhanilSaha avatar Dec 11 '25 18:12 ShankhanilSaha

Unassigning @adhiamboperes since the review is done.

oppiabot[bot] avatar Dec 15 '25 11:12 oppiabot[bot]

Hi @ShankhanilSaha, it looks like some changes were requested on this pull request by @adhiamboperes. PTAL. Thanks!

oppiabot[bot] avatar Dec 15 '25 11:12 oppiabot[bot]

@adhiamboperes I have added the mentioned tests and addressed the requested changes. Please take a look.

ShankhanilSaha avatar Dec 16 '25 15:12 ShankhanilSaha

Unassigning @ShankhanilSaha since a re-review was requested. @ShankhanilSaha, please make sure you have addressed all review comments. Thanks!

oppiabot[bot] avatar Dec 16 '25 15:12 oppiabot[bot]

Unassigning @adhiamboperes since the review is done.

oppiabot[bot] avatar Dec 16 '25 16:12 oppiabot[bot]

Hi @ShankhanilSaha, it looks like some changes were requested on this pull request by @adhiamboperes. PTAL. Thanks!

oppiabot[bot] avatar Dec 16 '25 16:12 oppiabot[bot]

Coverage Report

Results

Number of files assessed: 129 Overall Coverage: 86.31% Coverage Analysis: PASS :white_check_mark:

Passing coverage

Files with passing code coverage
File Coverage Lines Hit Status Min Required
LintCommon.ktscripts/src/java/org/oppia/android/scripts/lint/LintCommon.kt
96.15% 75 / 78 :white_check_mark: 70%
AndroidLintRunner.ktscripts/src/java/org/oppia/android/scripts/lint/AndroidLintRunner.kt
73.36% 190 / 259 :white_check_mark: 70%
LintProjectDescription.ktscripts/src/java/org/oppia/android/scripts/lint/LintProjectDescription.kt
80.95% 323 / 399 :white_check_mark: 70%
LintModelCreator.ktscripts/src/java/org/oppia/android/scripts/lint/LintModelCreator.kt
81.82% 180 / 220 :white_check_mark: 70%
RepositoryFile.ktscripts/src/java/org/oppia/android/scripts/common/RepositoryFile.kt
96.15% 25 / 26 :white_check_mark: 70%
TransformAndroidManifest.ktscripts/src/java/org/oppia/android/scripts/build/TransformAndroidManifest.kt
100.00% 72 / 72 :white_check_mark: 70%
ComputeChangedFiles.ktscripts/src/java/org/oppia/android/scripts/ci/ComputeChangedFiles.kt
96.53% 167 / 173 :white_check_mark: 70%
ComputeAffectedTests.ktscripts/src/java/org/oppia/android/scripts/ci/ComputeAffectedTests.kt
95.88% 163 / 170 :white_check_mark: 70%
RegexPatternValidationCheck.ktscripts/src/java/org/oppia/android/scripts/regex/RegexPatternValidationCheck.kt
100.00% 104 / 104 :white_check_mark: 70%
AccessibilityLabelCheck.ktscripts/src/java/org/oppia/android/scripts/label/AccessibilityLabelCheck.kt
100.00% 68 / 68 :white_check_mark: 70%
ProfileNameValidator.ktutility/src/main/java/org/oppia/android/util/profile/ProfileNameValidator.kt
100.00% 13 / 13 :white_check_mark: 70%
EventBundleCreator.ktutility/src/main/java/org/oppia/android/util/logging/EventBundleCreator.kt
75.28% 338 / 449 :white_check_mark: 70%
ExplorationStorageTestModule.ktdomain/src/main/java/org/oppia/android/domain/exploration/testing/ExplorationStorageTestModule.kt
100.00% 4 / 4 :white_check_mark: 70%
FakeExplorationRetriever.ktdomain/src/main/java/org/oppia/android/domain/exploration/testing/FakeExplorationRetriever.kt
100.00% 10 / 10 :white_check_mark: 70%
TranslationController.ktdomain/src/main/java/org/oppia/android/domain/translation/TranslationController.kt
94.12% 160 / 170 :white_check_mark: 70%
LanguageConfigRetriever.ktdomain/src/main/java/org/oppia/android/domain/locale/LanguageConfigRetriever.kt
100.00% 5 / 5 :white_check_mark: 70%
FeatureFlagsLogger.ktdomain/src/main/java/org/oppia/android/domain/oppialogger/analytics/FeatureFlagsLogger.kt
100.00% 22 / 22 :white_check_mark: 70%
AppStartupStateController.ktdomain/src/main/java/org/oppia/android/domain/onboarding/AppStartupStateController.kt
91.57% 76 / 83 :white_check_mark: 70%
InitializeDefaultLocaleRule.kttesting/src/main/java/org/oppia/android/testing/junit/InitializeDefaultLocaleRule.kt
100.00% 85 / 85 :white_check_mark: 100% *

* represents tests with custom overridden pass/fail coverage thresholds

Exempted coverage

Files exempted from coverage
File Exemption Reason
TestPlatformParameterModule.kttesting/src/main/java/org/oppia/android/testing/platformparameter/TestPlatformParameterModule.kt
This file is exempted from having a test file; skipping coverage check.
ExplorationCheckpointTestHelper.kttesting/src/main/java/org/oppia/android/testing/lightweightcheckpointing/ExplorationCheckpointTestHelper.kt
This file is incompatible with code coverage tooling; skipping coverage check.
GenericViewMatchers.kttesting/src/main/java/org/oppia/android/testing/espresso/GenericViewMatchers.kt
This file is exempted from having a test file; skipping coverage check.
OppiaTestRule.kttesting/src/main/java/org/oppia/android/testing/OppiaTestRule.kt
This file is exempted from having a test file; skipping coverage check.
OppiaTestAnnotations.kttesting/src/main/java/org/oppia/android/testing/OppiaTestAnnotations.kt
This file is exempted from having a test file; skipping coverage check.
ProfileTestHelper.kttesting/src/main/java/org/oppia/android/testing/profile/ProfileTestHelper.kt
This file is incompatible with code coverage tooling; skipping coverage check.
StoryProgressTestHelper.kttesting/src/main/java/org/oppia/android/testing/story/StoryProgressTestHelper.kt
This file is incompatible with code coverage tooling; skipping coverage check.
FeatureFlagConstants.ktutility/src/main/java/org/oppia/android/util/platformparameter/FeatureFlagConstants.kt
This file is exempted from having a test file; skipping coverage check.
NetworkConnectionDebugUtilModule.ktutility/src/main/java/org/oppia/android/util/networking/NetworkConnectionDebugUtilModule.kt
This file is exempted from having a test file; skipping coverage check.
ListItemLeadingMarginSpan.ktutility/src/main/java/org/oppia/android/util/parser/html/ListItemLeadingMarginSpan.kt
This file is incompatible with code coverage tooling; skipping coverage check.
HtmlParser.ktutility/src/main/java/org/oppia/android/util/parser/html/HtmlParser.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ViewBindingShimImpl.ktapp/src/main/java/org/oppia/android/app/shim/ViewBindingShimImpl.kt
This file is exempted from having a test file; skipping coverage check.
IntentFactoryShimImpl.ktapp/src/main/java/org/oppia/android/app/shim/IntentFactoryShimImpl.kt
This file is exempted from having a test file; skipping coverage check.
ViewBindingShim.ktapp/src/main/java/org/oppia/android/app/shim/ViewBindingShim.kt
This file is exempted from having a test file; skipping coverage check.
IntentFactoryShim.ktapp/src/main/java/org/oppia/android/app/shim/IntentFactoryShim.kt
This file is exempted from having a test file; skipping coverage check.
ProfileProgressActivity.ktapp/src/main/java/org/oppia/android/app/profileprogress/ProfileProgressActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
CompletedStoryListActivity.ktapp/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryListActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
CompletedStoryListFragment.ktapp/src/main/java/org/oppia/android/app/completedstorylist/CompletedStoryListFragment.kt
This file is exempted from having a test file; skipping coverage check.
OptionsActivity.ktapp/src/main/java/org/oppia/android/app/options/OptionsActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ReadingTextSizeFragment.ktapp/src/main/java/org/oppia/android/app/options/ReadingTextSizeFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AudioLanguageSelectionViewModel.ktapp/src/main/java/org/oppia/android/app/options/AudioLanguageSelectionViewModel.kt
This file is exempted from having a test file; skipping coverage check.
AudioLanguageFragmentPresenterV1.ktapp/src/main/java/org/oppia/android/app/options/AudioLanguageFragmentPresenterV1.kt
This file is exempted from having a test file; skipping coverage check.
AppLanguageFragment.ktapp/src/main/java/org/oppia/android/app/options/AppLanguageFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
OptionsFragment.ktapp/src/main/java/org/oppia/android/app/options/OptionsFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AudioLanguageFragment.ktapp/src/main/java/org/oppia/android/app/options/AudioLanguageFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
WalkthroughTopicListFragment.ktapp/src/main/java/org/oppia/android/app/walkthrough/topiclist/WalkthroughTopicListFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ApplicationInjector.ktapp/src/main/java/org/oppia/android/app/application/ApplicationInjector.kt
This file is exempted from having a test file; skipping coverage check.
AbstractOppiaApplication.ktapp/src/main/java/org/oppia/android/app/application/AbstractOppiaApplication.kt
This file is exempted from having a test file; skipping coverage check.
ApplicationComponent.ktapp/src/main/java/org/oppia/android/app/application/ApplicationComponent.kt
This file is exempted from having a test file; skipping coverage check.
ApplicationInjectorProvider.ktapp/src/main/java/org/oppia/android/app/application/ApplicationInjectorProvider.kt
This file is exempted from having a test file; skipping coverage check.
ProfileChooserFragmentTestActivity.ktapp/src/main/java/org/oppia/android/app/testing/ProfileChooserFragmentTestActivity.kt
This file is exempted from having a test file; skipping coverage check.
TopicTestActivityForStory.ktapp/src/main/java/org/oppia/android/app/testing/TopicTestActivityForStory.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ExplorationActivity.ktapp/src/main/java/org/oppia/android/app/player/exploration/ExplorationActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
StateFragment.ktapp/src/main/java/org/oppia/android/app/player/state/StateFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ClassroomListFragment.ktapp/src/main/java/org/oppia/android/app/classroom/ClassroomListFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ClassroomListFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/classroom/ClassroomListFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
SplashActivityPresenter.ktapp/src/main/java/org/oppia/android/app/splash/SplashActivityPresenter.kt
This file is exempted from having a test file; skipping coverage check.
SplashActivity.ktapp/src/main/java/org/oppia/android/app/splash/SplashActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
LifecycleSafeTimerFactory.ktapp/src/main/java/org/oppia/android/app/utility/lifecycle/LifecycleSafeTimerFactory.kt
This file is exempted from having a test file; skipping coverage check.
OngoingTopicListActivity.ktapp/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
OngoingTopicListFragment.ktapp/src/main/java/org/oppia/android/app/ongoingtopiclist/OngoingTopicListFragment.kt
This file is exempted from having a test file; skipping coverage check.
TopicFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/topic/TopicFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
ViewPagerAdapter.ktapp/src/main/java/org/oppia/android/app/topic/ViewPagerAdapter.kt
This file is exempted from having a test file; skipping coverage check.
QuestionPlayerActivity.ktapp/src/main/java/org/oppia/android/app/topic/questionplayer/QuestionPlayerActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicActivity.ktapp/src/main/java/org/oppia/android/app/topic/TopicActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicFragment.ktapp/src/main/java/org/oppia/android/app/topic/TopicFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
RevisionCardFragment.ktapp/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
RevisionCardActivity.ktapp/src/main/java/org/oppia/android/app/topic/revisioncard/RevisionCardActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicLessonsFragment.ktapp/src/main/java/org/oppia/android/app/topic/lessons/TopicLessonsFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicRevisionFragment.ktapp/src/main/java/org/oppia/android/app/topic/revision/TopicRevisionFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicInfoFragment.ktapp/src/main/java/org/oppia/android/app/topic/info/TopicInfoFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicTab.ktapp/src/main/java/org/oppia/android/app/topic/TopicTab.kt
This file is exempted from having a test file; skipping coverage check.
ConceptCardFragment.ktapp/src/main/java/org/oppia/android/app/topic/conceptcard/ConceptCardFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicPracticeFragment.ktapp/src/main/java/org/oppia/android/app/topic/practice/TopicPracticeFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicViewModel.ktapp/src/main/java/org/oppia/android/app/topic/TopicViewModel.kt
This file is exempted from having a test file; skipping coverage check.
AdminAuthActivity.ktapp/src/main/java/org/oppia/android/app/profile/AdminAuthActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ProfileLoginFragment.ktapp/src/main/java/org/oppia/android/app/profile/ProfileLoginFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ProfileChooserFragmentPresenterV1.ktapp/src/main/java/org/oppia/android/app/profile/ProfileChooserFragmentPresenterV1.kt
This file is exempted from having a test file; skipping coverage check.
AdminAuthActivityPresenter.ktapp/src/main/java/org/oppia/android/app/profile/AdminAuthActivityPresenter.kt
This file is exempted from having a test file; skipping coverage check.
ProfileChooserFragment.ktapp/src/main/java/org/oppia/android/app/profile/ProfileChooserFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ProfileLoginFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/profile/ProfileLoginFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
ProfileChooserFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/profile/ProfileChooserFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
ProfileChooserActivity.ktapp/src/main/java/org/oppia/android/app/profile/ProfileChooserActivity.kt
This file is exempted from having a test file; skipping coverage check.
ProfileChooserActivityPresenter.ktapp/src/main/java/org/oppia/android/app/profile/ProfileChooserActivityPresenter.kt
This file is exempted from having a test file; skipping coverage check.
ExitProfileDialogFragment.ktapp/src/main/java/org/oppia/android/app/drawer/ExitProfileDialogFragment.kt
This file is exempted from having a test file; skipping coverage check.
ResumeLessonActivity.ktapp/src/main/java/org/oppia/android/app/resumelesson/ResumeLessonActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ProfileEditDeletionDialogFragment.ktapp/src/main/java/org/oppia/android/app/settings/profile/ProfileEditDeletionDialogFragment.kt
This file is exempted from having a test file; skipping coverage check.
AdminIntroActivity.ktapp/src/main/java/org/oppia/android/app/onboarding/AdminIntroActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
OnboardingProfileTypeFragment.ktapp/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
OnboardingFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/onboarding/OnboardingFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
AdminIntroFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/onboarding/AdminIntroFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
AdminIntroFragment.ktapp/src/main/java/org/oppia/android/app/onboarding/AdminIntroFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
OnboardingFragment.ktapp/src/main/java/org/oppia/android/app/onboarding/OnboardingFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AudioLanguageFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/onboarding/AudioLanguageFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
CreateProfileFragment.ktapp/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
OnboardingProfileTypeFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/onboarding/OnboardingProfileTypeFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
CreateProfileActivity.ktapp/src/main/java/org/oppia/android/app/onboarding/CreateProfileActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
AdminIntroActivityPresenter.ktapp/src/main/java/org/oppia/android/app/onboarding/AdminIntroActivityPresenter.kt
This file is exempted from having a test file; skipping coverage check.
WavyBackgroundView.ktapp/src/main/java/org/oppia/android/app/onboarding/WavyBackgroundView.kt
This file is exempted from having a test file; skipping coverage check.
CreateProfileFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/onboarding/CreateProfileFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
HomeFragmentPresenter.ktapp/src/main/java/org/oppia/android/app/home/HomeFragmentPresenter.kt
This file is exempted from having a test file; skipping coverage check.
RecentlyPlayedActivity.ktapp/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
HomeActivity.ktapp/src/main/java/org/oppia/android/app/home/HomeActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
InjectableAppCompatActivity.ktapp/src/main/java/org/oppia/android/app/activity/InjectableAppCompatActivity.kt
This file is exempted from having a test file; skipping coverage check.
ActivityComponentImpl.ktapp/src/main/java/org/oppia/android/app/activity/ActivityComponentImpl.kt
This file is exempted from having a test file; skipping coverage check.
FeatureFlagsFragment.ktapp/src/main/java/org/oppia/android/app/devoptions/featureflags/FeatureFlagsFragment.kt
This file is incompatible with code coverage tooling; skipping coverage check.
FAQSingleActivity.ktapp/src/main/java/org/oppia/android/app/help/faq/faqsingle/FAQSingleActivity.kt
This file is incompatible with code coverage tooling; skipping coverage check.
FragmentComponentImpl.ktapp/src/main/java/org/oppia/android/app/fragment/FragmentComponentImpl.kt
This file is exempted from having a test file; skipping coverage check.
Constants.ktdata/src/main/java/org/oppia/android/data/backends/gae/Constants.kt
This file is exempted from having a test file; skipping coverage check.
PlatformParameterControllerInjectorProvider.ktdomain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterControllerInjectorProvider.kt
This file is exempted from having a test file; skipping coverage check.
PlatformParameterControllerInjector.ktdomain/src/main/java/org/oppia/android/domain/platformparameter/PlatformParameterControllerInjector.kt
This file is exempted from having a test file; skipping coverage check.
FeatureFlagsMapBindingModule.ktdomain/src/main/java/org/oppia/android/domain/platformparameter/FeatureFlagsMapBindingModule.kt
This file is exempted from having a test file; skipping coverage check.
FeatureFlagBindingModule.ktdomain/src/main/java/org/oppia/android/domain/platformparameter/FeatureFlagBindingModule.kt
This file is exempted from having a test file; skipping coverage check.
ExplorationCheckpointController.ktdomain/src/main/java/org/oppia/android/domain/exploration/lightweightcheckpointing/ExplorationCheckpointController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ExplorationProgressController.ktdomain/src/main/java/org/oppia/android/domain/exploration/ExplorationProgressController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ExplorationStorageModule.ktdomain/src/main/java/org/oppia/android/domain/exploration/ExplorationStorageModule.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ExplorationActiveTimeController.ktdomain/src/main/java/org/oppia/android/domain/exploration/ExplorationActiveTimeController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ExplorationDataController.ktdomain/src/main/java/org/oppia/android/domain/exploration/ExplorationDataController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
SpotlightStateController.ktdomain/src/main/java/org/oppia/android/domain/spotlight/SpotlightStateController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ClassroomController.ktdomain/src/main/java/org/oppia/android/domain/classroom/ClassroomController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
HintHandlerDebugImpl.ktdomain/src/main/java/org/oppia/android/domain/hintsandsolution/HintHandlerDebugImpl.kt
This file is incompatible with code coverage tooling; skipping coverage check.
HintHandlerProdImpl.ktdomain/src/main/java/org/oppia/android/domain/hintsandsolution/HintHandlerProdImpl.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicListController.ktdomain/src/main/java/org/oppia/android/domain/topic/TopicListController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
TopicController.ktdomain/src/main/java/org/oppia/android/domain/topic/TopicController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ProfileManagementController.ktdomain/src/main/java/org/oppia/android/domain/profile/ProfileManagementController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
QuestionAssessmentProgressController.ktdomain/src/main/java/org/oppia/android/domain/question/QuestionAssessmentProgressController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ModifyLessonProgressController.ktdomain/src/main/java/org/oppia/android/domain/devoptions/ModifyLessonProgressController.kt
This file is incompatible with code coverage tooling; skipping coverage check.
StateRetriever.ktdomain/src/main/java/org/oppia/android/domain/util/StateRetriever.kt
This file is incompatible with code coverage tooling; skipping coverage check.
ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProvider.ktdomain/src/main/java/org/oppia/android/domain/classify/rules/itemselectioninput/ItemSelectionInputDoesNotContainAtLeastOneOfRuleClassifierProvider.kt
This file is incompatible with code coverage tooling; skipping coverage check.
StateGraph.ktdomain/src/main/java/org/oppia/android/domain/state/StateGraph.kt
This file is exempted from having a test file; skipping coverage check.

Refer test_file_exemptions.textproto for the comprehensive list of file exemptions and their required coverage percentages.

To learn more, visit the Oppia Android Code Coverage wiki page

github-actions[bot] avatar Dec 19 '25 11:12 github-actions[bot]

Assigning @manas-yu for code owner reviews. Thanks!

oppiabot[bot] avatar Dec 19 '25 17:12 oppiabot[bot]

@adhiamboperes Missed the typo during code review, thanks! I Have pushed the change requested.

ShankhanilSaha avatar Dec 19 '25 19:12 ShankhanilSaha