Skip to content

Commit

Permalink
#Fixes 3868 : Add label for splash activity (#3868)
Browse files Browse the repository at this point in the history
* added label for splash activity

* changed the Splash Activity label to Oppia

* updated the test case
  • Loading branch information
bkaur-bkj authored Oct 7, 2021
1 parent 3a2ae5a commit daf4716
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
<activity
android:name=".app.splash.SplashActivity"
android:screenOrientation="portrait"
android:label="@string/app_name"
android:theme="@style/SplashScreenTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion scripts/assets/accessibility_label_exemptions.textproto
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit daf4716

Please sign in to comment.