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 #3602: Added label for ProfilePictureActivity #3881

Merged
1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
android:theme="@style/OppiaThemeWithoutActionBar" />
<activity
android:name=".app.profileprogress.ProfilePictureActivity"
android:label="@string/profile_picture_activity_title"
android:theme="@style/OppiaThemeWithoutActionBar" />
<activity
android:name=".app.profileprogress.ProfileProgressActivity"
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,8 @@
<string name="profile_edit_delete_dialog_negative">Cancel</string>
<string name="profile_edit_allow_download_heading">Allow Download Access</string>
<string name="profile_edit_allow_download_sub">User is able to download and delete content without Administrator password</string>
<!-- ProfilePictureActivity -->
<string name="profile_picture_activity_title">Profile Picture</string>
<!-- ProfileProgressActivity -->
<string name="profile_progress_edit_dialog_title">Profile Picture</string>
<string name="profile_picture_edit_alert_dialog_cancel_button">Cancel</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import android.app.Application
import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import androidx.test.core.app.ActivityScenario
import androidx.test.core.app.ActivityScenario.launch
import androidx.test.core.app.ApplicationProvider
import androidx.test.espresso.Espresso.onView
Expand All @@ -12,6 +13,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
Expand Down Expand Up @@ -123,6 +125,20 @@ class ProfilePictureActivityTest {
)
}

@Test
fun testProfilePictureActivity_hasCorrectActivityLabel() {
val scenario: ActivityScenario<ProfilePictureActivity> = launch(
ProfilePictureActivity::class.java
)
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
scenario.onActivity { activity ->
assertThat(activity.title).isEqualTo(
context.getString(
R.string.profile_picture_activity_title
)
)
}
}

@Test
fun testProfilePictureActivity_userImageIsDisplayed() {
launch<ProfilePictureActivity>(createProfilePictureActivityIntent(internalProfileId)).use {
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 @@ -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/splash/SplashActivity"
exempted_activity: "app/src/main/java/org/oppia/android/app/testing/AudioFragmentTestActivity"
Expand Down