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 HomeActivity #3850

Merged
merged 22 commits into from
Nov 17, 2021
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
0a445ba
Label added for HomeActivity
vrajdesai78 Sep 27, 2021
edcbefb
HomeActivity removed from label exemptions
vrajdesai78 Sep 28, 2021
820c1bd
Removed translatable=false
vrajdesai78 Sep 29, 2021
ea83bd0
Test created for HomeActivity
vrajdesai78 Sep 29, 2021
dc92bc2
Merge branch 'add-label-for-homeactivity' of https://github.com/vrajd…
vrajdesai78 Sep 29, 2021
53bbb7a
Merge branch 'develop' into add-label-for-homeactivity
vrajdesai78 Sep 29, 2021
69adfff
removed summary value
vrajdesai78 Oct 12, 2021
9a9cdd6
Update deploymentTargetDropDown.xml
vrajdesai78 Oct 19, 2021
abcd039
Update deploymentTargetDropDown.xml
vrajdesai78 Oct 19, 2021
f304f1d
Updated testcase
vrajdesai78 Oct 19, 2021
9e580fd
Updated strings.xml
vrajdesai78 Oct 26, 2021
445304d
Delete deploymentTargetDropDown.xml
vrajdesai78 Nov 1, 2021
05a3e52
ActivityTestRule removed
vrajdesai78 Nov 1, 2021
dd5c371
Merge branch 'add-label-for-homeactivity' of https://github.com/vrajd…
vrajdesai78 Nov 1, 2021
7da2231
multiple home string removed
vrajdesai78 Nov 11, 2021
825695e
.idea/runConfigurations.xml file reverted back
vrajdesai78 Nov 12, 2021
1b7ea3e
Removed unused imports
vrajdesai78 Nov 12, 2021
af264b5
reformated code
vrajdesai78 Nov 12, 2021
08b7ae1
Fixed unnecessary changes
vrajdesai78 Nov 13, 2021
680c4e2
String.xml updated
vrajdesai78 Nov 13, 2021
3385770
removed changes from strings.xml
vrajdesai78 Nov 13, 2021
d113c5b
strings.xml updated removed unncessary changes
vrajdesai78 Nov 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .idea/deploymentTargetDropDown.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
android:theme="@style/OppiaThemeWithoutActionBar" />
<activity
android:name=".app.home.HomeActivity"
android:label="@string/home_activity_title"
android:theme="@style/OppiaThemeWithoutActionBar" />
<activity
android:name=".app.home.recentlyplayed.RecentlyPlayedActivity"
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 @@ -293,6 +293,8 @@
<string name="home_activity_back_dialog_message">Would you like to exit your profile?</string>
<string name="home_activity_back_dialog_cancel">Cancel</string>
<string name="home_activity_back_dialog_exit">Exit</string>
<!-- HomeActivity -->
<string name="home_activity_title">Home</string>
BenHenning marked this conversation as resolved.
Show resolved Hide resolved
<!-- ProfileListActivity -->
<string name="profile_list_activity_title">Profiles</string>
<!-- ProfileEditActivity -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ import androidx.test.espresso.intent.matcher.IntentMatchers.hasComponent
import androidx.test.espresso.intent.matcher.IntentMatchers.hasExtra
import androidx.test.espresso.matcher.RootMatchers.isDialog
import androidx.test.espresso.matcher.ViewMatchers.Visibility
import androidx.test.espresso.matcher.ViewMatchers.assertThat
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isRoot
import androidx.test.espresso.matcher.ViewMatchers.withEffectiveVisibility
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.rule.ActivityTestRule
import com.google.common.truth.Truth.assertThat
import dagger.Component
import org.hamcrest.CoreMatchers.allOf
Expand Down Expand Up @@ -161,6 +163,10 @@ class HomeActivityTest {
val accessibilityTestRule = AccessibilityTestRule()

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

val oppiaTestRule = OppiaTestRule()

@Inject
Expand Down Expand Up @@ -223,6 +229,17 @@ class HomeActivityTest {
}
}

@Test
fun testHomeActivity_hasCorrectActivityLabel() {
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
activityTestRule.launchActivity(
createHomeActivityIntent(
internalProfileId
)
)
val title = activityTestRule.activity.title
assertThat(title).isEqualTo(context.getString(R.string.home_activity_title))
rt4914 marked this conversation as resolved.
Show resolved Hide resolved
}

@Test
fun testHomeActivity_withAdminProfile_configChange_profileNameIsDisplayed() {
launch<HomeActivity>(createHomeActivityIntent(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 @@ -4,7 +4,6 @@ exempted_activity: "app/src/main/java/org/oppia/android/app/devoptions/markstori
exempted_activity: "app/src/main/java/org/oppia/android/app/devoptions/marktopicscompleted/testing/MarkTopicsCompletedTestActivity"
exempted_activity: "app/src/main/java/org/oppia/android/app/devoptions/vieweventlogs/testing/ViewEventLogsTestActivity"
exempted_activity: "app/src/main/java/org/oppia/android/app/devoptions/testing/DeveloperOptionsTestActivity"
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"
Expand Down