mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-18 00:57:02 +05:30
Switch to createComposeRule
Signed-off-by: Harsh Shandilya <me@msfjarvis.dev>
This commit is contained in:
parent
001fdab48b
commit
4581705d56
2 changed files with 13 additions and 2 deletions
|
@ -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() {
|
||||
|
|
11
app/src/debug/AndroidManifest.xml
Normal file
11
app/src/debug/AndroidManifest.xml
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue