Skip to content
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
8 changes: 8 additions & 0 deletions src/main/steps/applicant1/hub-page/joint/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,10 @@ const en = (
linkText: 'change your application to a sole application.',
},
},
generalApplicationReceived: {
line1:
'The court is reviewing a general application that has been received and will contact you to let you know your next steps.',
},
awaitingLegalAdvisorReferral: {
line1: `You and your ${partner} have applied for a 'conditional order'.`,
line2: `The court will check your application and send it to a judge.
Expand Down Expand Up @@ -440,6 +444,10 @@ const cy: typeof en = (
linkText: 'newid eich cais i fod yn gais unigol.',
},
},
generalApplicationReceived: {
line1:
'Mae’r llys yn adolygu cais cyffredinol sydd wedi dod i law a bydd yn cysylltu â chi i roi gwybod i chi beth fydd eich camau nesaf.',
},
awaitingLegalAdvisorReferral: {
line1: `Rydych chi a'ch ${partner} wedi gwneud cais am 'orchymyn amodol'.`,
line2: `Bydd y llys yn gwirio'ch cais ac yn ei anfon at farnwr.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ describe('JointTemplateSelector test', () => {
expect(jointTemplate).toBe(HubTemplate.FinalOrderRequested);
});

test('should show /final-order-requested.njk for state AwaitingGeneralConsideration', () => {
test('should show /general-application-received.njk for state AwaitingGeneralConsideration', () => {
const theState = displayState.at(State.AwaitingGeneralConsideration);
const jointTemplate = getJointHubTemplate(theState, userCase);
expect(jointTemplate).toBe(HubTemplate.FinalOrderRequested);
expect(jointTemplate).toBe(HubTemplate.GeneralApplicationReceived);
});

test('should show /awaiting-final-order.njk for state AwaitingFinalOrder', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ export const getJointHubTemplate = (
} = {}
): string | undefined => {
switch (displayState.state()) {
case State.AwaitingGeneralConsideration: {
return HubTemplate.GeneralApplicationReceived;
}
case State.FinalOrderRequested:
case State.AwaitingGeneralConsideration:
case State.FinalOrderPending:
case State.GeneralConsiderationComplete: {
return HubTemplate.FinalOrderRequested;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "../../sole/latest-update-content/general-application-received.njk" %}
29 changes: 2 additions & 27 deletions src/main/steps/applicant1/hub-page/sole/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,18 +195,6 @@ const en = (
isDivorce ? 'divorce application' : 'application to end your civil partnership'
}.`,
},
d8Submitted: {
line1: `Your ${partner} has responded to your application and said they want to defend the ${
isDivorce ? 'divorce' : 'ending of your civil partnership'
}. This means they want to try and prevent ${
isDivorce ? 'the divorce' : 'the ending of your civil partnership'
}. You can <a class="govuk-link" href="/downloads/respondent-answers" download="Respondent-answers">read their response here</a>.`,
line2: `They have submitted their ‘answer’. This is the form which explains their case for defending the ${
isDivorce ? 'divorce' : 'ending of your civil partnership'
}.`,
line3: `A judge will decide whether you and your ${partner} need to attend a hearing. You may be contacted for more information to help them make a decision.`,
line4: 'You’ll receive a letter in the post telling you if you need to attend the hearing, and where it will be.',
},
servedByBailiff: {
line1: `The bailiff has successfully served (delivered) your ${
isDivorce ? 'divorce application' : 'application to end your civil partnership'
Expand Down Expand Up @@ -518,7 +506,7 @@ const en = (
},
line3: `If they fail to serve, you may be able to apply for alternative service by letterbox if your ${partner}’s address is confirmed. Otherwise, you will need to try another way to serve the papers.`,
},
offlineGeneralApplicationReceived: {
generalApplicationReceived: {
line1:
'The court is reviewing a general application that has been received and will contact you to let you know your next steps.',
},
Expand Down Expand Up @@ -689,19 +677,6 @@ const cy: typeof en = (
isDivorce ? 'cais am ysgariad' : "cais i ddod â'ch partneriaeth sifil i ben"
}.`,
},
d8Submitted: {
line1: `Mae eich ${partner} wedi ymateb i'ch cais ac wedi dweud eu bod eisiau amddiffyn y ${
isDivorce ? 'cais am ysgariad' : "cais i ddod â'ch partneriaeth sifil i ben"
}. Mae hyn yn golygu eu bod eisiau ceisio atal y ${
isDivorce ? 'cais am ysgariad' : "cais i ddod â'ch partneriaeth sifil i ben"
}. Gallwch <a class="govuk-link" href="/downloads/respondent-answers" download="Respondent-answers">ddarllen eu hymateb yma</a>.`,
line2: `Maent wedi cyflwyno eu 'hateb'. Dyma'r ffurflen sy'n esbonio eu rhesymau dros amddiffyn y ${
isDivorce ? 'cais am ysgariad' : "cais i ddod â'ch partneriaeth sifil i ben"
}.`,
line3: `Bydd barnwr yn penderfynu a oes angen i chi a'ch ${partner} fynychu gwrandawiad. Efallai y cysylltir â chi i gael rhagor o wybodaeth i'w helpu i wneud penderfyniad.`,
line4:
"Byddwch yn derbyn llythyr yn y post yn dweud wrthych a oes angen i chi ddod i'r gwrandawiad, a ble y bydd hynny yn digwydd.",
},
servedByBailiff: {
line1: `Mae’r beili wedi cyflwyno (danfon) eich ${
isDivorce ? 'cais am ysgariad' : "cais i ddod â'ch partneriaeth sifil i ben"
Expand Down Expand Up @@ -1031,7 +1006,7 @@ const cy: typeof en = (
},
line3: `Os byddant yn methu â chyflwyno’r papurau, efallai y gallwch wneud cais am gyflwyno amgen drwy flwch llythyrau, os yw cyfeiriad eich ${partner} wedi’i gadarnhau. Fel arall, bydd angen i chi gyflwyno’r papurau mewn rhyw ffordd arall.`,
},
offlineGeneralApplicationReceived: {
generalApplicationReceived: {
line1:
'Mae’r llys yn adolygu cais cyffredinol sydd wedi dod i law a bydd yn cysylltu â chi i roi gwybod i chi beth fydd eich camau nesaf.',
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<p class="govuk-body" id="generalApplicationReceivedLine1Sole">{{ generalApplicationReceived.line1 }}</p>

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ describe('SoleTemplateSelector test', () => {
};
const theState = displayState.at(State.GeneralConsiderationComplete);
const soleTemplate = getSoleHubTemplate(theState, userCaseWithApplicantSubmittedDate, false, false);
expect(soleTemplate).toBe(HubTemplate.AwaitingGeneralConsideration);
expect(soleTemplate).toBe(HubTemplate.GeneralApplicationReceived);
});
test('should show /aos-due.njk for state GeneralConsiderationComplete and isAosOverdue', () => {
const userCaseWithAosOverdue = {
Expand Down Expand Up @@ -198,26 +198,26 @@ describe('SoleTemplateSelector test', () => {
};
const theState = displayState.at(State.AwaitingGeneralConsideration);
const soleTemplate = getSoleHubTemplate(theState, userCaseWithAosStatementOfTruth, false, false);
expect(soleTemplate).toBe(HubTemplate.AwaitingGeneralConsideration);
expect(soleTemplate).toBe(HubTemplate.GeneralApplicationReceived);
});
test('should show /aos-due.njk for state AwaitingGeneralConsideration and isAosOverdue', () => {
test('should show /general-application-received.njk for state AwaitingGeneralConsideration and isAosOverdue', () => {
const userCaseWithAosOverdue = {
...userCase,
issueDate: '01.01.2022',
};
const theState = displayState.at(State.AwaitingGeneralConsideration);
const soleTemplate = getSoleHubTemplate(theState, userCaseWithAosOverdue, false, false);
expect(soleTemplate).toBe(HubTemplate.AoSDue);
expect(soleTemplate).toBe(HubTemplate.GeneralApplicationReceived);
});

test('should show /aos-awaiting-or-drafted.njk for state AwaitingGeneralConsideration and not isAosOverdue', () => {
test('should show /general-application-received.njk for state AwaitingGeneralConsideration and not isAosOverdue', () => {
const userCaseWithNotAosOverdue = {
...userCase,
issueDate: dayjs().format('D MMMM YYYY'),
};
const theState = displayState.at(State.AwaitingGeneralConsideration);
const soleTemplate = getSoleHubTemplate(theState, userCaseWithNotAosOverdue, false, false);
expect(soleTemplate).toBe(HubTemplate.AosAwaitingOrDrafted);
expect(soleTemplate).toBe(HubTemplate.GeneralApplicationReceived);
});

test('should show /awaiting-conditional-order.njk for state AwaitingConditionalOrder', () => {
Expand Down Expand Up @@ -576,7 +576,7 @@ describe('SoleTemplateSelector test', () => {
expect(soleTemplate).toBe(HubTemplate.ServiceAdminRefusalOrBailiffRefusedOrAlternativeServiceGranted);
});

test('should show /offline-general-application-received.njk for state GeneralConsiderationComplete and isSearchGovRecords and isOnlineGeneralApplication is No', () => {
test('should show /general-application-received.njk for state GeneralConsiderationComplete and isSearchGovRecords and isOnlineGeneralApplication is No', () => {
const userCaseWithOfflineGeneralApplication = {
...userCase,
generalApplications: [
Expand All @@ -593,13 +593,13 @@ describe('SoleTemplateSelector test', () => {
};
const theState = displayState.at(State.GeneralConsiderationComplete);
const soleTemplate = getSoleHubTemplate(theState, userCaseWithOfflineGeneralApplication, false, false);
expect(soleTemplate).toBe(HubTemplate.OfflineGeneralApplicationReceived);
expect(soleTemplate).toBe(HubTemplate.GeneralApplicationReceived);
});

test('should show /offline-general-application-received.njk for state AwaitingGeneralReferralPayment', () => {
test('should show /general-application-received.njk for state AwaitingGeneralReferralPayment', () => {
const theState = displayState.at(State.AwaitingGeneralReferralPayment);
const soleTemplate = getSoleHubTemplate(theState, userCase, false, false);
expect(soleTemplate).toBe(HubTemplate.OfflineGeneralApplicationReceived);
expect(soleTemplate).toBe(HubTemplate.GeneralApplicationReceived);
});

test('should show /awaiting-general-application-payment.njk for state AwaitingGeneralApplicationPayment', () => {
Expand All @@ -625,6 +625,6 @@ describe('SoleTemplateSelector test', () => {
};
const theState = displayState.at(State.GeneralApplicationReceived);
const soleTemplate = getSoleHubTemplate(theState, userCaseWithOfflineGeneralApplication, false, false);
expect(soleTemplate).toBe(HubTemplate.OfflineGeneralApplicationReceived);
expect(soleTemplate).toBe(HubTemplate.GeneralApplicationReceived);
});
});
18 changes: 7 additions & 11 deletions src/main/steps/applicant1/hub-page/sole/soleTemplateSelector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ export const getSoleHubTemplate = (
} else if (userCase.coApplicant1SubmittedDate || userCase.coApplicant2SubmittedDate) {
return HubTemplate.AwaitingConditionalOrder;
} else if (isSearchGovRecords) {
return HubTemplate.OfflineGeneralApplicationReceived;
return HubTemplate.GeneralApplicationReceived;
} else if (!userCase.dueDate && userCase.aosStatementOfTruth) {
return HubTemplate.AwaitingGeneralConsideration;
return HubTemplate.GeneralApplicationReceived;
} else if (isAlternativeServiceGrantedOrRefusedPreIssue) {
return HubTemplate.ServiceAdminRefusalOrBailiffRefusedOrAlternativeServiceGranted;
} else if (isAosOverdue) {
Expand All @@ -86,22 +86,18 @@ export const getSoleHubTemplate = (
return HubTemplate.AosAwaitingOrDrafted;
}
case State.AwaitingGeneralConsideration:
if (isSearchGovRecords) {
return isOnlineGeneralApplication ? HubTemplate.AwaitingGeneralApplicationConsideration : HubTemplate.AoSDue;
} else if (userCase.dateFinalOrderSubmitted) {
if (userCase.dateFinalOrderSubmitted) {
return HubTemplate.FinalOrderRequested;
} else if (userCase.aosStatementOfTruth) {
return HubTemplate.AwaitingGeneralConsideration;
} else if (isAosOverdue) {
return HubTemplate.AoSDue;
} else if (isSearchGovRecords && isOnlineGeneralApplication) {
return HubTemplate.AwaitingGeneralApplicationConsideration;
} else {
return HubTemplate.AosAwaitingOrDrafted;
return HubTemplate.GeneralApplicationReceived;
}
case State.GeneralApplicationReceived:
case State.AwaitingGeneralReferralPayment:
return isOnlineGeneralApplication
? HubTemplate.AwaitingGeneralApplicationConsideration
: HubTemplate.OfflineGeneralApplicationReceived;
: HubTemplate.GeneralApplicationReceived;
case State.AwaitingConditionalOrder:
return HubTemplate.AwaitingConditionalOrder;
case State.Holding:
Expand Down
2 changes: 1 addition & 1 deletion src/main/steps/common/hubTemplates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const enum HubTemplate {
AwaitingServiceApplicationDocuments = '/awaiting-service-application-documents.njk',
AwaitingService = '/awaiting-service.njk',
WelshTranslationRequestedOrReview = '/welsh-translation-requested-or-review.njk',
OfflineGeneralApplicationReceived = '/offline-general-application-received.njk',
GeneralApplicationReceived = '/general-application-received.njk',
AwaitingDwpResponse = '/awaiting-dwp-response.njk',
AwaitingAlternativeService = '/awaiting-alternative-service.njk',
AwaitingGenAppHWFPartPaymentOrEvidence = '/awaiting-gen-app-hwf-part-payment-or-evidence.njk',
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{% extends "../../../applicant1/hub-page/sole/latest-update-content/general-application-received.njk" %}
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ describe('RespondentTemplateSelector test', () => {
};
const theState = displayState.at(State.AwaitingGeneralConsideration);
const respondentTemplate = getRespondentHubTemplate(theState, userCaseWithAosStatementOfTruth, false);
expect(respondentTemplate).toBe(HubTemplate.AwaitingGeneralConsideration);
expect(respondentTemplate).toBe(HubTemplate.GeneralApplicationReceived);
});

test('should show /awaiting-aos.njk for state AwaitingGeneralConsideration if not aosStatementOfTruth', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const getRespondentHubTemplate = (
} else if (userCase.coGrantedDate && State.GeneralConsiderationComplete) {
return HubTemplate.ConditionalOrderPronounced;
} else if (userCase.aosStatementOfTruth && State.AwaitingGeneralConsideration) {
return HubTemplate.AwaitingGeneralConsideration;
return HubTemplate.GeneralApplicationReceived;
} else {
return HubTemplate.AwaitingAoS;
}
Expand Down