Compare commits

...

4 Commits

27 changed files with 49 additions and 102 deletions

View File

@ -18,7 +18,6 @@ package org.matrix.android.sdk.account
import androidx.test.filters.LargeTest import androidx.test.filters.LargeTest
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -40,7 +39,6 @@ class AccountCreationTest : InstrumentedTest {
} }
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun createAccountAndLoginAgainTest() = runSessionTest(context()) { commonTestHelper -> fun createAccountAndLoginAgainTest() = runSessionTest(context()) { commonTestHelper ->
val session = commonTestHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(withInitialSync = true)) val session = commonTestHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(withInitialSync = true))

View File

@ -18,7 +18,6 @@ package org.matrix.android.sdk.account
import org.amshove.kluent.shouldBeTrue import org.amshove.kluent.shouldBeTrue
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -31,7 +30,6 @@ import org.matrix.android.sdk.common.TestConstants
@RunWith(JUnit4::class) @RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
@Ignore("This test will be ignored until it is fixed")
class ChangePasswordTest : InstrumentedTest { class ChangePasswordTest : InstrumentedTest {
companion object { companion object {

View File

@ -22,7 +22,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals import org.junit.Assert.assertNotEquals
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.MethodSorters import org.junit.runners.MethodSorters
@ -41,7 +40,6 @@ import java.util.UUID
@Suppress("SpellCheckingInspection") @Suppress("SpellCheckingInspection")
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Ignore
class AttachmentEncryptionTest { class AttachmentEncryptionTest {
private fun checkDecryption(input: String, encryptedFileInfo: EncryptedFileInfo): String { private fun checkDecryption(input: String, encryptedFileInfo: EncryptedFileInfo): String {

View File

@ -22,7 +22,6 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals import org.junit.Assert.assertNotEquals
import org.junit.Assert.assertNull import org.junit.Assert.assertNull
import org.junit.Before import org.junit.Before
import org.junit.Ignore
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
@ -38,7 +37,6 @@ import org.matrix.olm.OlmSession
private const val DUMMY_DEVICE_KEY = "DeviceKey" private const val DUMMY_DEVICE_KEY = "DeviceKey"
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@Ignore
class CryptoStoreTest : InstrumentedTest { class CryptoStoreTest : InstrumentedTest {
@get:Rule val rule = RetryTestRule(3) @get:Rule val rule = RetryTestRule(3)

View File

@ -64,7 +64,6 @@ import org.matrix.android.sdk.common.TestMatrixCallback
import org.matrix.android.sdk.mustFail import org.matrix.android.sdk.mustFail
import java.util.concurrent.CountDownLatch import java.util.concurrent.CountDownLatch
// @Ignore("This test fails with an unhandled exception thrown from a coroutine which terminates the entire test run.")
@RunWith(JUnit4::class) @RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
@LargeTest @LargeTest

View File

@ -21,7 +21,6 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue import org.junit.Assert.assertTrue
import org.junit.Assert.fail import org.junit.Assert.fail
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.MethodSorters import org.junit.runners.MethodSorters
@ -31,7 +30,6 @@ import org.junit.runners.MethodSorters
*/ */
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Ignore
class ExportEncryptionTest { class ExportEncryptionTest {
@Test @Test

View File

@ -25,7 +25,6 @@ import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue import org.junit.Assert.assertTrue
import org.junit.Assert.fail import org.junit.Assert.fail
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.MethodSorters import org.junit.runners.MethodSorters
@ -48,7 +47,6 @@ import kotlin.coroutines.resume
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
@LargeTest @LargeTest
@Ignore
class XSigningTest : InstrumentedTest { class XSigningTest : InstrumentedTest {
@Test @Test

View File

@ -25,7 +25,6 @@ import org.amshove.kluent.internal.assertEquals
import org.junit.Assert import org.junit.Assert
import org.junit.Assert.assertNull import org.junit.Assert.assertNull
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
@ -51,7 +50,6 @@ import org.matrix.android.sdk.mustFail
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
@LargeTest @LargeTest
@Ignore
class KeyShareTests : InstrumentedTest { class KeyShareTests : InstrumentedTest {
@get:Rule val rule = RetryTestRule(3) @get:Rule val rule = RetryTestRule(3)

View File

@ -22,7 +22,6 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue import org.junit.Assert.assertTrue
import org.junit.Before import org.junit.Before
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.MethodSorters import org.junit.runners.MethodSorters
@ -32,7 +31,6 @@ import org.matrix.android.sdk.common.assertByteArrayNotEqual
import org.matrix.olm.OlmManager import org.matrix.olm.OlmManager
import org.matrix.olm.OlmPkDecryption import org.matrix.olm.OlmPkDecryption
@Ignore("Ignored in order to speed up test run time")
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
class KeysBackupPasswordTest : InstrumentedTest { class KeysBackupPasswordTest : InstrumentedTest {

View File

@ -22,7 +22,6 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull import org.junit.Assert.assertNull
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.MethodSorters import org.junit.runners.MethodSorters
@ -218,7 +217,6 @@ class QuadSTests : InstrumentedTest {
} }
@Test @Test
@Ignore("Test is working locally, not in GitHub actions")
fun test_GetSecretWithBadPassphrase() = runSessionTest(context()) { testHelper -> fun test_GetSecretWithBadPassphrase() = runSessionTest(context()) { testHelper ->
val aliceSession = testHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(true)) val aliceSession = testHelper.createAccount(TestConstants.USER_ALICE, SessionTestParams(true))

View File

@ -25,7 +25,6 @@ import org.junit.Assert.assertNull
import org.junit.Assert.assertTrue import org.junit.Assert.assertTrue
import org.junit.Assert.fail import org.junit.Assert.fail
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.MethodSorters import org.junit.runners.MethodSorters
@ -52,7 +51,6 @@ import java.util.concurrent.CountDownLatch
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING) @FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Ignore
class SASTest : InstrumentedTest { class SASTest : InstrumentedTest {
@Test @Test
@ -136,7 +134,6 @@ class SASTest : InstrumentedTest {
} }
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun test_key_agreement_protocols_must_include_curve25519() = runCryptoTest(context()) { cryptoTestHelper, testHelper -> fun test_key_agreement_protocols_must_include_curve25519() = runCryptoTest(context()) { cryptoTestHelper, testHelper ->
fail("Not passing for the moment") fail("Not passing for the moment")
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom() val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
@ -192,7 +189,6 @@ class SASTest : InstrumentedTest {
} }
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun test_key_agreement_macs_Must_include_hmac_sha256() = runCryptoTest(context()) { cryptoTestHelper, testHelper -> fun test_key_agreement_macs_Must_include_hmac_sha256() = runCryptoTest(context()) { cryptoTestHelper, testHelper ->
fail("Not passing for the moment") fail("Not passing for the moment")
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom() val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
@ -229,7 +225,6 @@ class SASTest : InstrumentedTest {
} }
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun test_key_agreement_short_code_include_decimal() = runCryptoTest(context()) { cryptoTestHelper, testHelper -> fun test_key_agreement_short_code_include_decimal() = runCryptoTest(context()) { cryptoTestHelper, testHelper ->
fail("Not passing for the moment") fail("Not passing for the moment")
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom() val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
@ -340,7 +335,6 @@ class SASTest : InstrumentedTest {
* Test that when alice starts a 'correct' request, bob agrees. * Test that when alice starts a 'correct' request, bob agrees.
*/ */
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun test_aliceAndBobAgreement() = runCryptoTest(context()) { cryptoTestHelper, testHelper -> fun test_aliceAndBobAgreement() = runCryptoTest(context()) { cryptoTestHelper, testHelper ->
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom() val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom()

View File

@ -19,7 +19,6 @@ package org.matrix.android.sdk.internal.crypto.verification.qrcode
import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.ext.junit.runners.AndroidJUnit4
import org.amshove.kluent.shouldBe import org.amshove.kluent.shouldBe
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.MethodSorters import org.junit.runners.MethodSorters
@ -42,7 +41,6 @@ import kotlin.coroutines.resume
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
@Ignore
class VerificationTest : InstrumentedTest { class VerificationTest : InstrumentedTest {
data class ExpectedResult( data class ExpectedResult(

View File

@ -21,7 +21,6 @@ import org.commonmark.parser.Parser
import org.commonmark.renderer.html.HtmlRenderer import org.commonmark.renderer.html.HtmlRenderer
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.MethodSorters import org.junit.runners.MethodSorters
@ -138,7 +137,6 @@ class MarkdownParserTest : InstrumentedTest {
* Note: the test is not passing, it does not work on Element Web neither * Note: the test is not passing, it does not work on Element Web neither
*/ */
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun parseStrike_not_passing() { fun parseStrike_not_passing() {
testType( testType(
name = "strike", name = "strike",
@ -148,7 +146,6 @@ class MarkdownParserTest : InstrumentedTest {
} }
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun parseStrikeNewLines() { fun parseStrikeNewLines() {
testTypeNewLines( testTypeNewLines(
name = "strike", name = "strike",
@ -168,7 +165,6 @@ class MarkdownParserTest : InstrumentedTest {
// TODO. Improve testTypeNewLines function to cover <pre><code class="language-code">test</code></pre> // TODO. Improve testTypeNewLines function to cover <pre><code class="language-code">test</code></pre>
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun parseCodeNewLines_not_passing() { fun parseCodeNewLines_not_passing() {
testTypeNewLines( testTypeNewLines(
name = "code", name = "code",
@ -188,7 +184,6 @@ class MarkdownParserTest : InstrumentedTest {
} }
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun parseCode2NewLines_not_passing() { fun parseCode2NewLines_not_passing() {
testTypeNewLines( testTypeNewLines(
name = "code", name = "code",
@ -207,7 +202,6 @@ class MarkdownParserTest : InstrumentedTest {
} }
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun parseCode3NewLines_not_passing() { fun parseCode3NewLines_not_passing() {
testTypeNewLines( testTypeNewLines(
name = "code", name = "code",
@ -244,7 +238,6 @@ class MarkdownParserTest : InstrumentedTest {
} }
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun parseQuote_not_passing() { fun parseQuote_not_passing() {
"> quoted\nline2".let { markdownParser.parse(it).expect(it, "<blockquote><p>quoted<br />line2</p></blockquote>") } "> quoted\nline2".let { markdownParser.parse(it).expect(it, "<blockquote><p>quoted<br />line2</p></blockquote>") }
} }

View File

@ -22,7 +22,6 @@ import org.amshove.kluent.shouldBeFalse
import org.amshove.kluent.shouldBeNull import org.amshove.kluent.shouldBeNull
import org.amshove.kluent.shouldBeTrue import org.amshove.kluent.shouldBeTrue
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -39,7 +38,6 @@ import java.util.concurrent.CountDownLatch
@RunWith(JUnit4::class) @RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
@Ignore("Remaining Integration tests are unstable if run with this test. Issue #5439")
class ThreadMessagingTest : InstrumentedTest { class ThreadMessagingTest : InstrumentedTest {
@Test @Test

View File

@ -22,7 +22,6 @@ import org.amshove.kluent.internal.assertEquals
import org.amshove.kluent.shouldBeFalse import org.amshove.kluent.shouldBeFalse
import org.amshove.kluent.shouldBeTrue import org.amshove.kluent.shouldBeTrue
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -53,7 +52,6 @@ class TimelineForwardPaginationTest : InstrumentedTest {
* This test ensure that if we click to permalink, we will be able to go back to the live * This test ensure that if we click to permalink, we will be able to go back to the live
*/ */
@Test @Test
@Ignore("Ignoring this test until it's fixed since it blocks the CI.")
fun forwardPaginationTest() = runCryptoTest(context()) { cryptoTestHelper, commonTestHelper -> fun forwardPaginationTest() = runCryptoTest(context()) { cryptoTestHelper, commonTestHelper ->
val numberOfMessagesToSend = 90 val numberOfMessagesToSend = 90
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceInARoom(false) val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceInARoom(false)

View File

@ -20,7 +20,6 @@ import androidx.test.filters.LargeTest
import org.amshove.kluent.shouldBeFalse import org.amshove.kluent.shouldBeFalse
import org.amshove.kluent.shouldBeTrue import org.amshove.kluent.shouldBeTrue
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -40,7 +39,6 @@ import java.util.concurrent.CountDownLatch
@RunWith(JUnit4::class) @RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
@Ignore("This test will be ignored until it is fixed")
@LargeTest @LargeTest
class TimelinePreviousLastForwardTest : InstrumentedTest { class TimelinePreviousLastForwardTest : InstrumentedTest {

View File

@ -20,7 +20,6 @@ import androidx.test.filters.LargeTest
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import org.amshove.kluent.internal.assertEquals import org.amshove.kluent.internal.assertEquals
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -39,7 +38,6 @@ import org.matrix.android.sdk.common.TestConstants
@RunWith(JUnit4::class) @RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
@LargeTest @LargeTest
@Ignore
class TimelineSimpleBackPaginationTest : InstrumentedTest { class TimelineSimpleBackPaginationTest : InstrumentedTest {
@Test @Test

View File

@ -19,7 +19,6 @@ package org.matrix.android.sdk.session.room.timeline
import androidx.test.filters.LargeTest import androidx.test.filters.LargeTest
import org.junit.Assert.fail import org.junit.Assert.fail
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -38,7 +37,6 @@ import java.util.concurrent.CountDownLatch
*/ */
@RunWith(JUnit4::class) @RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
@Ignore("This test will be ignored until it is fixed")
@LargeTest @LargeTest
class TimelineWithManyMembersTest : InstrumentedTest { class TimelineWithManyMembersTest : InstrumentedTest {

View File

@ -22,7 +22,6 @@ import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull import org.junit.Assert.assertNotNull
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -108,7 +107,6 @@ class SpaceCreationTest : InstrumentedTest {
} }
@Test @Test
@Ignore
fun testJoinSimplePublicSpace() = runSessionTest(context()) { commonTestHelper -> fun testJoinSimplePublicSpace() = runSessionTest(context()) { commonTestHelper ->
val aliceSession = commonTestHelper.createAccount("alice", SessionTestParams(true)) val aliceSession = commonTestHelper.createAccount("alice", SessionTestParams(true))

View File

@ -22,7 +22,6 @@ import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals import org.junit.Assert.assertEquals
import org.junit.Assert.assertTrue import org.junit.Assert.assertTrue
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -248,7 +247,6 @@ class SpaceHierarchyTest : InstrumentedTest {
} }
@Test @Test
@Ignore("This test will be ignored until it is fixed")
fun testBreakCycle() = runSessionTest(context()) { commonTestHelper -> fun testBreakCycle() = runSessionTest(context()) { commonTestHelper ->
val session = commonTestHelper.createAccount("John", SessionTestParams(true)) val session = commonTestHelper.createAccount("John", SessionTestParams(true))

View File

@ -19,8 +19,10 @@ package im.vector.app
import androidx.test.espresso.Espresso.onView import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions.click import androidx.test.espresso.action.ViewActions.click
import androidx.test.espresso.action.ViewActions.closeSoftKeyboard import androidx.test.espresso.action.ViewActions.closeSoftKeyboard
import androidx.test.espresso.action.ViewActions.replaceText
import androidx.test.espresso.action.ViewActions.typeText import androidx.test.espresso.action.ViewActions.typeText
import androidx.test.espresso.assertion.ViewAssertions.matches import androidx.test.espresso.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isEnabled import androidx.test.espresso.matcher.ViewMatchers.isEnabled
import androidx.test.espresso.matcher.ViewMatchers.withId import androidx.test.espresso.matcher.ViewMatchers.withId
@ -29,10 +31,7 @@ import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.ext.junit.runners.AndroidJUnit4 import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest import androidx.test.filters.LargeTest
import im.vector.app.features.MainActivity import im.vector.app.features.MainActivity
import im.vector.app.features.analytics.ui.consent.AnalyticsOptInActivity
import im.vector.app.features.home.HomeActivity
import org.hamcrest.CoreMatchers.not import org.hamcrest.CoreMatchers.not
import org.junit.Ignore
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
@ -40,7 +39,6 @@ import kotlin.random.Random
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@LargeTest @LargeTest
@Ignore
class RegistrationTest { class RegistrationTest {
@get:Rule @get:Rule
@ -48,83 +46,82 @@ class RegistrationTest {
@Test @Test
fun simpleRegister() { fun simpleRegister() {
val userId: String = "UiAutoTest_${Random.nextLong()}" val userId: String = "test-${Random.nextLong()}"
val password: String = "password" val password: String = "password"
val homeServerUrl: String = "http://10.0.2.2:8080" val homeServerUrl: String = "http://10.0.2.2:8080"
// Check splashscreen is there // Check splashscreen is there
onView(withId(R.id.loginSplashSubmit)) onView(withId(R.id.loginSplashSubmit))
.check(matches(isDisplayed())) .check(matches(isDisplayed()))
.check(matches(withText(R.string.login_splash_submit))) .check(matches(withText(R.string.login_splash_create_account)))
// Click on get started // Click on get started
onView(withId(R.id.loginSplashSubmit)) onView(withId(R.id.loginSplashSubmit))
.perform(click()) .perform(click())
// Check that homeserver options are shown // Check that use case screen is shown
onView(withId(R.id.loginServerTitle)) onView(withId(R.id.useCaseHeaderTitle))
.check(matches(isDisplayed())) .check(matches(isDisplayed()))
.check(matches(withText(R.string.login_server_title))) .check(matches(withText(R.string.ftue_auth_use_case_title)))
// Chose custom server // Chose friends and family
onView(withId(R.id.loginServerChoiceOther)) onView(withId(R.id.useCaseOptionOne))
.perform(click())
// Wait for matrix.org data to be retrieved
onView(ViewMatchers.isRoot())
.perform(waitForView(withId(R.id.editServerButton)))
// Edit server url
onView(withId(R.id.editServerButton))
.perform(click()) .perform(click())
// Enter local synapse // Enter local synapse
onView(withId(R.id.loginServerUrlFormHomeServerUrl)) onView(withId(R.id.chooseServerInputEditText))
.perform(typeText(homeServerUrl)) .perform()
// Text is not empty so use `replaceText` instead of `typeText`
.perform(replaceText(homeServerUrl))
// Click on continue // Click on continue
onView(withId(R.id.loginServerUrlFormSubmit)) onView(withId(R.id.chooseServerSubmit))
.check(matches(isEnabled())) .check(matches(isEnabled()))
.perform(closeSoftKeyboard(), click()) .perform(closeSoftKeyboard(), click())
// Click on the signup button // Ensure password flow supported (wait for data to be retrieved)
onView(withId(R.id.loginSignupSigninSubmit)) onView(ViewMatchers.isRoot())
.check(matches(isDisplayed())) .perform(waitForView(withId(R.id.createAccountHeaderTitle)))
.perform(click())
// Ensure password flow supported onView(withId(R.id.createAccountEditText))
onView(withId(R.id.loginField))
.check(matches(isDisplayed())) .check(matches(isDisplayed()))
onView(withId(R.id.passwordField)) onView(withId(R.id.createAccountPassword))
.check(matches(isDisplayed())) .check(matches(isDisplayed()))
// Ensure user id // Type user id
onView(withId(R.id.loginField)) onView(withId(R.id.createAccountEditText))
.perform(typeText(userId)) .perform(typeText(userId))
// Ensure login button not yet enabled // Ensure login button not yet enabled
onView(withId(R.id.loginSubmit)) onView(withId(R.id.createAccountSubmit))
.check(matches(not(isEnabled()))) .check(matches(not(isEnabled())))
// Ensure password // Type password
onView(withId(R.id.passwordField)) onView(withId(R.id.createAccountPassword))
.perform(closeSoftKeyboard(), typeText(password)) .perform(closeSoftKeyboard(), typeText(password))
// Submit // Submit
onView(withId(R.id.loginSubmit)) onView(withId(R.id.createAccountSubmit))
.check(matches(isEnabled())) .check(matches(isEnabled()))
.perform(closeSoftKeyboard(), click()) .perform(closeSoftKeyboard(), click())
withIdlingResource(activityIdlingResource(AnalyticsOptInActivity::class.java)) { // Personalization
onView(withId(R.id.later)) onView(ViewMatchers.isRoot())
.check(matches(isDisplayed())) .perform(waitForView(withId(R.id.accountCreatedTakeMeHome)))
.perform(click()) onView(withId(R.id.accountCreatedTakeMeHome))
} .perform(click())
withIdlingResource(activityIdlingResource(HomeActivity::class.java)) { // Analytics
onView(withId(R.id.roomListContainer)) onView(ViewMatchers.isRoot())
.check(matches(isDisplayed())) .perform(waitForView(withId(R.id.submit)))
} onView(withId(R.id.submit))
.perform(click())
val activity = EspressoHelper.getCurrentActivity()!!
val uiSession = (activity as HomeActivity).activeSessionHolder.getActiveSession()
// Wait for initial sync and check room list is there
withIdlingResource(initialSyncIdlingResource(uiSession)) {
onView(withId(R.id.roomListContainer))
.check(matches(isDisplayed()))
}
} }
} }

View File

@ -44,7 +44,6 @@ import im.vector.app.features.crypto.recover.SetupMode
import im.vector.app.features.home.HomeActivity import im.vector.app.features.home.HomeActivity
import org.hamcrest.CoreMatchers.not import org.hamcrest.CoreMatchers.not
import org.junit.Before import org.junit.Before
import org.junit.Ignore
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
@ -53,7 +52,6 @@ import kotlin.random.Random
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@LargeTest @LargeTest
@Ignore
class SecurityBootstrapTest : VerificationTestBase() { class SecurityBootstrapTest : VerificationTestBase() {
var existingSession: Session? = null var existingSession: Session? = null

View File

@ -39,7 +39,6 @@ import im.vector.app.features.MainActivity
import im.vector.app.features.home.HomeActivity import im.vector.app.features.home.HomeActivity
import org.hamcrest.CoreMatchers.not import org.hamcrest.CoreMatchers.not
import org.junit.Before import org.junit.Before
import org.junit.Ignore
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
@ -59,7 +58,6 @@ import kotlin.random.Random
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@LargeTest @LargeTest
@Ignore
class VerifySessionInteractiveTest : VerificationTestBase() { class VerifySessionInteractiveTest : VerificationTestBase() {
var existingSession: Session? = null var existingSession: Session? = null

View File

@ -44,7 +44,6 @@ import im.vector.app.features.crypto.recover.SetupMode
import im.vector.app.features.home.HomeActivity import im.vector.app.features.home.HomeActivity
import kotlinx.coroutines.runBlocking import kotlinx.coroutines.runBlocking
import org.junit.Before import org.junit.Before
import org.junit.Ignore
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
@ -59,7 +58,6 @@ import kotlin.random.Random
@RunWith(AndroidJUnit4::class) @RunWith(AndroidJUnit4::class)
@LargeTest @LargeTest
@Ignore
class VerifySessionPassphraseTest : VerificationTestBase() { class VerifySessionPassphraseTest : VerificationTestBase() {
var existingSession: Session? = null var existingSession: Session? = null

View File

@ -31,7 +31,6 @@ import org.amshove.kluent.shouldBeEqualTo
import org.amshove.kluent.shouldBeTrue import org.amshove.kluent.shouldBeTrue
import org.junit.BeforeClass import org.junit.BeforeClass
import org.junit.FixMethodOrder import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test import org.junit.Test
import org.junit.runner.RunWith import org.junit.runner.RunWith
import org.junit.runners.JUnit4 import org.junit.runners.JUnit4
@ -41,7 +40,6 @@ import java.util.concurrent.TimeUnit
@RunWith(JUnit4::class) @RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM) @FixMethodOrder(MethodSorters.JVM)
@Ignore
class SpanUtilsTest : InstrumentedTest { class SpanUtilsTest : InstrumentedTest {
companion object { companion object {
@ -149,6 +147,7 @@ class SpanUtilsTest : InstrumentedTest {
} }
}) })
EmojiCompat.init(context()) EmojiCompat.init(context())
load()
latch.await(30, TimeUnit.SECONDS) latch.await(30, TimeUnit.SECONDS)
} }
} }

View File

@ -26,10 +26,13 @@ import org.amshove.kluent.shouldBeNull
import org.amshove.kluent.shouldExist import org.amshove.kluent.shouldExist
import org.amshove.kluent.shouldNotBeNull import org.amshove.kluent.shouldNotBeNull
import org.amshove.kluent.shouldNotExist import org.amshove.kluent.shouldNotExist
import org.junit.FixMethodOrder
import org.junit.Rule import org.junit.Rule
import org.junit.Test import org.junit.Test
import org.junit.runners.MethodSorters
import java.io.File import java.io.File
@FixMethodOrder(MethodSorters.JVM)
class VoiceRecorderLTests { class VoiceRecorderLTests {
@get:Rule @get:Rule
@ -48,8 +51,9 @@ class VoiceRecorderLTests {
stopRecord() stopRecord()
} }
// Renamed to be run first... It fixes it.
@Test @Test
fun stopRecordKeepsFile() = with(recorder) { fun atFirstStopRecordKeepsFile() = with(recorder) {
getVoiceMessageFile().shouldBeNull() getVoiceMessageFile().shouldBeNull()
startRecord("some_room_id") startRecord("some_room_id")

View File

@ -104,6 +104,7 @@
app:layout_constraintTop_toBottomOf="@id/titleContentSpacing"> app:layout_constraintTop_toBottomOf="@id/titleContentSpacing">
<com.google.android.material.textfield.TextInputEditText <com.google.android.material.textfield.TextInputEditText
android:id="@+id/chooseServerInputEditText"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:imeOptions="actionDone" android:imeOptions="actionDone"