Switch to createComposeRule

Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
Harsh Shandilya 2020-08-30 15:58:07 +05:30
parent 001fdab48b
commit 4581705d56
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
2 changed files with 13 additions and 2 deletions

View file

@ -1,7 +1,7 @@
package dev.msfjarvis.todo
import androidx.ui.test.android.createAndroidComposeRule
import androidx.ui.test.assertIsDisplayed
import androidx.ui.test.createComposeRule
import androidx.ui.test.hasTestTag
import androidx.ui.test.onNode
import androidx.ui.test.onNodeWithText
@ -13,7 +13,7 @@ import org.junit.Test
class MainActivityTest {
@get:Rule
val composeTestRule = createAndroidComposeRule<MainActivity>(disableTransitions = true)
val composeTestRule = createComposeRule()
@Test
fun test_item_addition() {

View file

@ -0,0 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application>
<!--
If you don't need the activityTestRule, then you can switch to createComposeRule and add
an empty activity here for the test harness to launch. Not having this activity is what
broke my tests when I first started writing them with createComposeRule. Future me will thank
past me for writing this note here.
-->
<activity android:name="androidx.activity.ComponentActivity" />
</application>
</manifest>