Skip to content

Commit

Permalink
✅ Update tests to be less flaky
Browse files Browse the repository at this point in the history
Let's work on test at the time until it's consistent.
  • Loading branch information
igorescodro committed Oct 12, 2022
1 parent 1cd9242 commit 1ab573b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/src/androidTest/java/com/escodro/alkaa/SearchFlowTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ internal class SearchFlowTest : KoinTest {
onNode(hasSetTextAction()).performTextInput(query)
onAllNodesWithText(text = query, useUnmergedTree = true)[1].assertExists()

// Wait until the other second item is no longer visible
waitUntilNotExists(hasText(FAKE_TASKS[1].title))

// Drop the first task and validate others are not shown
FAKE_TASKS.drop(1).forEach { task ->
// Validate all tasks are shown
Expand Down
1 change: 1 addition & 0 deletions app/src/androidTest/java/com/escodro/alkaa/TaskFlowTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ internal class TaskFlowTest : KoinTest {
pressBack()

// Reopen the task and validate if the category is selected
waitUntilExists(hasText(taskName))
onNodeWithText(text = taskName, useUnmergedTree = true).performClick()
onChip(category).assertIsSelected()
}
Expand Down

0 comments on commit 1ab573b

Please sign in to comment.