Skip to content

Conversation

@sherlockbeard
Copy link
Contributor

fixes the error of user talk and dialog box

Fixes #2827
Fixes #2703

previous pull request #3009

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ A review job has been created and sent to the PullRequest network.


@sherlockbeard you can click here to see the review status or cancel the code review job.

@codecov-io
Copy link

Codecov Report

Merging #3014 into master will decrease coverage by <.01%.
The diff coverage is 5.88%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3014      +/-   ##
=========================================
- Coverage    3.74%   3.74%   -0.01%     
=========================================
  Files         249     249              
  Lines       12090   12102      +12     
  Branches     1070    1070              
=========================================
  Hits          453     453              
- Misses      11603   11615      +12     
  Partials       34      34
Impacted Files Coverage Δ
...fr/free/nrw/commons/media/MediaDetailFragment.java 0% <0%> (ø) ⬆️
.../java/fr/free/nrw/commons/delete/DeleteHelper.java 56.62% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6a9018b...af3f109. Read the comment docs.

Copy link
Member

@nicolas-raoul nicolas-raoul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!
And now I understand that it was not just a reformatting, the code was really indented due to the new if/else block, sorry about that!

"Commons:Deletion_requests/" + date, summary);
mwApi.appendEdit(editToken, userPageString + "\n",
"User_Talk:" + sessionManager.getCurrentAccount().name, summary);
"User_Talk:" + media.getCreator(), summary);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add/update the corresponding unit test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@maskaravivek can you help me with unit test. i have never done a test. like what should be the result and where should it be placed .

@nicolas-raoul nicolas-raoul merged commit 09459a3 into commons-app:master Jun 12, 2019
@maskaravivek
Copy link
Contributor

@sherlockbeard Can you add/update unit tests in a different PR. :)

else{
AlertDialog.Builder alert = new AlertDialog.Builder(getActivity());
alert.setMessage("Why should this fileckathon-2018 be deleted?");
alert.setMessage("Why should "+ media.getDisplayTitle() +" be deleted?");
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if you move this hard coded string into strings.xml file in another pull request @sherlockbeard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@neslihanturan i added the string value in #3015

@sherlockbeard
Copy link
Contributor Author

@maskaravivek i am sorry i about know much about unit test.

@maskaravivek
Copy link
Contributor

@sherlockbeard You can take a look at other tests in our repo and go through other online resources to get started.

@nicolas-raoul
Copy link
Member

@maskaravivek @neslihanturan Sorry I merged too early :-/

@neslihanturan
Copy link
Collaborator

Separate pull requests should be okay @nicolas-raoul if they will be sent in a few days so that we don't forget about these 2 minor issues :)

@sherlockbeard
Copy link
Contributor Author

@maskaravivek ok i will try do it. :)

@nicolas-raoul
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Requesting reason twice on nomintion for deletion Deletion nomination sent to my own page, instead of the uploader's page

5 participants