-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fixed marking converted projects as old GD projects #5909
Conversation
…riveProjectsDeleterTest is reliable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An alternative solution I think would be worth considering is to add a test in ProjectsRepositoryTest
(the "contract" test) to cover the difference in behaviour between the two implementations and then get that passing. Then you can continue to use the fake rather than the real implementation in tests.
What do you think?
I don't think the bug we had was something I could test using |
Tested with Success! Verified on a device with Android 10 Verified cases:
|
Tested with Success! Verified on a device with Android 13 |
Closes #5903
Why is this the best possible solution? Were any other approaches considered?
The problem was the way we implemented marking projects as old GD projects see: https://github.com/getodk/collect/pull/5909/files#diff-a091971b93c91fe4e50308d51b4b3abebac66e51711552f955e75feb504ea928L30
it worked well with existing tests because they used test implementation of
ProjectsRepository
and simply updating the objects stored on a list (not in shared prefs) worked well.How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?
This is a small fix so we can focus on testing the scenario described in the issue. I don't think there is any bigger risk here.
Do we need any specific form for testing your changes? If so, please attach one.
No.
Does this change require updates to documentation? If so, please file an issue here and include the link below.
No.
Before submitting this PR, please make sure you have:
./gradlew connectedAndroidTest
(or./gradlew testLab
) and confirmed all checks still pass