-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5776 from seadowg/encrypted-bulk
Improvements to bulk finalize
- Loading branch information
Showing
24 changed files
with
504 additions
and
150 deletions.
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.