From fe3d03e2dd135c71b28daebb43b7c5482ccc6cd1 Mon Sep 17 00:00:00 2001 From: Bethany Seeger Date: Wed, 31 Jan 2024 10:04:51 -0500 Subject: [PATCH] Fix tests that were failing --- .../journeys/MdBenefitsFlowJourneyTest.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java b/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java index 7d206977..8232a1ad 100644 --- a/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java +++ b/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java @@ -49,7 +49,8 @@ void redirectMDThink() { } @Test - void selectHelpNeededFlow() { + void selectHelpNeededAndChooseProgramFlow() { + // select help needed testPage.navigateToFlowScreen("mdBenefitsFlow/selectHelpNeeded"); testPage.clickContinue(); assertThat(testPage.getTitle()).isEqualTo("Select help"); @@ -59,18 +60,16 @@ void selectHelpNeededFlow() { testPage.clickElementById("helpNeeded-OTHER"); testPage.clickContinue(); + // choose program flow assertThat(testPage.getTitle()).isEqualTo("Choose programs"); assertThat(testPage.findElementById("programs-SNAP")).isNotNull(); assertThat(testPage.findElementById("programs-OTHER")).isNotNull(); assertThat(testPage.elementDoesNotExistById("programs-OHEP")).isTrue(); assertThat(testPage.elementDoesNotExistById("programs-TCA")).isTrue(); - } - @Test - void chooseProgramsFlow() { - testPage.navigateToFlowScreen("mdBenefitsFlow/choosePrograms"); - testPage.clickContinue(); + testPage.clickContinue(); assert (testPage.hasErrorText(message("error.missing-general"))); + testPage.clickElementById("programs-SNAP"); testPage.clickContinue(); @@ -364,13 +363,13 @@ void completeFlow() { testPage.clickContinue(); assertThat(testPage.getTitle()).isEqualTo("County"); - testPage.selectFromDropdown("county", "Baltimore City"); + testPage.selectFromDropdown("county", "Baltimore County"); testPage.clickContinue(); assertThat(testPage.getTitle()).isEqualTo("Select help"); - testPage.clickElementById("helpNeeded-Help with food"); - testPage.clickElementById("helpNeeded-Help with utilities"); - testPage.clickElementById("helpNeeded-Help with money for children"); + testPage.clickElementById("helpNeeded-SNAP"); + testPage.clickElementById("helpNeeded-OHEP"); + testPage.clickElementById("helpNeeded-TCA"); testPage.clickContinue(); // choose program