diff --git a/app/src/test/java/space/bloggin/mercies/ShotsTest.kt b/app/src/test/java/space/bloggin/mercies/ShotsTest.kt index 57c45f3..693f917 100644 --- a/app/src/test/java/space/bloggin/mercies/ShotsTest.kt +++ b/app/src/test/java/space/bloggin/mercies/ShotsTest.kt @@ -3,6 +3,8 @@ package space.bloggin.mercies import android.graphics.Bitmap import androidx.compose.ui.test.junit4.createAndroidComposeRule import androidx.compose.ui.test.onRoot +import androidx.compose.ui.test.onNodeWithContentDescription +import androidx.compose.ui.test.performClick import com.github.takahirom.roborazzi.captureRoboImage import org.junit.Rule import org.junit.Test @@ -38,6 +40,13 @@ class ShotsTest { store.setAnswered(store.prayers(false).first { it.forWho == "Jake" }.id, true, "Made it home safe Sunday night") } shot("02_jar") + val before = Prompts.forDate(LocalDate.now(), rule.activity.state.prefs.promptShift) + rule.onNodeWithContentDescription("A different question").performClick() + rule.waitForIdle() + val after = Prompts.forDate(LocalDate.now(), rule.activity.state.prefs.promptShift) + org.junit.Assert.assertNotEquals(before, after) + println("PROMPT: $before -> $after") + shot("02b_new_question") rule.runOnUiThread { rule.activity.state.store.markKind(1) } ui { tab = 1 } shot("03_kindness")