-
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
Disable 'Save as draft' when 'Moving backwards' is disabled #5647
Conversation
import org.odk.collect.android.support.rules.TestRuleChain | ||
|
||
@RunWith(AndroidJUnit4::class) | ||
class MovingBackwardsTest { |
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.
What's the thinking around adding this instead of adding tests to FormEntryAccessPreferencesFragmentTest
?
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.
We can't test disabling moving backwards in isolation (using fragment-scenario like in FormEntryAccessPreferencesFragmentTest
) because that fragment displays MovingBackwardsDialog
which calls a listener from ProjectPreferencesActivity
and then it calls a method from FormEntryAccessPreferencesFragment
, so there is that activity involved.
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.
Just a (potential) test change here. This is ready for QA!
...ect_app/src/androidTest/java/org/odk/collect/android/feature/settings/MovingBackwardsTest.kt
Outdated
Show resolved
Hide resolved
Tested with Success! Verified on device with Android 13 Verified cases:
|
Tested with Success! Verified on device with Android 10 |
Closes #5148
What has been done to verify that this works as intended?
I've tested the fix manually and added automated tests.
Why is this the best possible solution? Were any other approaches considered?
There is not much to discuss here. I've handled that new setting in the same way like other settings related to moving backwards/editing forms.
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?
Please test the case described in the issue and generally that the settings that should be disabled when moving backwards is disabled are handled properly.
It's also important to make sure that settings are migrated properly. For example, if moving backwards was disabled in the previous version after upgrading
Save as draft
should be disabled, andFinalize
should be enabled (in Settings -> Access control -> Form Entry Settings).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 checkAll
and confirmed all checks still pass OR confirm CircleCI build passes and run./gradlew connectedDebugAndroidTest
locally.