From 914e2f89e45115d9975e8e599e7e7974500e60f2 Mon Sep 17 00:00:00 2001 From: Vraj Mohan Date: Sun, 14 Jan 2024 10:16:06 -0800 Subject: [PATCH] Simplify static pages --- .../mdbenefits/app/StaticPageController.java | 24 ++++++------------- .../journeys/MdBenefitsFlowJourneyTest.java | 3 +-- 2 files changed, 8 insertions(+), 19 deletions(-) diff --git a/src/main/java/org/mdbenefits/app/StaticPageController.java b/src/main/java/org/mdbenefits/app/StaticPageController.java index 2a89c1fa..fb0b7555 100644 --- a/src/main/java/org/mdbenefits/app/StaticPageController.java +++ b/src/main/java/org/mdbenefits/app/StaticPageController.java @@ -22,36 +22,26 @@ public class StaticPageController { * @return the static page template */ @GetMapping("/") - ModelAndView getIndex(HttpServletRequest request, - @RequestParam(required = false) String ref_id) { + ModelAndView getIndex(HttpServletRequest request) { HttpSession httpSession = request.getSession(false); if (httpSession != null) { - httpSession.invalidate(); + httpSession.invalidate(); } httpSession = request.getSession(true); - // start new session - httpSession.setAttribute("ref_id", ref_id); - - Map model = new HashMap(); + Map model = new HashMap<>(); model.put("screen", "/"); return new ModelAndView("index", model); } @GetMapping("/privacy") - ModelAndView getPrivacy() { - Map model = new HashMap(); - model.put("screen", "privacy"); - - return new ModelAndView("privacy", model); + String getPrivacy() { + return "privacy"; } @GetMapping("/ssnFAQs") - ModelAndView getSSNFaqs() { - Map model = new HashMap(); - model.put("screen", "ssnFAQs"); - - return new ModelAndView("ssnFAQs", model); + String getSSNFaqs() { + return "ssnFAQs"; } } diff --git a/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java b/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java index e89a673b..efe95412 100644 --- a/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java +++ b/src/test/java/org/mdbenefits/app/journeys/MdBenefitsFlowJourneyTest.java @@ -7,7 +7,6 @@ import org.openqa.selenium.WebElement; import java.util.List; -import java.util.Locale; import java.util.concurrent.TimeUnit; import static org.assertj.core.api.Assertions.assertThat; @@ -318,7 +317,7 @@ void docUploadSkipTest() { } @Test - void fullDigitalAssisterFlow() { + void completeFlow() { assertThat(testPage.getTitle()).isEqualTo("Maryland Benefits Application"); testPage.clickButton("Apply Now");