Skip to content

Commit

Permalink
Add ui tests for out of time behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Sep 7, 2023
1 parent cc729a2 commit c4b2bfd
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -820,4 +820,20 @@ class ConnectScreenTest {
// Assert
composeTestRule.apply { onNodeWithTag(SCROLLABLE_COLUMN_TEST_TAG).assertDoesNotExist() }
}

@Test
fun testOpenOutOfTimeScreen() {
// Arrange
val mockedOpenScreenHandler: () -> Unit = mockk(relaxed = true)
composeTestRule.setContent {
ConnectScreen(
uiState = ConnectUiState.INITIAL,
viewActions = MutableStateFlow(ConnectViewModel.ViewAction.OpenOutOfTimeView),
onOpenOutOfTimeScreen = mockedOpenScreenHandler
)
}

// Assert
verify { mockedOpenScreenHandler.invoke() }
}
}

0 comments on commit c4b2bfd

Please sign in to comment.