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 activity</string>
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
<!-- 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 @@ -12,6 +12,8 @@ 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 androidx.test.rule.ActivityTestRule
import com.google.common.truth.Truth.assertThat
import dagger.Component
import org.junit.After
import org.junit.Before
Expand Down Expand Up @@ -92,6 +94,11 @@ class ProfilePictureActivityTest {
@get:Rule
val accessibilityTestRule = AccessibilityTestRule()

@get:Rule
val activityTestRule: ActivityTestRule<ProfilePictureActivity> = ActivityTestRule(
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
ProfilePictureActivity::class.java, /* initialTouchMode= */ true, /* launchActivity= */ false
)

@Inject
lateinit var profileTestHelper: ProfileTestHelper

Expand Down Expand Up @@ -123,6 +130,17 @@ class ProfilePictureActivityTest {
)
}

@Test
fun testProfilePictureActivity_hasCorrectActivityLabel() {
activityTestRule.launchActivity(
createProfilePictureActivityIntent(
internalProfileId
)
)
val title = activityTestRule.activity.title
assertThat(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