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 org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@ -40,7 +39,6 @@ class AccountCreationTest : InstrumentedTest {
}
@Test
@Ignore("This test will be ignored until it is fixed")
fun createAccountAndLoginAgainTest() = runSessionTest(context()) { commonTestHelper ->
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.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@ -31,7 +30,6 @@ import org.matrix.android.sdk.common.TestConstants
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
@Ignore("This test will be ignored until it is fixed")
class ChangePasswordTest : InstrumentedTest {
companion object {

View File

@ -22,7 +22,6 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotEquals
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@ -41,7 +40,6 @@ import java.util.UUID
@Suppress("SpellCheckingInspection")
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Ignore
class AttachmentEncryptionTest {
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.assertNull
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@ -38,7 +37,6 @@ import org.matrix.olm.OlmSession
private const val DUMMY_DEVICE_KEY = "DeviceKey"
@RunWith(AndroidJUnit4::class)
@Ignore
class CryptoStoreTest : InstrumentedTest {
@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 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)
@FixMethodOrder(MethodSorters.JVM)
@LargeTest

View File

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

View File

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

View File

@ -25,7 +25,6 @@ import org.amshove.kluent.internal.assertEquals
import org.junit.Assert
import org.junit.Assert.assertNull
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@ -51,7 +50,6 @@ import org.matrix.android.sdk.mustFail
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
@LargeTest
@Ignore
class KeyShareTests : InstrumentedTest {
@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.Before
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
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.OlmPkDecryption
@Ignore("Ignored in order to speed up test run time")
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
class KeysBackupPasswordTest : InstrumentedTest {

View File

@ -22,7 +22,6 @@ import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.Assert.assertNull
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@ -218,7 +217,6 @@ class QuadSTests : InstrumentedTest {
}
@Test
@Ignore("Test is working locally, not in GitHub actions")
fun test_GetSecretWithBadPassphrase() = runSessionTest(context()) { testHelper ->
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.fail
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@ -52,7 +51,6 @@ import java.util.concurrent.CountDownLatch
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@Ignore
class SASTest : InstrumentedTest {
@Test
@ -136,7 +134,6 @@ class SASTest : InstrumentedTest {
}
@Test
@Ignore("This test will be ignored until it is fixed")
fun test_key_agreement_protocols_must_include_curve25519() = runCryptoTest(context()) { cryptoTestHelper, testHelper ->
fail("Not passing for the moment")
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
@ -192,7 +189,6 @@ class SASTest : InstrumentedTest {
}
@Test
@Ignore("This test will be ignored until it is fixed")
fun test_key_agreement_macs_Must_include_hmac_sha256() = runCryptoTest(context()) { cryptoTestHelper, testHelper ->
fail("Not passing for the moment")
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
@ -229,7 +225,6 @@ class SASTest : InstrumentedTest {
}
@Test
@Ignore("This test will be ignored until it is fixed")
fun test_key_agreement_short_code_include_decimal() = runCryptoTest(context()) { cryptoTestHelper, testHelper ->
fail("Not passing for the moment")
val cryptoTestData = cryptoTestHelper.doE2ETestWithAliceAndBobInARoom()
@ -340,7 +335,6 @@ class SASTest : InstrumentedTest {
* Test that when alice starts a 'correct' request, bob agrees.
*/
@Test
@Ignore("This test will be ignored until it is fixed")
fun test_aliceAndBobAgreement() = runCryptoTest(context()) { cryptoTestHelper, testHelper ->
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 org.amshove.kluent.shouldBe
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.MethodSorters
@ -42,7 +41,6 @@ import kotlin.coroutines.resume
@RunWith(AndroidJUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
@Ignore
class VerificationTest : InstrumentedTest {
data class ExpectedResult(

View File

@ -21,7 +21,6 @@ import org.commonmark.parser.Parser
import org.commonmark.renderer.html.HtmlRenderer
import org.junit.Assert.assertEquals
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
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
*/
@Test
@Ignore("This test will be ignored until it is fixed")
fun parseStrike_not_passing() {
testType(
name = "strike",
@ -148,7 +146,6 @@ class MarkdownParserTest : InstrumentedTest {
}
@Test
@Ignore("This test will be ignored until it is fixed")
fun parseStrikeNewLines() {
testTypeNewLines(
name = "strike",
@ -168,7 +165,6 @@ class MarkdownParserTest : InstrumentedTest {
// TODO. Improve testTypeNewLines function to cover <pre><code class="language-code">test</code></pre>
@Test
@Ignore("This test will be ignored until it is fixed")
fun parseCodeNewLines_not_passing() {
testTypeNewLines(
name = "code",
@ -188,7 +184,6 @@ class MarkdownParserTest : InstrumentedTest {
}
@Test
@Ignore("This test will be ignored until it is fixed")
fun parseCode2NewLines_not_passing() {
testTypeNewLines(
name = "code",
@ -207,7 +202,6 @@ class MarkdownParserTest : InstrumentedTest {
}
@Test
@Ignore("This test will be ignored until it is fixed")
fun parseCode3NewLines_not_passing() {
testTypeNewLines(
name = "code",
@ -244,7 +238,6 @@ class MarkdownParserTest : InstrumentedTest {
}
@Test
@Ignore("This test will be ignored until it is fixed")
fun parseQuote_not_passing() {
"> 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.shouldBeTrue
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@ -39,7 +38,6 @@ import java.util.concurrent.CountDownLatch
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
@Ignore("Remaining Integration tests are unstable if run with this test. Issue #5439")
class ThreadMessagingTest : InstrumentedTest {
@Test

View File

@ -22,7 +22,6 @@ import org.amshove.kluent.internal.assertEquals
import org.amshove.kluent.shouldBeFalse
import org.amshove.kluent.shouldBeTrue
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
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
*/
@Test
@Ignore("Ignoring this test until it's fixed since it blocks the CI.")
fun forwardPaginationTest() = runCryptoTest(context()) { cryptoTestHelper, commonTestHelper ->
val numberOfMessagesToSend = 90
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.shouldBeTrue
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@ -40,7 +39,6 @@ import java.util.concurrent.CountDownLatch
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
@Ignore("This test will be ignored until it is fixed")
@LargeTest
class TimelinePreviousLastForwardTest : InstrumentedTest {

View File

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

View File

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

View File

@ -22,7 +22,6 @@ import kotlinx.coroutines.runBlocking
import org.junit.Assert.assertEquals
import org.junit.Assert.assertNotNull
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@ -108,7 +107,6 @@ class SpaceCreationTest : InstrumentedTest {
}
@Test
@Ignore
fun testJoinSimplePublicSpace() = runSessionTest(context()) { commonTestHelper ->
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.assertTrue
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@ -248,7 +247,6 @@ class SpaceHierarchyTest : InstrumentedTest {
}
@Test
@Ignore("This test will be ignored until it is fixed")
fun testBreakCycle() = runSessionTest(context()) { commonTestHelper ->
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.action.ViewActions.click
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.assertion.ViewAssertions.matches
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.isDisplayed
import androidx.test.espresso.matcher.ViewMatchers.isEnabled
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.filters.LargeTest
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.junit.Ignore
import org.junit.Rule
import org.junit.Test
import org.junit.runner.RunWith
@ -40,7 +39,6 @@ import kotlin.random.Random
@RunWith(AndroidJUnit4::class)
@LargeTest
@Ignore
class RegistrationTest {
@get:Rule
@ -48,83 +46,82 @@ class RegistrationTest {
@Test
fun simpleRegister() {
val userId: String = "UiAutoTest_${Random.nextLong()}"
val userId: String = "test-${Random.nextLong()}"
val password: String = "password"
val homeServerUrl: String = "http://10.0.2.2:8080"
// Check splashscreen is there
onView(withId(R.id.loginSplashSubmit))
.check(matches(isDisplayed()))
.check(matches(withText(R.string.login_splash_submit)))
.check(matches(withText(R.string.login_splash_create_account)))
// Click on get started
onView(withId(R.id.loginSplashSubmit))
.perform(click())
// Check that homeserver options are shown
onView(withId(R.id.loginServerTitle))
// Check that use case screen is shown
onView(withId(R.id.useCaseHeaderTitle))
.check(matches(isDisplayed()))
.check(matches(withText(R.string.login_server_title)))
.check(matches(withText(R.string.ftue_auth_use_case_title)))
// Chose custom server
onView(withId(R.id.loginServerChoiceOther))
// Chose friends and family
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())
// Enter local synapse
onView(withId(R.id.loginServerUrlFormHomeServerUrl))
.perform(typeText(homeServerUrl))
onView(withId(R.id.chooseServerInputEditText))
.perform()
// Text is not empty so use `replaceText` instead of `typeText`
.perform(replaceText(homeServerUrl))
// Click on continue
onView(withId(R.id.loginServerUrlFormSubmit))
onView(withId(R.id.chooseServerSubmit))
.check(matches(isEnabled()))
.perform(closeSoftKeyboard(), click())
// Click on the signup button
onView(withId(R.id.loginSignupSigninSubmit))
.check(matches(isDisplayed()))
.perform(click())
// Ensure password flow supported (wait for data to be retrieved)
onView(ViewMatchers.isRoot())
.perform(waitForView(withId(R.id.createAccountHeaderTitle)))
// Ensure password flow supported
onView(withId(R.id.loginField))
onView(withId(R.id.createAccountEditText))
.check(matches(isDisplayed()))
onView(withId(R.id.passwordField))
onView(withId(R.id.createAccountPassword))
.check(matches(isDisplayed()))
// Ensure user id
onView(withId(R.id.loginField))
// Type user id
onView(withId(R.id.createAccountEditText))
.perform(typeText(userId))
// Ensure login button not yet enabled
onView(withId(R.id.loginSubmit))
onView(withId(R.id.createAccountSubmit))
.check(matches(not(isEnabled())))
// Ensure password
onView(withId(R.id.passwordField))
// Type password
onView(withId(R.id.createAccountPassword))
.perform(closeSoftKeyboard(), typeText(password))
// Submit
onView(withId(R.id.loginSubmit))
onView(withId(R.id.createAccountSubmit))
.check(matches(isEnabled()))
.perform(closeSoftKeyboard(), click())
withIdlingResource(activityIdlingResource(AnalyticsOptInActivity::class.java)) {
onView(withId(R.id.later))
.check(matches(isDisplayed()))
.perform(click())
}
// Personalization
onView(ViewMatchers.isRoot())
.perform(waitForView(withId(R.id.accountCreatedTakeMeHome)))
onView(withId(R.id.accountCreatedTakeMeHome))
.perform(click())
withIdlingResource(activityIdlingResource(HomeActivity::class.java)) {
onView(withId(R.id.roomListContainer))
.check(matches(isDisplayed()))
}
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()))
}
// Analytics
onView(ViewMatchers.isRoot())
.perform(waitForView(withId(R.id.submit)))
onView(withId(R.id.submit))
.perform(click())
}
}

View File

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

View File

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

View File

@ -31,7 +31,6 @@ import org.amshove.kluent.shouldBeEqualTo
import org.amshove.kluent.shouldBeTrue
import org.junit.BeforeClass
import org.junit.FixMethodOrder
import org.junit.Ignore
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.JUnit4
@ -41,7 +40,6 @@ import java.util.concurrent.TimeUnit
@RunWith(JUnit4::class)
@FixMethodOrder(MethodSorters.JVM)
@Ignore
class SpanUtilsTest : InstrumentedTest {
companion object {
@ -149,6 +147,7 @@ class SpanUtilsTest : InstrumentedTest {
}
})
EmojiCompat.init(context())
load()
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.shouldNotBeNull
import org.amshove.kluent.shouldNotExist
import org.junit.FixMethodOrder
import org.junit.Rule
import org.junit.Test
import org.junit.runners.MethodSorters
import java.io.File
@FixMethodOrder(MethodSorters.JVM)
class VoiceRecorderLTests {
@get:Rule
@ -48,8 +51,9 @@ class VoiceRecorderLTests {
stopRecord()
}
// Renamed to be run first... It fixes it.
@Test
fun stopRecordKeepsFile() = with(recorder) {
fun atFirstStopRecordKeepsFile() = with(recorder) {
getVoiceMessageFile().shouldBeNull()
startRecord("some_room_id")

View File

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