waiting for the edited text to appear instead of sleeping

This commit is contained in:
Adam Brown 2021-11-09 11:41:30 +00:00
parent 918042c231
commit 411be43287
1 changed files with 2 additions and 1 deletions

View File

@ -23,6 +23,7 @@ import androidx.test.espresso.action.ViewActions
import androidx.test.espresso.contrib.RecyclerViewActions
import androidx.test.espresso.matcher.ViewMatchers
import androidx.test.espresso.matcher.ViewMatchers.withId
import androidx.test.espresso.matcher.ViewMatchers.withText
import com.adevinta.android.barista.interaction.BaristaClickInteractions
import com.adevinta.android.barista.interaction.BaristaClickInteractions.clickOn
import com.adevinta.android.barista.interaction.BaristaClickInteractions.longClickOn
@ -84,7 +85,7 @@ class RoomDetailRobot {
waitUntilViewVisible(withId(R.id.sendButton))
clickOn(R.id.sendButton)
// Wait for the UI to update
sleep(1000)
waitUntilViewVisible(withText("Hello universe! (edited)"))
// Open edit history
openMessageMenu("Hello universe! (edited)") {
editHistory()