-
Notifications
You must be signed in to change notification settings - Fork 0
Starting the activity with composable
Devrath edited this page Mar 4, 2024
·
1 revision
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
ComposetestingTheme {
// A surface container using the 'background' color from the theme
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {
DisplayButtonDemo()
}
}
}
}
}
class MainActivityTest {
@get:Rule
val composeTestRule = createAndroidComposeRule<MainActivity>()
@Test
fun myTest() {
composeTestRule.onNodeWithText("Hello World!").performClick()
}
}