Skip to content

Commit

Permalink
test: [ANDROAPP-6326] wait until sync successful
Browse files Browse the repository at this point in the history
Signed-off-by: andresmr <[email protected]>
  • Loading branch information
andresmr committed Jul 17, 2024
1 parent 0aecd71 commit 3ea368a
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ class SyncFlowRobot(val composeTestRule: ComposeTestRule) : BaseRobot() {
composeTestRule.onNodeWithTag(MAIN_BUTTON_TAG, useUnmergedTree = true).performClick()
}

@OptIn(ExperimentalTestApi::class)
fun checkSyncWasSuccessfully() {
val expectedTitle = InstrumentationRegistry.getInstrumentation()
.targetContext.getString(R.string.sync_dialog_title_synced)
composeTestRule.waitUntilAtLeastOneExists(hasText(expectedTitle))
composeTestRule.onNodeWithTag(TITLE, useUnmergedTree = true).assert(hasText(expectedTitle, true))
}

Expand Down

0 comments on commit 3ea368a

Please sign in to comment.