Skip to content

Commit

Permalink
Ccap 411 submit provider response (#687)
Browse files Browse the repository at this point in the history
  • Loading branch information
enyia21 authored Oct 15, 2024
1 parent cbf8b92 commit 159854d
Show file tree
Hide file tree
Showing 7 changed files with 112 additions and 5 deletions.
2 changes: 2 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ form-flow:
lock-after-submitted:
- flow: gcc
redirect: submit-complete
- flow: providerresponse
redirect: submit-complete-final
design-system:
name: honeycrisp
languages: en, es
Expand Down
9 changes: 9 additions & 0 deletions src/main/resources/flows-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,15 @@ flow:
nextScreens:
- name: submit-complete
submit-complete:
nextScreens:
- name: info-review
info-review:
nextScreens:
- name: submit-complete-final
submit-complete-final:
nextScreens: null

landmarks:
firstScreen: submit-start
afterSubmitPages:
- submit-complete-final
12 changes: 11 additions & 1 deletion src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1091,4 +1091,14 @@ provider-response-submit-complete.header=Your response has been recorded
provider-response-submit-complete.notice-yes=Next, we will collect your provider information. This should take 2-3 minutes.
provider-response-submit-complete.notice-no=We will notify the CCR&R of your response.
provider-response-submit-complete.button-no=Return to home

#info-review
provider-response-info-review.title=Info Review
provider-response-info-review.header=Let's review your info
provider-response
#submit-complete-final
provider-response-submit-complete-final.title=Provider Submission Complete
provider-response-submit-complete-final.header=Done! You are now listed as a child care provider for this family.
provider-response-submit-complete-final.notice-pt1=The complete the application with confirmation code: <strong>{0}</strong>.
provider-response-submit-complete-final.notice-pt2=It has been sent to the CCR&R for processing.
provider-response-submit-complete-final.return-to-home-button=Return to home
provider-response-submit-complete-final.respond-to-another-app-button=Respond to another app
3 changes: 2 additions & 1 deletion src/main/resources/templates/gcc/submit-sign-name.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
header=#{submit-sign-name.title},
subtext=#{submit-sign-name.subtext})}"/>
<th:block
th:replace="~{fragments/form :: form(action=|/flow/${flow}/${screen}/submit|, content=~{::formContent})}"> <th:block th:ref="formContent">
th:replace="~{fragments/form :: form(action=|/flow/${flow}/${screen}/submit|, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">
<th:block th:replace="~{fragments/inputs/text ::
text(inputName='signedName',
Expand Down
29 changes: 29 additions & 0 deletions src/main/resources/templates/providerresponse/info-review.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title=#{provider-response-info-review.title})}"></head>
<body>
<div class="page-wrapper">
<div th:replace="~{fragments/toolbar :: toolbar}"></div>
<section class="slab">
<div class="grid">
<div th:replace="~{fragments/goBack :: goBackLink}"></div>
<main id="content" role="main" class="form-card spacing-above-35">
<th:block
th:replace="~{fragments/cardHeader :: cardHeader(header=#{provider-response-info-review.header})}"/>
<th:block th:replace="~{fragments/form :: form(action=|/flow/${flow}/${screen}/submit|, content=~{::formContent})}">
<th:block th:ref="formContent">
<div class="form-card__content">

</div>
<div class="form-card__footer">
<th:block th:replace="~{fragments/inputs/submitButton :: submitButton}"/>
</div>
</th:block>
</th:block>
</main>
</div>
</section>
</div>
<th:block th:replace="~{fragments/footer :: footer}" />
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html th:lang="${#locale.language}">
<head th:replace="~{fragments/head :: head(title=#{provider-response-submit-complete-final.title})}"></head>
<body>
<div class="page-wrapper">
<div th:replace="~{fragments/toolbar :: toolbar}"></div>
<section class="slab">
<div class="grid">
<div th:replace="~{fragments/goBack :: goBackLink}"></div>
<main id="content" role="main" class="form-card spacing-above-35">
<th:block th:replace="~{fragments/gcc-icons :: greenCheck}"></th:block>
<div
th:class="spacing-below-0"
th:replace="~{fragments/cardHeader :: cardHeader(header=#{provider-response-submit-complete-final.header})}">
</div>
<th:block th:replace="~{fragments/form :: form(action=${formAction}, content=~{::content})}">
<th:block th:ref="content">
<div class="form-card__content"
th:with="confirmationCode=${submission.inputData.get('providerResponseFamilyConfirmationCode')}">
<div class="notice--success">
<p th:utext="${#messages.msg('provider-response-submit-complete-final.notice-pt1', confirmationCode)}"></p>
<p th:text="#{provider-response-submit-complete-final.notice-pt2}"></p>
</div>
</div>
<div class="form-card__footer">
<a href="/"
th:text="#{provider-response-submit-complete-final.return-to-home-button}"
class="button button--primary"
id="return-to-home-button-"></a>
<a href="/providerresponse/submit"
th:text="#{provider-response-submit-complete-final.respond-to-another-app-button}"
class="button"
id="respond-to-another-app-button"></a>
</div>
</th:block>
</th:block>
</main>
</div>
</section>
</div>
<th:block th:replace="~{fragments/footer :: footer}" />
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public class ProviderresponseFlowJourneyTest extends AbstractBasePageTest {
private static String CONF_CODE="A2123B";

@Test
void ProviderresponseWithShortLinkFlowJourneyTest() {
void ProviderresponseJourneyTest() {
testPage.navigateToFlowScreen("gcc/activities-parent-intro");

saveSubmission(getSessionSubmissionTestBuilder().withDayCareProvider()
Expand Down Expand Up @@ -74,12 +74,25 @@ void ProviderresponseWithShortLinkFlowJourneyTest() {

// response
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-response.title"));
testPage.clickElementById("providerResponseAgreeToCare-false-label");
testPage.clickElementById("providerResponseAgreeToCare-true-label");
testPage.clickContinue();

// submit-complete
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-submit-complete.title"));
assertThat(testPage.findElementsByClass("notice").get(0).getText()).isEqualTo(getEnMessage("provider-response-submit-complete.notice-no"));
assertThat(testPage.findElementsByClass("notice").get(0).getText()).isEqualTo(getEnMessage("provider-response-submit-complete.notice-yes"));
testPage.clickContinue();

//info-review
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-info-review.title"));
testPage.clickButton("Submit");

//submit-complete-final
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-submit-complete-final.title"));
testPage.goBack();
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-submit-complete-final.title"));
testPage.findElementById("respond-to-another-app-button").click();
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-submit-start.title"));

}

}

0 comments on commit 159854d

Please sign in to comment.