Skip to content

Instantly share code, notes, and snippets.

@elihart
Created November 20, 2019 20:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elihart/d5e7d96043264c46d93bc7e312ccbe0f to your computer and use it in GitHub Desktop.
Save elihart/d5e7d96043264c46d93bc7e312ccbe0f to your computer and use it in GitHub Desktop.
InteractionTestActivity
class InteractionTestActivity : IntegrationTestActivity() {
override fun testCurrentScreen(
mockProvider: MockedFragmentProvider,
fragment: MvRxFragment,
resetView: (onViewReset: (MvRxFragment) -> Unit) -> Unit,
finishedTestingFragment: () -> Unit
) {
ActivityInteractionTester(
activity = this,
resetViewCallback = resetView,
entryPointProvider = { this.window.decorView },
interactionManager = interactionManager,
onEnd = { reportJson ->
happoJsonSnapshotBuilder.add(reportJson, mockProvider.fragmentName, mockProvider.mockData.name)
finishedTestingFragment()
}
).start()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment