-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 unit tests for pull request #5262 #5291
Comments
Hello @nicolas-raoul, I'm new to the Open Source community, and would like to take this as one of my first issues. Can I take over this? |
@axelthepony27 It is yours, thanks! Please let us know about your progress every few days. :-) |
Hi @nicolas-raoul, I'd like to help out if @axelthepony27 is no longer actively working on this. |
@axelthepony27 If you have some code for this would you mind sending a draft pull request? |
@nicolas-raoul - Just to make sure, since the PR in question has not been merged yet, I am assuming it is needed to branch out of the PR's branch? |
Yes exactly! 🙂 |
@nicolas-raoul - Running the unit tests, I see the following:
These tests are found inside the file LocationPickerActivityUnitTests When debugging these tests, I see:
Apart from what is written in the PR, can you elaborate on what was done in it and what the unit tests themselves did before they failed? |
@nicolas-raoul - Adding null checks in LocationPickerActivity around removeLocationButton makes the tests pass. So I am tending to believe that the button does not show up as it used to show up previously. I am assuming there is a test user account I can use? |
There is unfortunately no test user account, you will have to create one (free). Here is the user workflow:
|
Thanks @nicolas-raoul. Could that be what is causing the tests to fail? I assume that previously they might have been there(?). If this is the case, what would you like done here? Below is a gif I took that demonstrates the user flow you described above. |
Could you please try again with a picture that has a location in its EXIF? The file you chose does not have a location. |
@nicolas-raoul , tried with several images that have their location in their EXIF, but still saw the same flow. An example is the image with the dogs used from here. If you have an image you would like me to use, let me know. |
@TomerPacific Would you mind sending me an email? I will reply with a link to a Google Drive containing such pictures. My email address is visible at https://nicolasraoul.github.io |
@nicolas-raoul - Sent you an email |
@TomerPacific I just added you to the Drive, thanks! https://drive.google.com/corp/drive/folders/1tXJed0djQUK9V2G7cX7AIMSb6ckwEOzY |
@nicolas-raoul - Using one the pictures from the drive link, I am able to see that when you open the location it shows the edit location and remove location buttons. Question is, why when the unit test testOnStyleLoaded is run, it cannot find the removeLocation button. Could it be that the test is using an image without a location? |
Yes, you're on a good lead! Would you mind finding and sharing what image is used by the unit test? |
@nicolas-raoul - Looking inside the unit tests, I see a folder under resources called ImageTest. But I don't see them being used anywhere in the project. Any idea how to proceed here? |
When you run that unit test in debug mode, where do you see the variables coming from? You may need to study the unit test and mock frameworks being used. |
@nicolas-raoul - I have found the problem. The problem is, since I used the fork of the user who worked on that feature, I cannot create a PR directly for the repository. Your advice on how to proceed here will be greatly appreciated. |
Wonderful! No problem, either create the pull request there, or create a different branch from the main repo then pull from that person's branch and apply your changes before sending us a pull request. 🙂 |
@nicolas-raoul - Opened a PR. |
@nicolas-raoul I think this issue could be closed as #5262 is also closed, and no more unit tests related to that PR or issue is failing. |
@ShashwatKedia Indeed thanks! :-) |
#5262 introduces a useful feature, but makes two unit tests fail.
The task here is to fix these unit tests. Any volunteer? :-)
The text was updated successfully, but these errors were encountered: