fixed AchievementFragment Unit Test

This commit is contained in:
Neel Doshi 2024-12-02 00:42:14 +05:30
parent ba54e010d2
commit 293cbebbba
2 changed files with 8 additions and 8 deletions

View file

@ -136,7 +136,7 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){
/**
* To invoke the AlertDialog on clicking info button
*/
protected fun showInfoDialog() {
fun showInfoDialog() {
launchAlert(
resources.getString(R.string.Achievements),
resources.getString(R.string.achievements_info_message)
@ -391,7 +391,7 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){
}
}
protected fun showUploadInfo() {
fun showUploadInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.images_uploaded),
resources.getString(R.string.images_uploaded_explanation),
@ -399,7 +399,7 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){
)
}
protected fun showRevertedInfo() {
fun showRevertedInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.image_reverts),
resources.getString(R.string.images_reverted_explanation),
@ -407,7 +407,7 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){
)
}
protected fun showUsedByWikiInfo() {
fun showUsedByWikiInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.images_used_by_wiki),
resources.getString(R.string.images_used_explanation),
@ -415,7 +415,7 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){
)
}
protected fun showImagesViaNearbyInfo() {
fun showImagesViaNearbyInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.statistics_wikidata_edits),
resources.getString(R.string.images_via_nearby_explanation),
@ -423,7 +423,7 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){
)
}
protected fun showFeaturedImagesInfo() {
fun showFeaturedImagesInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.statistics_featured),
resources.getString(R.string.images_featured_explanation),
@ -431,7 +431,7 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){
)
}
protected fun showThanksReceivedInfo() {
fun showThanksReceivedInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.statistics_thanks),
resources.getString(R.string.thanks_received_explanation),

View file

@ -79,7 +79,7 @@ class AchievementsFragmentUnitTests {
fragmentTransaction.commitNowAllowingStateLoss()
layoutInflater = LayoutInflater.from(activity)
view = fragment.onCreateView(layoutInflater, activity.findViewById(R.id.container), null)!!
view = fragment.onCreateView(layoutInflater, activity.findViewById(R.id.container), null)
achievements = Achievements(0, 0, 0, 0, 0, 0, 0)
}