This repository has been archived on 2023-08-04. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
2023SELab1-project-Studeez/app/src/androidTest/java/be/ugent/sel/studeez/HomeScreenTest.kt
Rune Dyselinck 74526bc984 proto error
2023-05-15 15:58:59 +02:00

42 lines
No EOL
1.3 KiB
Kotlin

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()
}
}