Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CCAP-357] Make the confirmation code input readonly #1225

Merged
merged 3 commits into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@

<script th:inline="javascript">
$(document).ready(function () {
const providerFamilyCode = $('#providerResponseFamilyShortCode')
const providerFamilyCode = document.getElementById("providerResponseFamilyShortCode");

if(!providerFamilyCode.text()){
if (!providerFamilyCode.textContent) {
var confirmationCode = [[${session.confirmationCode}]];
if(confirmationCode){
providerFamilyCode.val(confirmationCode)
if (confirmationCode) {
providerFamilyCode.value = confirmationCode;
providerFamilyCode.readOnly = true;
}
}
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.ilgcc.app.journeys;

import static org.assertj.core.api.Assertions.assertThat;
import static org.awaitility.Awaitility.await;

import formflow.library.data.SubmissionRepository;
import java.time.OffsetDateTime;
Expand All @@ -21,7 +20,7 @@ public class ProviderresponseProviderRegistrationJourneyTest extends AbstractBas
private static final String CONF_CODE = "A2123B";

@Test
void BasicInfoFlow() {
void basicInfoFlow() {
createAValidLink();

testPage.navigateToFlowScreen("providerresponse/registration-basic-info-intro");
Expand Down Expand Up @@ -127,7 +126,7 @@ void BasicInfoFlow() {
}

@Test
void LicenseExemptInProviderHomeFlow() {
void licenseExemptInProviderHomeFlow() {
createAValidLink();
submitFamilyConfirmationCode();

Expand Down Expand Up @@ -319,7 +318,6 @@ void LicenseExemptInProviderHomeFlow() {

// confirmation-code
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-confirmation-code.title"));
testPage.enter("providerResponseFamilyShortCode", CONF_CODE);
testPage.clickContinue();

// response
Expand Down Expand Up @@ -391,7 +389,7 @@ void LicenseExemptInProviderHomeFlow() {
}

@Test
void LicenseExemptInChildHomeFlow() {
void licenseExemptInChildHomeFlow() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So why are making our test methods lower case?

Copy link
Contributor Author

@cram-cfa cram-cfa Feb 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the Java naming convention for methods is camelCase, and it has annoyed me that we don't follow that in our tests consistently. So I figured since I was in here and it was annoying me, I'd change it for this class.

(And eventually I'll change them all in other classes in the middle of the night when I get bored enough :) )

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool.

createAValidLink();
submitFamilyConfirmationCode();

Expand Down Expand Up @@ -513,7 +511,6 @@ void LicenseExemptInChildHomeFlow() {

// confirmation-code
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-confirmation-code.title"));
testPage.enter("providerResponseFamilyShortCode", CONF_CODE);
testPage.clickContinue();

// response
Expand Down Expand Up @@ -569,7 +566,7 @@ void LicenseExemptInChildHomeFlow() {
}

@Test
void LicensedChildCareHomeFlow() {
void licensedChildCareHomeFlow() {
createAValidLink();
submitFamilyConfirmationCode();

Expand Down Expand Up @@ -682,7 +679,6 @@ void LicensedChildCareHomeFlow() {

// confirmation-code
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-confirmation-code.title"));
testPage.enter("providerResponseFamilyShortCode", CONF_CODE);
testPage.clickContinue();

// response
Expand Down Expand Up @@ -737,7 +733,7 @@ void LicensedChildCareHomeFlow() {
}

@Test
void LicensedChildCareCenterFlow() {
void licensedChildCareCenterFlow() {
createAValidLink();
submitFamilyConfirmationCode();

Expand Down Expand Up @@ -832,7 +828,6 @@ void LicensedChildCareCenterFlow() {

// confirmation-code
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-confirmation-code.title"));
testPage.enter("providerResponseFamilyShortCode", CONF_CODE);
testPage.clickContinue();

// response
Expand Down Expand Up @@ -887,7 +882,7 @@ void LicensedChildCareCenterFlow() {
}

@Test
void LicensedGroupChildCareHomeFlow() {
void licensedGroupChildCareHomeFlow() {
createAValidLink();
submitFamilyConfirmationCode();

Expand Down Expand Up @@ -991,7 +986,6 @@ void LicensedGroupChildCareHomeFlow() {

// confirmation-code
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-confirmation-code.title"));
testPage.enter("providerResponseFamilyShortCode", CONF_CODE);
testPage.clickContinue();

// response
Expand Down Expand Up @@ -1046,7 +1040,7 @@ void LicensedGroupChildCareHomeFlow() {
}

@Test
void LicenseExemptChildCareCenter() {
void licenseExemptChildCareCenter() {
createAValidLink();
submitFamilyConfirmationCode();

Expand Down Expand Up @@ -1177,7 +1171,6 @@ void LicenseExemptChildCareCenter() {

// confirmation-code
assertThat(testPage.getTitle()).isEqualTo(getEnMessage("provider-response-confirmation-code.title"));
testPage.enter("providerResponseFamilyShortCode", CONF_CODE);
testPage.clickContinue();

// response
Expand Down Expand Up @@ -1274,7 +1267,6 @@ private void createAValidLink() {

private void submitFamilyConfirmationCode(){
testPage.navigateToFlowScreen("providerresponse/confirmation-code");
testPage.enter("providerResponseFamilyShortCode", CONF_CODE);
testPage.clickContinue();
}
}