Merge pull request #6 from msfjarvis/test-improvements

Switch to createComposeRule
This commit is contained in:
probot-auto-merge[bot] 2020-08-30 10:29:16 +00:00 committed by GitHub
commit 778faf2950
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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>