-
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.
- Loading branch information
Showing
11 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
...c/androidTest/java/org/odk/collect/android/feature/entitymanagement/DeleteEntitiesTest.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,33 @@ | ||
package org.odk.collect.android.feature.entitymanagement | ||
|
||
import org.junit.Rule | ||
import org.junit.Test | ||
import org.junit.rules.RuleChain | ||
import org.odk.collect.android.support.TestDependencies | ||
import org.odk.collect.android.support.pages.FormEntryPage | ||
import org.odk.collect.android.support.rules.CollectTestRule | ||
import org.odk.collect.android.support.rules.TestRuleChain | ||
import org.odk.collect.strings.R.string | ||
|
||
class DeleteEntitiesTest { | ||
|
||
private val rule = CollectTestRule(useDemoProject = false) | ||
private val testDependencies = TestDependencies() | ||
|
||
@get:Rule | ||
val ruleChain: RuleChain = TestRuleChain.chain(testDependencies) | ||
.around(rule) | ||
|
||
@Test | ||
fun canClearAllEntities() { | ||
testDependencies.server.addForm("one-question-entity-registration.xml") | ||
|
||
rule.withMatchExactlyProject(testDependencies.server.url) | ||
.startBlankForm("One Question Entity Registration") | ||
.fillOutAndFinalize(FormEntryPage.QuestionAndAnswer("Name", "Logan Roy")) | ||
.openEntityBrowser() | ||
.clickOptionsIcon(string.clear_entities) | ||
.clickOnString(string.clear_entities) | ||
.assertTextDoesNotExist("people") | ||
} | ||
} |
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
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
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
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
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,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<menu xmlns:android="http://schemas.android.com/apk/res/android" | ||
xmlns:app="http://schemas.android.com/apk/res-auto"> | ||
|
||
<item | ||
android:id="@+id/clear_entities" | ||
android:title="@string/clear_entities" | ||
app:showAsAction="never" /> | ||
</menu> |
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