test: added ui test to exercise join and leave group call in a loop (#369)

For reliable click actions on recyclerviews (at least inside BottomSheetBehaviour) a swipeUp() perform call is required
This commit is contained in:
Dhiraj Gupta 2022-06-24 14:50:59 -04:00 коммит произвёл Mohtasim
Родитель a32aa6cf89
Коммит ea2add383e
2 изменённых файлов: 11 добавлений и 0 удалений

Просмотреть файл

@ -86,4 +86,11 @@ class CallingCompositeBaselineUiTest : BaseUiTest() {
.clickEndCall()
.clickLeaveCall()
}
@Test
fun testJoinAndLeaveMultipleTimes() {
for (i in 0..5) {
joinGroupCall()
}
}
}

Просмотреть файл

@ -4,8 +4,11 @@
package com.azure.android.communication.ui.callingcompositedemoapp.robots
import androidx.test.espresso.Espresso
import androidx.test.espresso.Espresso.onView
import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.action.ViewActions.swipeUp
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.withId
import com.azure.android.communication.ui.callingcompositedemoapp.R
import com.azure.android.communication.ui.callingcompositedemoapp.util.UiTestUtils
import com.azure.android.communication.ui.callingcompositedemoapp.util.ViewIsDisplayedResource
@ -92,6 +95,7 @@ class CallScreenRobot : ScreenRobot<CallScreenRobot>() {
idlingResource.waitUntilViewIsDisplayed {
UiTestUtils.checkViewWithTextIsDisplayed("Leave call?")
}
onView(withId(R.id.bottom_drawer_table)).perform(swipeUp())
UiTestUtils.clickViewWithIdAndText(R.id.cell_text, "Leave")
}