Skip to content

Commit

Permalink
Merge branch 'main' into feature/deployemnt
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer authored Dec 2, 2024
2 parents 316cb76 + 74cc37c commit 8b21a2f
Show file tree
Hide file tree
Showing 65 changed files with 3,417 additions and 145 deletions.
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() }
}
}
Loading

0 comments on commit 8b21a2f

Please sign in to comment.