From acf56bc94df8a8b38310eb5cc4dba567c9dd67f1 Mon Sep 17 00:00:00 2001 From: Grzegorz Orczykowski Date: Sat, 16 Dec 2023 18:31:58 +0100 Subject: [PATCH] Added a failing test --- .../instancemanagement/DeleteSavedFormTest.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/collect_app/src/androidTest/java/org/odk/collect/android/feature/instancemanagement/DeleteSavedFormTest.java b/collect_app/src/androidTest/java/org/odk/collect/android/feature/instancemanagement/DeleteSavedFormTest.java index 48beeea22f4..fa2120558b6 100644 --- a/collect_app/src/androidTest/java/org/odk/collect/android/feature/instancemanagement/DeleteSavedFormTest.java +++ b/collect_app/src/androidTest/java/org/odk/collect/android/feature/instancemanagement/DeleteSavedFormTest.java @@ -6,6 +6,8 @@ import org.junit.Test; import org.junit.rules.RuleChain; import org.junit.runner.RunWith; +import org.odk.collect.android.R; +import org.odk.collect.android.support.pages.DeleteSavedFormPage; import org.odk.collect.android.support.rules.CollectTestRule; import org.odk.collect.android.support.rules.TestRuleChain; import org.odk.collect.android.support.pages.MainMenuPage; @@ -36,4 +38,18 @@ public void deletingAForm_removesFormFromFinalizedForms() { .pressBack(new MainMenuPage()) .assertNumberOfFinalizedForms(0); } + + @Test + public void accessingSortMenuInDeleteSavedInstancesShouldNotCrashTheAppAfterRotatingTheDevice() { + rule.startAtMainMenu() + .copyForm("one-question.xml") + .startBlankForm("One Question") + .answerQuestion("what is your age", "30") + .swipeToEndScreen() + .clickFinalize() + .clickDeleteSavedForm() + .rotateToLandscape(new DeleteSavedFormPage()) + .clickOnId(R.id.menu_sort) + .assertText(org.odk.collect.strings.R.string.sort_by); + } }