Skip to content

Commit

Permalink
fixed AchievementFragment Unit Test
Browse files Browse the repository at this point in the history
  • Loading branch information
neeldoshii committed Dec 1, 2024
1 parent ba54e01 commit 293cbeb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -391,47 +391,47 @@ class AchievementsFragment : CommonsDaggerSupportFragment(){
}
}

protected fun showUploadInfo() {
fun showUploadInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.images_uploaded),
resources.getString(R.string.images_uploaded_explanation),
IMAGES_UPLOADED_URL
)
}

protected fun showRevertedInfo() {
fun showRevertedInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.image_reverts),
resources.getString(R.string.images_reverted_explanation),
IMAGES_REVERT_URL
)
}

protected fun showUsedByWikiInfo() {
fun showUsedByWikiInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.images_used_by_wiki),
resources.getString(R.string.images_used_explanation),
IMAGES_USED_URL
)
}

protected fun showImagesViaNearbyInfo() {
fun showImagesViaNearbyInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.statistics_wikidata_edits),
resources.getString(R.string.images_via_nearby_explanation),
IMAGES_NEARBY_PLACES_URL
)
}

protected fun showFeaturedImagesInfo() {
fun showFeaturedImagesInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.statistics_featured),
resources.getString(R.string.images_featured_explanation),
IMAGES_FEATURED_URL
)
}

protected fun showThanksReceivedInfo() {
fun showThanksReceivedInfo() {
launchAlertWithHelpLink(
resources.getString(R.string.statistics_thanks),
resources.getString(R.string.thanks_received_explanation),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 293cbeb

Please sign in to comment.