From e3d9c89b580f39f816898487e77b5092d8a66e0c Mon Sep 17 00:00:00 2001 From: deepanshu731 <78534813+deepanshu731@users.noreply.github.com> Date: Thu, 14 Oct 2021 10:54:22 +0530 Subject: [PATCH] Fix part of #3602: Added label for ProfilePictureActivity (#3881) * addded label for profile picture * Delete deploymentTargetDropDown.xml * Update ProfilePictureActivityTest.kt * Update strings.xml * Update ProfilePictureActivityTest.kt * modified script * Update strings.xml * changed rule * Delete deploymentTargetDropDown.xml * Update ProfilePictureActivityTest.kt * reformatting * changed test * Update ProfilePictureActivityTest.kt --- app/src/main/AndroidManifest.xml | 1 + app/src/main/res/values/strings.xml | 2 ++ .../ProfilePictureActivityTest.kt | 16 ++++++++++++++++ .../accessibility_label_exemptions.textproto | 1 - 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 7d433c0fea2..1e62faa5173 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -129,6 +129,7 @@ android:theme="@style/OppiaThemeWithoutActionBar" /> Cancel Allow Download Access User is able to download and delete content without Administrator password + + Profile Picture Profile Picture Cancel diff --git a/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt b/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt index f3cf1304fb8..a019c79db54 100644 --- a/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt +++ b/app/src/sharedTest/java/org/oppia/android/app/profileprogress/ProfilePictureActivityTest.kt @@ -12,6 +12,7 @@ import androidx.test.espresso.intent.Intents import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.ext.junit.runners.AndroidJUnit4 +import com.google.common.truth.Truth.assertThat import dagger.Component import org.junit.After import org.junit.Before @@ -124,6 +125,21 @@ class ProfilePictureActivityTest { ) } + @Test + fun testProfilePictureActivity_hasCorrectActivityLabel() { + launch( + ProfilePictureActivity::class.java + ).use { scenario -> + scenario.onActivity { activity -> + assertThat(activity.title).isEqualTo( + context.getString( + R.string.profile_picture_activity_title + ) + ) + } + } + } + @Test fun testProfilePictureActivity_userImageIsDisplayed() { launch(createProfilePictureActivityIntent(internalProfileId)).use { diff --git a/scripts/assets/accessibility_label_exemptions.textproto b/scripts/assets/accessibility_label_exemptions.textproto index 952e95fd1c1..b6afae14c79 100644 --- a/scripts/assets/accessibility_label_exemptions.textproto +++ b/scripts/assets/accessibility_label_exemptions.textproto @@ -8,7 +8,6 @@ exempted_activity: "app/src/main/java/org/oppia/android/app/home/HomeActivity" exempted_activity: "app/src/main/java/org/oppia/android/app/home/recentlyplayed/RecentlyPlayedActivity" exempted_activity: "app/src/main/java/org/oppia/android/app/mydownloads/MyDownloadsActivity" 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/testing/AudioFragmentTestActivity" exempted_activity: "app/src/main/java/org/oppia/android/app/testing/BindableAdapterTestActivity"