-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feature/deployemnt
- Loading branch information
Showing
65 changed files
with
3,417 additions
and
145 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
app/src/androidTest/kotlin/edu/stanford/bdh/engagehf/questionnaire/QuestionnaireTest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package edu.stanford.bdh.engagehf.questionnaire | ||
|
||
import androidx.compose.ui.test.junit4.createAndroidComposeRule | ||
import dagger.hilt.android.testing.HiltAndroidRule | ||
import dagger.hilt.android.testing.HiltAndroidTest | ||
import edu.stanford.bdh.engagehf.questionnaire.composables.QuestionnaireTestComposable | ||
import edu.stanford.bdh.engagehf.questionnaire.simulators.QuestionnaireTestSimulator | ||
import edu.stanford.spezi.core.design.component.ComposeContentActivity | ||
import org.junit.Rule | ||
import org.junit.Test | ||
|
||
@HiltAndroidTest | ||
class QuestionnaireTest { | ||
|
||
@get:Rule | ||
val hiltRule = HiltAndroidRule(this) | ||
|
||
@get:Rule | ||
val composeTestRule = createAndroidComposeRule<ComposeContentActivity>() | ||
|
||
@Test | ||
fun testQuestionnaireComposableDisplay() { | ||
composeTestRule.activity.setScreen { QuestionnaireTestComposable() } | ||
questionnaireComposable { | ||
assertIsDisplayed() | ||
} | ||
} | ||
|
||
private fun questionnaireComposable(block: QuestionnaireTestSimulator.() -> Unit) { | ||
QuestionnaireTestSimulator(composeTestRule).apply { block() } | ||
} | ||
} |
Oops, something went wrong.