diff --git a/app/src/androidTest/java/com/example/androidproject/BottomSheetHeaderTest.kt b/app/src/androidTest/java/com/example/androidproject/BottomSheetHeaderTest.kt new file mode 100644 index 0000000..e6604a9 --- /dev/null +++ b/app/src/androidTest/java/com/example/androidproject/BottomSheetHeaderTest.kt @@ -0,0 +1,30 @@ +package com.example.androidproject + +import androidx.compose.ui.test.junit4.createComposeRule +import androidx.compose.ui.test.onNodeWithText +import com.example.androidproject.ui.components.BottomSheetHeader +import org.junit.Rule +import org.junit.Test + +class BottomSheetHeaderTest { + @get:Rule + val rule = createComposeRule() + + @Test + fun headerShowsQuestDescriptionAndCheckpointsCount() { + rule.setContent { + BottomSheetHeader( + selectedQuestDescription = "Sample Quest", + completedCheckpoints = 2, + totalCheckpoints = 5, + onExpandCollapse = {} + ) + } + + // Check that the quest description is shown + rule.onNodeWithText("Sample Quest").assertExists() + + // Check that the completed count is shown + rule.onNodeWithText("2 / 5 visited").assertExists() + } +} \ No newline at end of file