-
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
Improvements to bulk finalize #5776
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
e8facbd
Don't allow encrypted forms to be bulk finalized
seadowg 82488df
Show unsupported message when trying to bulk finalize unsupported ins…
seadowg 06c1c28
Pull repeated work out of loop
seadowg 057f491
Extract common component for showing snackbars based on LiveData
seadowg 8c39832
Auto send forms after bulk finalization
seadowg 0ef1f5d
Add dialog to confirm bulk finalization
seadowg 046f14b
Confirm how many drafts are being finalized
seadowg 85bb5c2
Account for cases where drafts are not loaded or aren't present
seadowg 73a4956
Remove ViewModel interactions from MenuProvider
seadowg edbb2af
Make sure to pass lifecycle with menu provider
seadowg e809762
Add setting to disable bulk finalize
seadowg f137a4e
Disable bulk finalize for configurations that previously had finalize…
seadowg b06aaad
Fix references in tests
seadowg ad3fc15
Make sure old keys are still importable
seadowg a7cfcf1
Upate schema
seadowg 869fde3
Add analytics for unsupported drafts
seadowg b9202f2
Convert presenter to Kotlin
seadowg 5db872d
Add styling to section header
seadowg f8dff30
Merge remote-tracking branch 'upstream/v2023.3.x' into encrypted-bulk
lognaturel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...Test/java/org/odk/collect/android/support/pages/BulkFinalizationConfirmationDialogPage.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.odk.collect.android.support.pages | ||
|
||
import android.app.Application | ||
import androidx.test.core.app.ApplicationProvider | ||
import androidx.test.espresso.Espresso.onView | ||
import androidx.test.espresso.assertion.ViewAssertions.matches | ||
import androidx.test.espresso.matcher.RootMatchers.isDialog | ||
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed | ||
import androidx.test.espresso.matcher.ViewMatchers.withText | ||
import org.odk.collect.strings.R | ||
import org.odk.collect.strings.R.plurals | ||
import org.odk.collect.strings.localization.getLocalizedQuantityString | ||
|
||
class BulkFinalizationConfirmationDialogPage(private val count: Int) : Page<BulkFinalizationConfirmationDialogPage>() { | ||
override fun assertOnPage(): BulkFinalizationConfirmationDialogPage { | ||
val title = ApplicationProvider.getApplicationContext<Application>() | ||
.getLocalizedQuantityString(plurals.bulk_finalize_confirmation, count, count) | ||
|
||
onView(withText(title)).inRoot(isDialog()).check(matches(isDisplayed())) | ||
return this | ||
} | ||
|
||
fun clickFinalize(): EditSavedFormPage { | ||
return this.clickOnButtonInDialog(R.string.finalize, EditSavedFormPage(false)) | ||
} | ||
|
||
fun clickCancel(): EditSavedFormPage { | ||
return this.clickOnButtonInDialog(R.string.cancel, EditSavedFormPage(false)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 probably use this in a few more places, but as with other PRs for v2023.3 I wanted to minimise the merge conflict risk.