diff options
author | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-06-30 17:14:17 +0200 |
---|---|---|
committer | Dominik Schürmann <dominik@dominikschuermann.de> | 2015-06-30 17:14:17 +0200 |
commit | 677afa90fce133b81c195488e07f07a5a83e2f0b (patch) | |
tree | 127c6844082b0fdf840e10f0aad4923b80c38cf4 /OpenKeychain/src/androidTest/java/org/sufficientlysecure | |
parent | 715188ccdaf9659aec2fec348505cd7675b62f52 (diff) | |
parent | f29d8351bad70b3c3aa80f899c3a90030bd67e17 (diff) | |
download | open-keychain-677afa90fce133b81c195488e07f07a5a83e2f0b.tar.gz open-keychain-677afa90fce133b81c195488e07f07a5a83e2f0b.tar.bz2 open-keychain-677afa90fce133b81c195488e07f07a5a83e2f0b.zip |
Merge branch 'master' of github.com:open-keychain/open-keychain
Diffstat (limited to 'OpenKeychain/src/androidTest/java/org/sufficientlysecure')
-rw-r--r-- | OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/ui/AsymmetricTextOperationTests.java | 33 |
1 files changed, 6 insertions, 27 deletions
diff --git a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/ui/AsymmetricTextOperationTests.java b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/ui/AsymmetricTextOperationTests.java index 6b226142c..cb3d2cb17 100644 --- a/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/ui/AsymmetricTextOperationTests.java +++ b/OpenKeychain/src/androidTest/java/org/sufficientlysecure/keychain/ui/AsymmetricTextOperationTests.java @@ -32,15 +32,14 @@ import org.junit.runner.RunWith; import org.sufficientlysecure.keychain.R; import org.sufficientlysecure.keychain.service.PassphraseCacheService; import org.sufficientlysecure.keychain.ui.util.Notify.Style; +import org.sufficientlysecure.keychain.util.FileHelper; import static android.support.test.espresso.Espresso.onData; import static android.support.test.espresso.Espresso.onView; import static android.support.test.espresso.Espresso.pressBack; import static android.support.test.espresso.action.ViewActions.click; import static android.support.test.espresso.action.ViewActions.typeText; -import static android.support.test.espresso.assertion.ViewAssertions.doesNotExist; import static android.support.test.espresso.assertion.ViewAssertions.matches; -import static android.support.test.espresso.contrib.DrawerActions.openDrawer; import static android.support.test.espresso.matcher.ViewMatchers.hasDescendant; import static android.support.test.espresso.matcher.ViewMatchers.isAssignableFrom; import static android.support.test.espresso.matcher.ViewMatchers.isDescendantOfA; @@ -115,33 +114,13 @@ public class AsymmetricTextOperationTests { onView(withId(R.id.passphrase_passphrase)).perform(typeText("x")); onView(withText(R.string.btn_unlock)).perform(click()); - onView(isRecyclerItemView(R.id.decrypted_files_list, hasDescendant(withText(R.string.filename_unknown_text)))) - .check(matches(allOf(withEncryptionStatus(true), withSignatureNone()))); - - } - - } - - @Test - public void testTextEncryptDecryptFromKeyView() throws Exception { - - String cleartext = randomString(10, 30); - - pressBack(); - - { // encrypt - - // navigate to edit key dialog - onData(withKeyItemId(0x9D604D2F310716A3L)) - .inAdapterView(allOf(isAssignableFrom(AdapterView.class), - isDescendantOfA(withId(R.id.key_list_list)))) - .perform(click()); - onView(withId(R.id.view_key_action_encrypt_text)).perform(click()); - - // make sure the encrypt is correctly set - onView(withId(R.id.result_encryption_icon)).check(matches(withDisplayedChild(1))); + .check(matches(allOf( + hasDescendant(withText(FileHelper.readableFileSize(cleartext.length()))), + withEncryptionStatus(true), + withSignatureNone() + ))); } |