proto error
This commit is contained in:
parent
522ecae87a
commit
74526bc984
6 changed files with 80 additions and 14 deletions
|
@ -0,0 +1,42 @@
|
|||
package be.ugent.sel.studeez
|
||||
|
||||
import androidx.compose.ui.test.junit4.createComposeRule
|
||||
import androidx.compose.ui.test.onNodeWithText
|
||||
import androidx.compose.ui.test.performClick
|
||||
import be.ugent.sel.studeez.common.composable.drawer.DrawerActions
|
||||
import be.ugent.sel.studeez.common.composable.feed.FeedUiState
|
||||
import be.ugent.sel.studeez.common.composable.navbar.NavigationBarActions
|
||||
import be.ugent.sel.studeez.data.local.models.FeedEntry
|
||||
import be.ugent.sel.studeez.screens.home.HomeScreen
|
||||
import org.junit.Rule
|
||||
import org.junit.Test
|
||||
|
||||
class HomeScreenTest {
|
||||
@get:Rule
|
||||
val composeTestRule = createComposeRule()
|
||||
|
||||
@Test
|
||||
fun sessionRecapTestt() {
|
||||
var saveCalled = false
|
||||
|
||||
composeTestRule.setContent {
|
||||
HomeScreen(
|
||||
open = {},
|
||||
drawerActions = DrawerActions({}, {}, {}, {}, {}),
|
||||
navigationBarActions = NavigationBarActions({false}, {}, {}, {}, {}, {}, {}, {}),
|
||||
feedUiState = FeedUiState.Succes(mapOf()),
|
||||
continueTask = {_, _ -> },
|
||||
onEmptyFeedHelp = {}
|
||||
)
|
||||
}
|
||||
|
||||
composeTestRule
|
||||
.onNodeWithText(
|
||||
"continue",
|
||||
substring = true,
|
||||
ignoreCase = true
|
||||
)
|
||||
.assertExists()
|
||||
.performClick()
|
||||
}
|
||||
}
|
|
@ -14,7 +14,7 @@ import org.junit.Assert.*
|
|||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
class InstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
|
@ -18,7 +18,7 @@ class SessionScreenTest {
|
|||
val composeTestRule = createComposeRule()
|
||||
|
||||
@Test
|
||||
fun SessionRecapTest() {
|
||||
fun sessionRecapTest() {
|
||||
var saveCalled = false
|
||||
var discardCalled = false
|
||||
|
||||
|
@ -67,4 +67,6 @@ class SessionScreenTest {
|
|||
Assert.assertTrue(saveCalled)
|
||||
Assert.assertTrue(discardCalled)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
Reference in a new issue