Skip to content

Commit

Permalink
Fix part of #3602: Added label for ProfilePictureActivity (#3881)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
deepanshu731 authored Oct 14, 2021
1 parent f266da8 commit e3d9c89
Show file tree
Hide file tree
Showing 4 changed files with 19 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 @@ -129,6 +129,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 @@ -310,6 +310,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 @@ -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
Expand Down Expand Up @@ -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<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/testing/AudioFragmentTestActivity"
exempted_activity: "app/src/main/java/org/oppia/android/app/testing/BindableAdapterTestActivity"
Expand Down

0 comments on commit e3d9c89

Please sign in to comment.