-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip
- Loading branch information
Showing
15 changed files
with
152 additions
and
116 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected] | ||
* Contributors: DenBond7 | ||
* Contributors: denbond7 | ||
*/ | ||
|
||
package com.flowcrypt.email.ui | ||
|
@@ -48,7 +48,7 @@ import org.junit.runner.RunWith | |
@RunWith(AndroidJUnit4::class) | ||
class ComposeScreenPasswordProtectedFlowTest : BaseComposeScreenTest() { | ||
private val addPrivateKeyToDatabaseRule = AddPrivateKeyToDatabaseRule() | ||
private val temporaryFolderRule = TemporaryFolder() | ||
private val temporaryFolderRule = TemporaryFolder.builder().parentFolder(SHARED_FOLDER).build() | ||
|
||
override val addAccountToDatabaseRule: AddAccountToDatabaseRule | ||
get() = AddAccountToDatabaseRule( | ||
|
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
/* | ||
* © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected] | ||
* Contributors: DenBond7 | ||
* Contributors: denbond7 | ||
*/ | ||
|
||
package com.flowcrypt.email.ui | ||
|
||
import android.app.Activity | ||
import android.app.Instrumentation | ||
import android.content.Intent | ||
import android.os.Environment | ||
import androidx.core.content.FileProvider | ||
import androidx.test.core.app.ApplicationProvider | ||
import androidx.test.espresso.Espresso.onView | ||
|
@@ -145,7 +144,7 @@ class PublicKeyDetailsFlowTest : BaseTest() { | |
val fileName = "0x" + keyDetails.fingerprint + "-" + sanitizedEmail + "-publickey" + ".asc" | ||
|
||
val file = | ||
File(getTargetContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS), fileName) | ||
File(getTargetContext().getExternalFilesDir(Constants.EXTERNAL_FILES_PATH_SHARED), fileName) | ||
|
||
if (file.exists()) { | ||
file.delete() | ||
|
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 |
---|---|---|
@@ -1,14 +1,13 @@ | ||
/* | ||
* © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected] | ||
* Contributors: DenBond7 | ||
* Contributors: denbond7 | ||
*/ | ||
|
||
package com.flowcrypt.email.ui.fragment.isolation.incontainer | ||
|
||
import android.app.Activity | ||
import android.app.Instrumentation | ||
import android.content.Intent | ||
import android.os.Environment | ||
import androidx.core.content.FileProvider | ||
import androidx.recyclerview.widget.RecyclerView | ||
import androidx.test.espresso.Espresso.onView | ||
|
@@ -164,7 +163,7 @@ class PrivateKeyDetailsFragmentInIsolationTest : BaseTest() { | |
val details = addPrivateKeyToDatabaseRule.pgpKeyRingDetails | ||
|
||
val file = File( | ||
getTargetContext().getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS), | ||
getTargetContext().getExternalFilesDir(Constants.EXTERNAL_FILES_PATH_SHARED), | ||
"0x" + details.fingerprint + ".asc" | ||
) | ||
|
||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected] | ||
* Contributors: ivan | ||
* Contributors: denbond7 | ||
*/ | ||
|
||
package com.flowcrypt.email.util | ||
|
@@ -9,7 +9,6 @@ import android.app.Activity | |
import android.content.Context | ||
import android.content.Intent | ||
import android.os.Bundle | ||
import android.os.Environment | ||
import androidx.core.content.FileProvider | ||
import androidx.navigation.NavDeepLinkBuilder | ||
import androidx.test.core.app.ApplicationProvider | ||
|
@@ -97,7 +96,7 @@ object TestGeneralUtil { | |
fun createFileWithContent(fileName: String, byteArray: ByteArray): File { | ||
val file = File( | ||
InstrumentationRegistry.getInstrumentation().targetContext | ||
.getExternalFilesDir(Environment.DIRECTORY_DOCUMENTS), fileName | ||
.getExternalFilesDir(Constants.EXTERNAL_FILES_PATH_SHARED), fileName | ||
) | ||
try { | ||
FileOutputStream(file).use { outputStream -> outputStream.write(byteArray) } | ||
|
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/* | ||
* © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected] | ||
* Contributors: DenBond7 | ||
* Contributors: denbond7 | ||
*/ | ||
|
||
package com.flowcrypt.email | ||
|
@@ -74,6 +74,7 @@ class Constants { | |
const val FORWARDED_ATTACHMENTS_CACHE_DIR = "forwarded" | ||
const val ATTACHMENTS_CACHE_DIR = "attachments" | ||
const val DRAFT_CACHE_DIR = "draft" | ||
const val EXTERNAL_FILES_PATH_SHARED = "shared" | ||
|
||
/** | ||
* The password quality types. | ||
|
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
Oops, something went wrong.