summaryrefslogtreecommitdiff
path: root/app/src/androidTest/java
diff options
context:
space:
mode:
authorMohamed Zenadi <mohamed@zenadi.com>2017-08-02 11:39:46 +0100
committerMohamed Zenadi <zeapo@users.noreply.github.com>2017-08-10 11:10:29 +0200
commitde5edf6e9366b1544a982e7adf7f53f50e4d3dbf (patch)
tree4472f80dd3bf0b34fafa0d80e9e3b613a24e9810 /app/src/androidTest/java
parent174635d93683c1319e80dd438181610c4895bc8c (diff)
wait a little bit more for decryption
Diffstat (limited to 'app/src/androidTest/java')
-rw-r--r--app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt b/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt
index 6823f67a..f120c73e 100644
--- a/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt
+++ b/app/src/androidTest/java/com/zeapo/pwdstore/DecryptTest.kt
@@ -88,6 +88,8 @@ class DecryptTest {
@Test
fun shouldDecrypt() {
init()
+ val clearPass = IOUtils.toString(testContext.assets.open("clear-store/category/sub"))
+ val passEntry = PasswordEntry(clearPass)
// Setup the timer to 1 second
// first remember the previous timer to set it back later
@@ -97,14 +99,9 @@ class DecryptTest {
45
}
// second set the new timer
- activity.settings.edit().putString("general_show_time", "1").commit()
+ activity.settings.edit().putString("general_show_time", "3").commit()
activity.onBound(null)
- val clearPass = IOUtils.toString(
- IOUtils.toByteArray(testContext.assets.open("clear-store/category/sub")),
- Charsets.UTF_8.name()
- )
- val passEntry = PasswordEntry(clearPass)
// have we decrypted things correctly?
assertEquals(passEntry.password, activity.crypto_password_show.text)
@@ -116,7 +113,7 @@ class DecryptTest {
assertEquals(passEntry.password, clipboard.primaryClip.getItemAt(0).text)
// wait until the clipboard is cleared
- SystemClock.sleep(2000)
+ SystemClock.sleep(4000)
// The clipboard should be cleared!!
assertEquals("", clipboard.primaryClip.getItemAt(0).text)