Skip to content
Prev Previous commit
Next Next commit
[JetNews] Update test imports (alpha07)
  • Loading branch information
yrezgui committed Nov 9, 2020
commit 24e7bf6887b0f69c80bbfad1bb2be054b8a82967
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import androidx.compose.material.SnackbarHostState
import androidx.compose.material.rememberScaffoldState
import androidx.compose.runtime.ExperimentalComposeApi
import androidx.compose.runtime.snapshots.snapshotFlow
import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.onNodeWithText
import androidx.test.platform.app.InstrumentationRegistry
import androidx.ui.test.assertIsDisplayed
import androidx.ui.test.createComposeRule
import androidx.ui.test.onNodeWithText
import com.example.jetnews.ui.home.HomeScreen
import com.example.jetnews.ui.state.UiState
import kotlinx.coroutines.flow.filterNotNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@

package com.example.jetnews

import androidx.compose.ui.test.assertIsDisplayed
import androidx.compose.ui.test.hasSubstring
import androidx.compose.ui.test.onNodeWithText
import androidx.compose.ui.test.performClick
import androidx.test.filters.MediumTest
import androidx.test.platform.app.InstrumentationRegistry
import androidx.ui.test.assertIsDisplayed
import androidx.ui.test.createComposeRule
import androidx.ui.test.hasSubstring
import androidx.ui.test.onNodeWithText
import androidx.ui.test.performClick
import org.junit.Before
import org.junit.Ignore
import org.junit.Rule
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ package com.example.jetnews

import android.content.Context
import androidx.compose.runtime.remember
import androidx.compose.ui.test.junit4.ComposeTestRule
import androidx.lifecycle.SavedStateHandle
import androidx.ui.test.ComposeTestRuleJUnit
import com.example.jetnews.ui.JetnewsApp
import com.example.jetnews.ui.NavigationViewModel

/**
* Launches the app from a test context
*/
fun ComposeTestRuleJUnit.launchJetNewsApp(context: Context) {
fun ComposeTestRule.launchJetNewsApp(context: Context) {
setContent {
JetnewsApp(
TestAppContainer(context),
Expand Down