From 0a5824dea898a93931556cb526c72e031de67ba5 Mon Sep 17 00:00:00 2001 From: Nik Srnka Date: Wed, 15 Apr 2026 13:31:29 -0400 Subject: [PATCH] Creating tests for WelcomeSurvey.kt --- .../processing/app/ui/WelcomeSurveyTest.kt | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 app/test/processing/app/ui/WelcomeSurveyTest.kt diff --git a/app/test/processing/app/ui/WelcomeSurveyTest.kt b/app/test/processing/app/ui/WelcomeSurveyTest.kt new file mode 100644 index 000000000..199047295 --- /dev/null +++ b/app/test/processing/app/ui/WelcomeSurveyTest.kt @@ -0,0 +1,42 @@ +package processing.app.ui + +import androidx.compose.ui.test.* +import processing.app.ui.theme.PDETheme +import kotlin.test.Test + +@OptIn(ExperimentalTestApi::class) +class WelcomeSurveyTest { + + @Test + fun `survey card title is displayed`() = runDesktopComposeUiTest { + setContent { + PDETheme { + SurveyInvitation() + } + } + + onNodeWithText("Take the Community Survey").assertIsDisplayed() + } + + @Test + fun `survey card description is displayed`() = runDesktopComposeUiTest { + setContent { + PDETheme { + SurveyInvitation() + } + } + + onNodeWithText("Processing is free, open-source, and shaped by its community. Your answers help us focus on what matters most.").assertIsDisplayed() + } + + @Test + fun `survey card is clickable`() = runDesktopComposeUiTest { + setContent { + PDETheme { + SurveyInvitation() + } + } + + onNodeWithText("Take the Community Survey").performClick() + } +} \ No newline at end of file