-
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
Do not lock the forms db when a form uses entities but is started in view-only mode #6487
Conversation
@@ -1144,6 +1144,37 @@ class FormUriActivityTest { | |||
) | |||
} | |||
|
|||
@Test | |||
fun `When attempting to view a non-editable form that uses entities and the forms database is locked then start form for view only`() { |
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.
Would this test not be enough? We'd maybe want to add an assertion that here that opening the view-only form doesn't lock the forms change lock, but I'm not sure if we need the two connected tests?
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.
I have added one extra test here and removed those connected ones.
0e7859a
to
8d9e47f
Compare
|
||
fun clickOnExit(): SendFinalizedFormPage { | ||
clickOnString(org.odk.collect.strings.R.string.exit) | ||
return SendFinalizedFormPage() |
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.
This should be return SendFinalizedFormPage().assertOnPage()
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.
Actually, this method is no longer used so I removed it al all.
Tested with Success! Verified on a device with Android 10 Verified cases:
|
Tested with Success! Verified on a device with Android 15 |
Closes #6485
Why is this the best possible solution? Were any other approaches considered?
When opening forms in view-only mode (forms that can't be edited), it doesn't make sense to block downloading updates, nor does it make sense to block opening such forms during these processes.
There’s nothing to discuss regarding the implementation, as the location where this case needs to be handled is clear -
FormUriActivity
.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?
We need to test opening finalized and sent forms (forms that can't be edited) to ensure they don't block form updates and can still be opened during such processes.
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 passDateFormatsTest