From ae199313ee39c27985cca375a7fbd985fe28e1fd Mon Sep 17 00:00:00 2001 From: Vincent Breitmoser Date: Sun, 14 Jun 2015 22:33:58 +0200 Subject: instrument: change handling in PassphraseDialogActivity to work with espresso --- .../java/org/sufficientlysecure/keychain/EncryptDecryptTests.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenKeychain/src/androidTest') diff --git a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/EncryptDecryptTests.java b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/EncryptDecryptTests.java index 28fbe3aa9..604c77ece 100644 --- a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/EncryptDecryptTests.java +++ b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/EncryptDecryptTests.java @@ -46,6 +46,7 @@ import static android.support.test.espresso.action.ViewActions.typeText; import static android.support.test.espresso.matcher.RootMatchers.isDialog; import static android.support.test.espresso.matcher.RootMatchers.isPlatformPopup; import static android.support.test.espresso.matcher.ViewMatchers.withId; +import static android.support.test.espresso.matcher.ViewMatchers.withText; import static org.sufficientlysecure.keychain.actions.CustomActions.actionOpenDrawer; import static org.sufficientlysecure.keychain.actions.CustomActions.tokenEncryptViewAddToken; @@ -96,8 +97,11 @@ public class EncryptDecryptTests { pressBack(); onView(withId(R.id.decrypt_from_clipboard)).perform(click()); - // synchronization with passphrase caching thing doesn't work - onView(withId(R.id.passphrase_passphrase)).inRoot(isPlatformPopup()).perform(typeText("x")); + { + onView(withId(R.id.passphrase_passphrase)).perform(typeText("x")); + + onView(withText(R.string.btn_unlock)).perform(click()); + } } -- cgit v1.2.3