Skip to content

Commit

Permalink
Simplify static pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vrajmohan committed Jan 16, 2024
1 parent dcb4263 commit 914e2f8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 19 deletions.
24 changes: 7 additions & 17 deletions src/main/java/org/mdbenefits/app/StaticPageController.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, Object> model = new HashMap();
Map<String, Object> model = new HashMap<>();
model.put("screen", "/");

return new ModelAndView("index", model);
}

@GetMapping("/privacy")
ModelAndView getPrivacy() {
Map<String, Object> model = new HashMap();
model.put("screen", "privacy");

return new ModelAndView("privacy", model);
String getPrivacy() {
return "privacy";
}

@GetMapping("/ssnFAQs")
ModelAndView getSSNFaqs() {
Map<String, Object> model = new HashMap();
model.put("screen", "ssnFAQs");

return new ModelAndView("ssnFAQs", model);
String getSSNFaqs() {
return "ssnFAQs";
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -318,7 +317,7 @@ void docUploadSkipTest() {
}

@Test
void fullDigitalAssisterFlow() {
void completeFlow() {
assertThat(testPage.getTitle()).isEqualTo("Maryland Benefits Application");

testPage.clickButton("Apply Now");
Expand Down

0 comments on commit 914e2f8

Please sign in to comment.