From daf4716b631e974c76132de05e853b081cd9f83a Mon Sep 17 00:00:00 2001 From: bkaur-bkj <64087572+bkaur-bkj@users.noreply.github.com> Date: Thu, 7 Oct 2021 06:27:26 +0530 Subject: [PATCH] #Fixes 3868 : Add label for splash activity (#3868) * added label for splash activity * changed the Splash Activity label to Oppia * updated the test case --- app/src/main/AndroidManifest.xml | 1 + .../oppia/android/app/splash/SplashActivityTest.kt | 11 +++++++++++ .../assets/accessibility_label_exemptions.textproto | 1 - 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index a165fb2eba1..c5f15f4bfc3 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -150,6 +150,7 @@ diff --git a/app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt index bec5c88d305..4dfa5800e92 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/splash/SplashActivityTest.kt @@ -382,6 +382,17 @@ class SplashActivityTest { intended(hasComponent(OnboardingActivity::class.java.name)) } + @Test + fun testSplashActivity_hasCorrectActivityLabel() { + initializeTestApplication() + + activityTestRule.launchActivity(null) + testCoroutineDispatchers.advanceUntilIdle() + + val title = activityTestRule.activity.title + assertThat(title).isEqualTo(context.getString(R.string.app_name)) + } + private fun simulateAppAlreadyOnboarded() { // Simulate the app was already onboarded by creating an isolated onboarding flow controller and // saving the onboarding status on the system before the activity is opened. Note that this has diff --git a/scripts/assets/accessibility_label_exemptions.textproto b/scripts/assets/accessibility_label_exemptions.textproto index 4db1efcb503..952e95fd1c1 100644 --- a/scripts/assets/accessibility_label_exemptions.textproto +++ b/scripts/assets/accessibility_label_exemptions.textproto @@ -10,7 +10,6 @@ exempted_activity: "app/src/main/java/org/oppia/android/app/mydownloads/MyDownlo exempted_activity: "app/src/main/java/org/oppia/android/app/player/state/testing/StateFragmentTestActivity" exempted_activity: "app/src/main/java/org/oppia/android/app/profileprogress/ProfilePictureActivity" exempted_activity: "app/src/main/java/org/oppia/android/app/settings/profile/ProfileEditActivity" -exempted_activity: "app/src/main/java/org/oppia/android/app/splash/SplashActivity" exempted_activity: "app/src/main/java/org/oppia/android/app/testing/AudioFragmentTestActivity" exempted_activity: "app/src/main/java/org/oppia/android/app/testing/BindableAdapterTestActivity" exempted_activity: "app/src/main/java/org/oppia/android/app/testing/ConceptCardFragmentTestActivity"