Merge branch 'dev_robotaxi-d_230711_3.4.0' into dev_20230708_unmanned_3.5.0

# Conflicts:
#	OCH/taxi/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_overmap_arrived.png
#	OCH/taxi/mogo-och-taxi-passenger/src/main/res/drawable-xhdpi/taxi_overmap_arriving.png
This commit is contained in:
yangyakun
2023-08-04 14:38:38 +08:00
8 changed files with 228 additions and 180 deletions

View File

@@ -0,0 +1,46 @@
package com.mogo.functions.test
import androidx.test.core.app.ActivityScenario
import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.LargeTest
import androidx.test.platform.app.InstrumentationRegistry
import com.mogo.eagle.core.function.call.chat.CallerChatManager
import com.mogo.eagle.core.function.main.MainLauncherActivity
import kotlinx.coroutines.delay
import kotlinx.coroutines.runBlocking
import org.junit.Before
import org.junit.Test
import org.junit.runner.RunWith
import java.util.concurrent.TimeUnit
@RunWith(AndroidJUnit4::class)
@LargeTest
class ChatTest {
lateinit var launch: ActivityScenario<MainLauncherActivity>
@Before
fun before() {
launch = ActivityScenario.launch(MainLauncherActivity::class.java)
}
@Test
fun testChat() = runBlocking {
val arguments = InstrumentationRegistry.getArguments()
val delay = arguments.getString("delay", "0")
val sn = arguments.getString("sn", "")
val delayLong = delay.toLong()
if (delayLong <= 0 || sn.isNullOrEmpty()) {
throw AssertionError("illegal state ..")
}
delay(delayLong)
launch.onActivity { activity ->
CallerChatManager.call(activity, sn)
}
delay(TimeUnit.MINUTES.toMillis(10))
}
}

File diff suppressed because one or more lines are too long