Skip to content

Commit

Permalink
fix DA issues and FT (#1693)
Browse files Browse the repository at this point in the history
* fix DA issues

* fix DA issues

* fix DA issues

* fix DA issues

* fix DA issues
  • Loading branch information
vivek-sekhar authored Oct 21, 2024
1 parent c21b622 commit a8f193f
Show file tree
Hide file tree
Showing 21 changed files with 109 additions and 60 deletions.
4 changes: 2 additions & 2 deletions Jenkinsfile_CNP
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ withPipeline(type, product, component) {
}

before('smoketest:aat') {
env.PRL_CITIZEN_URL = "https://prl-citizen-frontend-staging.aat.platform.hmcts.net/"
env.PRL_CITIZEN_URL = "https://privatelaw.aat.platform.hmcts.net/"
}

afterAlways('smoketest:aat') {
Expand All @@ -88,7 +88,7 @@ withPipeline(type, product, component) {
}

before('functionalTest:aat') {
env.PRL_CITIZEN_URL = "https://prl-citizen-frontend-staging.aat.platform.hmcts.net/"
env.PRL_CITIZEN_URL = "https://privatelaw.aat.platform.hmcts.net/"
yarnBuilder.yarn('test:functional:skip')
}

Expand Down
6 changes: 3 additions & 3 deletions charts/prl-citizen-frontend/values.preview.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ nodejs:
SERVICE_AUTH_PROVIDER_URL: 'http://rpe-service-auth-provider-{{ .Values.global.environment }}.service.core-compute-{{ .Values.global.environment }}.internal'
IDAM_WEB_URL: 'https://idam-web-public.{{ .Values.global.environment }}.platform.hmcts.net/login'
IDAM_API_URL: 'https://idam-api.{{ .Values.global.environment }}.platform.hmcts.net/o/token'
CCD_URL: 'https://ccd-data-store-api-prl-ccd-definitions-pr-2457.preview.platform.hmcts.net'
CCD_URL: 'http://ccd-data-store-api-aat.service.core-compute-aat.internal'
EQUALITY_URL: 'https://pcq.aat.platform.hmcts.net'
DOCUMENT_MANAGEMENT_URL: 'https://ccd-case-document-am-api-prl-ccd-definitions-pr-2457.preview.platform.hmcts.net'
COS_URL: 'https://prl-cos-pr-2779.preview.platform.hmcts.net'
DOCUMENT_MANAGEMENT_URL: 'http://ccd-case-document-am-api-aat.service.core-compute-aat.internal'
COS_URL: 'http://prl-cos-aat.service.core-compute-aat.internal'
REASONABLE_ADJUSTMENTS: 'https://cui-ra.aat.platform.hmcts.net'
FACT_URL: 'http://fact-api-aat.service.core-compute-aat.internal'
REASONABLE_ADJUSTMENTS: 'https://cui-ra.{{ .Values.global.environment }}.platform.hmcts.net'
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ sonar.tests=src/test/
sonar.test.exclusions=src/**/*.njk
sonar.typescript.lcov.reportPaths=coverage/lcov.info
sonar.javascript.lcov.reportPaths=coverage/lcov.info
sonar.exclusions=src/**/*.test.ts,src/main/steps/tasklistresponse/responseCaseSequence.ts,src/main/steps/tasklistresponse/tasklistresponseCaseSequence.ts**/__mocks__/**,src/**/content.ts,src/main/steps/applicant/applicantCaseSequence.ts,src/main/steps/respondent/respondentcaseSequence.ts,src/main/steps/common/task-list/components/tasklist/config/*.ts,src/main/steps/common/task-list/components/notification-banner/*/*.ts,src/main/steps/common/task-list/components/side-links/config/*.ts,src/main/steps/common/task-list/components/side-links/content.ts,src/main/steps/tasklistresponse/summary/handler.ts,src/main/app/case/C100CaseApi.ts
sonar.exclusions=src/**/*.test.ts,src/main/steps/tasklistresponse/responseCaseSequence.ts,src/main/steps/tasklistresponse/tasklistresponseCaseSequence.ts**/__mocks__/**,src/**/content.ts,src/main/steps/applicant/applicantCaseSequence.ts,src/main/steps/respondent/respondentcaseSequence.ts,src/main/steps/common/task-list/components/tasklist/config/*.ts,src/main/steps/common/task-list/components/notification-banner/*/*.ts,src/main/steps/common/task-list/components/side-links/config/*.ts,src/main/steps/common/task-list/components/side-links/content.ts,src/main/steps/tasklistresponse/summary/handler.ts,src/main/app/case/C100CaseApi.ts,src/main/steps/common/task-list/components/tasklist/utils.ts
sonar.organization=hmcts
sonar.cpd.typescript.minimumLines=250
sonar.cpd.javascript.minimumLines=250
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const enContent = {
supportDuringCaselinktext: 'Support you need during your hearing',
delayorcancellinktext: 'Ask to delay or cancel a hearing date',
linkforsupport: '/applicant/reasonable-adjustments/intro',
linkfordelayorcancel: '#',
linkfordelayorcancel: '/applicant/application-within-proceedings/C2/delay-or-cancel-hearing-date/guidance',
hearingOutcome: 'Hearing outcome',
hearing: 'Hearing',
hearingid: 'Hearing Id',
Expand Down Expand Up @@ -69,7 +69,7 @@ const cyContent: typeof enContent = {
supportDuringCaselinktext: 'Support you need during your hearing - welsh',
delayorcancellinktext: 'Ask to delay or cancel a hearing date - welsh',
linkforsupport: '/applicant/reasonable-adjustments/intro',
linkfordelayorcancel: '#',
linkfordelayorcancel: '/applicant/application-within-proceedings/C2/delay-or-cancel-hearing-date/guidance',
hearingOutcome: 'Hearing outcome - welsh',
hearing: 'Hearing - welsh',
hearingid: 'Hearing Id - welsh',
Expand Down
15 changes: 13 additions & 2 deletions src/main/steps/applicant/yourhearings/hearings/content.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import { HearingOrders, PartyType } from '../../../../app/case/definition';
import { AWPApplicationReason, AWPApplicationType, HearingOrders, PartyType } from '../../../../app/case/definition';
import { TranslationFn } from '../../../../app/controller/GetController';
import { transformFileName } from '../../../../steps/common/documents/download/utils';
import { applyParms } from '../../../../steps/common/url-parser';
import { DOWNLOAD_DOCUMENT, FETCH_CASE_DETAILS, REASONABLE_ADJUSTMENTS_INTRO } from '../../../../steps/urls';
import {
APPLICATION_WITHIN_PROCEEDINGS_GUIDANCE,
DOWNLOAD_DOCUMENT,
FETCH_CASE_DETAILS,
REASONABLE_ADJUSTMENTS_INTRO,
} from '../../../../steps/urls';
import { generateContent as yourhearingshearingscontent } from '../../../common/yourhearings/hearings/content';

export { form } from '../../../common/yourhearings/hearings/content';
Expand All @@ -14,6 +19,12 @@ export const generateContent: TranslationFn = content => {
hearingsContent.linkforsupport = applyParms(REASONABLE_ADJUSTMENTS_INTRO, {
partyType: PartyType.APPLICANT,
});
hearingsContent.linkfordelayorcancel = applyParms(APPLICATION_WITHIN_PROCEEDINGS_GUIDANCE, {
partyType: PartyType.APPLICANT,
applicationType: AWPApplicationType.C2,
applicationReason: AWPApplicationReason.DELAY_CANCEL_HEARING_DATE,
});

const hearingOrders: HearingOrders[] = [];
//** validate **
for (const doc of request.session.userCase?.orderCollection || []) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ export const form: FormContent = {
label: l => l.citizenUserPlaceOfBirth,
labelSize: null,
hidden: caseData?.caseTypeOfApplication === CaseType.FL401,
validator: value => isFieldFilledIn(value),
validator: value => {
return !(caseData?.caseTypeOfApplication === CaseType.FL401) ? isFieldFilledIn(value) : undefined;
},
},
};
},
Expand Down
2 changes: 1 addition & 1 deletion src/main/steps/common/dashboard-page.njk
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe>
</noscript>
<!-- End Google Tag Manager (noscript) -->
<!-- Dynatrace RUM Script -->
<script type="text/javascript" src="https://js-cdn.dynatrace.com/jstag/17177a07246/bf24054dsx/5b59108c720e8fa7_complete.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="https://js-cdn.dynatrace.com/jstag/17177a07246/bf24054dsx/17472274602522b6_complete.js" crossorigin="anonymous"></script>
<!-- End Dynatrace RUM Script -->
{% endblock %}

Expand Down
3 changes: 1 addition & 2 deletions src/main/steps/common/documents/definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ export const enum UploadDocumentAPICategory {
MEDICAL_REPORTS = 'MEDICAL_REPORTS',
MEDICAL_RECORDS = 'MEDICAL_RECORDS',
EMAIL_IMAGES_MEDIA = 'MAIL_SCREENSHOTS_MEDIA_FILES',
LETTERS_FROM_SCHOOL_APPLICANT = 'LETTERS_FROM_SCHOOL_APPLICANT',
LETTERS_FROM_SCHOOL_RESPONDENT = 'LETTERS_FROM_SCHOOL_RESPONDENT',
LETTERS_FROM_SCHOOL = 'LETTERS_FROM_SCHOOL',
TENANCY_AND_MORTGAGE_AGREEMENTS = 'TENANCY_MORTGAGE_AGREEMENTS',
PREVIOUS_ORDERS_SUBMITTED_APPLICANT = 'PREVIOUS_ORDERS_SUBMITTED_APPLICANT',
PREVIOUS_ORDERS_SUBMITTED_RESPONDENT = 'PREVIOUS_ORDERS_SUBMITTED_RESPONDENT',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ describe('documents > upload > submit-extra-evidence > content', () => {
id: '123',
caseTypeOfApplication: 'C100',
},
user: {
id: 'user123',
},
},
},
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import { AWPApplicationReason, AWPApplicationType } from '../../../../../app/case/definition';
import { TranslationFn } from '../../../../../app/controller/GetController';
import { FormContent } from '../../../../../app/form/Form';
import { applyParms } from '../../../../../steps/common/url-parser';
import { FETCH_CASE_DETAILS } from '../../../../urls';
import { getCasePartyType } from '../../../../../steps/prl-cases/dashboard/utils';
import { APPLICATION_WITHIN_PROCEEDINGS_GUIDANCE, FETCH_CASE_DETAILS } from '../../../../urls';

const en = () => ({
section: 'Upload documents',
Expand Down Expand Up @@ -51,6 +53,11 @@ export const generateContent: TranslationFn = content => {

return {
...translations,
c2FormLink: applyParms(APPLICATION_WITHIN_PROCEEDINGS_GUIDANCE, {
partyType: getCasePartyType(userCase, request.session.user.id),
applicationType: AWPApplicationType.C2,
applicationReason: AWPApplicationReason.SUBMIT_EVIDENCE_COURT_NOT_REQUESTED,
}),
form,
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<span class="govuk-caption-l">{{section}}</span>
{{line1}}
</h1>
<p class="govuk-body">{{line2_1}}<a href="#">{{line2_2}}</a></p>
<p class="govuk-body">{{line2_1}}<a href="{{c2FormLink}}">{{line2_2}}</a></p>
<p class="govuk-body">{{line3}}</p>
</div>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ export default class UploadDocumentPostController extends PostController<AnyObje
documentCategory = UploadDocumentAPICategory.EMAIL_IMAGES_MEDIA;
break;
case UploadDocumentCategory.LETTERS_FROM_SCHOOL:
documentCategory =
partyType === PartyType.APPLICANT
? UploadDocumentAPICategory.LETTERS_FROM_SCHOOL_APPLICANT
: UploadDocumentAPICategory.LETTERS_FROM_SCHOOL_RESPONDENT;
documentCategory = UploadDocumentAPICategory.LETTERS_FROM_SCHOOL;
break;
case UploadDocumentCategory.TENANCY_AND_MORTGAGE_AGREEMENTS:
documentCategory = UploadDocumentAPICategory.TENANCY_AND_MORTGAGE_AGREEMENTS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ export const aboutYou: TaskListConfigProps = {
{
id: Tasks.EDIT_YOUR_CONTACT_DETAILS,
href: (caseData: Partial<CaseWithId>) => `${RESPONDENT_CHECK_ANSWERS}/${caseData.id}`,
stateTag: (caseData, userDetails) => {
stateTag: (caseData: Partial<CaseWithId>, userDetails) => {
const respondent = getPartyDetails(caseData as CaseWithId, userDetails.id);
return getConfirmOrEditYourContactDetailsStatus(respondent);
return getConfirmOrEditYourContactDetailsStatus(caseData, respondent);
},
},
{
Expand All @@ -76,7 +76,7 @@ export const aboutYou: TaskListConfigProps = {
`${applyParms(DETAILS_KNOWN, { partyType: PartyType.RESPONDENT })}/${caseData.id}`,
stateTag: (caseData: Partial<CaseWithId>, userDetails: UserDetails) => {
const respondent = getPartyDetails(caseData as CaseWithId, userDetails.id);
return getKeepYourDetailsPrivateStatus(respondent?.response.keepDetailsPrivate);
return getKeepYourDetailsPrivateStatus(respondent?.response?.keepDetailsPrivate);
},
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ import {
import { applyParms } from '../../../../../../steps/common/url-parser';
import {
APPLICANT_CHECK_ANSWERS,
APPLICANT_YOURHEARINGS_HEARINGS,
APPLICATION_WITHIN_PROCEEDINGS_LIST_OF_APPLICATIONS,
CHOOSE_CONTACT_PREFERENCE,
DETAILS_KNOWN,
DOWNLOAD_DOCUMENT_BY_TYPE,
FETCH_HEARING_DETAILS,
REASONABLE_ADJUSTMENTS_INTRO,
UPLOAD_DOCUMENT,
VIEW_ALL_DOCUMENT_TYPES,
Expand Down Expand Up @@ -52,7 +52,7 @@ export const DA_APPLICANT: TaskListConfigProps[] = [
id: Tasks.EDIT_YOUR_CONTACT_DETAILS,
href: (caseData: Partial<CaseWithId>) => `${APPLICANT_CHECK_ANSWERS}/${caseData.id}`,
stateTag: (caseData: Partial<CaseWithId>) =>
getConfirmOrEditYourContactDetailsStatus(caseData?.applicantsFL401),
getConfirmOrEditYourContactDetailsStatus(caseData, caseData?.applicantsFL401),
},
{
id: Tasks.CONTACT_PREFERENCES,
Expand Down Expand Up @@ -130,7 +130,7 @@ export const DA_APPLICANT: TaskListConfigProps[] = [
{
id: Tasks.VIEW_HEARING_DETAILS,
href: (caseData: Partial<CaseWithId>) =>
hasAnyHearing(caseData) ? `${APPLICANT_YOURHEARINGS_HEARINGS}/${caseData.id}` : '#',
applyParms(FETCH_HEARING_DETAILS, { partyType: PartyType.APPLICANT, caseId: caseData.id as string }),
stateTag: (caseData: Partial<CaseWithId>) => {
if (hasAnyHearing(caseData)) {
return StateTags.READY_TO_VIEW;
Expand Down
12 changes: 6 additions & 6 deletions src/main/steps/common/task-list/components/tasklist/content.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ const en: TaskListContent = {
heading: 'Your documents',
tasks: {
uploadDocuments: {
linkText: 'Upload Documents',
linkText: 'Upload documents, applications and statements',
},
viewAllDocuments: {
linkText: 'View all documents',
Expand Down Expand Up @@ -196,7 +196,7 @@ const en: TaskListContent = {
heading: 'Your documents',
tasks: {
uploadDocuments: {
linkText: ' Upload documents',
linkText: 'Upload documents, applications and statements',
},
viewAllDocuments: {
linkText: 'View all documents',
Expand Down Expand Up @@ -284,7 +284,7 @@ const en: TaskListContent = {
linkText: 'View all documents',
},
uploadDocuments: {
linkText: 'Upload Documents',
linkText: 'Upload documents, applications and statements',
},
},
},
Expand Down Expand Up @@ -453,7 +453,7 @@ const cy: typeof en = {
heading: 'Eich dogfennau',
tasks: {
uploadDocuments: {
linkText: 'Llwytho dogfennau Dewisol',
linkText: 'Llwytho dogfennau, ceisiadau a datganiadau',
},
viewAllDocuments: {
linkText: 'Eich diogelwch',
Expand Down Expand Up @@ -496,7 +496,7 @@ const cy: typeof en = {
heading: 'Eich dogfennau',
tasks: {
uploadDocuments: {
linkText: 'Llwytho dogfennau',
linkText: 'Llwytho dogfennau, ceisiadau a datganiadau',
},
viewAllDocuments: {
linkText: 'Gweld yr holl ddogfennau',
Expand Down Expand Up @@ -586,7 +586,7 @@ const cy: typeof en = {
linkText: 'Eich diogelwch',
},
uploadDocuments: {
linkText: 'Llwytho dogfennau Dewisol',
linkText: 'Llwytho dogfennau, ceisiadau a datganiadau',
},
},
},
Expand Down
22 changes: 11 additions & 11 deletions src/main/steps/common/task-list/components/tasklist/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2473,7 +2473,7 @@ describe('tasklist index', () => {
{
id: 'viewHearingDetails',
linkText: 'Check details of your court hearings',
href: '/applicant/yourhearings/hearings/12',
href: '/applicant/hearings/12',
disabled: false,
stateTag: {
label: 'Ready to view',
Expand All @@ -2490,7 +2490,7 @@ describe('tasklist index', () => {
tasks: [
{
id: 'uploadDocuments',
linkText: ' Upload documents',
linkText: 'Upload documents, applications and statements',
href: '/applicant/documents/upload',
disabled: false,
stateTag: {
Expand Down Expand Up @@ -2636,7 +2636,7 @@ describe('tasklist index', () => {
{
id: 'viewHearingDetails',
linkText: 'Check details of your court hearings',
href: '#',
href: '/applicant/hearings/12',
disabled: true,
stateTag: {
label: 'Not available yet',
Expand All @@ -2653,7 +2653,7 @@ describe('tasklist index', () => {
tasks: [
{
id: 'uploadDocuments',
linkText: ' Upload documents',
linkText: 'Upload documents, applications and statements',
href: '/applicant/documents/upload',
disabled: false,
stateTag: {
Expand Down Expand Up @@ -2752,7 +2752,7 @@ describe('tasklist index', () => {
{
disabled: true,
hintText: null,
href: '#',
href: '/applicant/hearings/12',
id: 'viewHearingDetails',
linkText: 'Check details of your court hearings',
openInAnotherTab: false,
Expand Down Expand Up @@ -2850,7 +2850,7 @@ describe('tasklist index', () => {
{
disabled: true,
hintText: null,
href: '#',
href: '/applicant/hearings/12',
id: 'viewHearingDetails',
linkText: 'Check details of your court hearings',
openInAnotherTab: false,
Expand Down Expand Up @@ -3050,7 +3050,7 @@ describe('tasklist index', () => {
tasks: [
{
id: 'uploadDocuments',
linkText: 'Upload Documents',
linkText: 'Upload documents, applications and statements',
href: '/respondent/documents/upload',
disabled: false,
stateTag: {
Expand Down Expand Up @@ -3416,7 +3416,7 @@ describe('c100 respondent', () => {
tasks: [
{
id: 'uploadDocuments',
linkText: 'Upload Documents',
linkText: 'Upload documents, applications and statements',
href: '/respondent/documents/upload',
disabled: false,
stateTag: {
Expand Down Expand Up @@ -3679,7 +3679,7 @@ describe('c100 respondent', () => {
tasks: [
{
id: 'uploadDocuments',
linkText: 'Upload Documents',
linkText: 'Upload documents, applications and statements',
href: '/respondent/documents/upload',
disabled: false,
stateTag: {
Expand Down Expand Up @@ -4013,7 +4013,7 @@ describe('c100 respondent', () => {
tasks: [
{
id: 'uploadDocuments',
linkText: 'Upload Documents',
linkText: 'Upload documents, applications and statements',
href: '/respondent/documents/upload',
disabled: false,
stateTag: {
Expand Down Expand Up @@ -4346,7 +4346,7 @@ describe('c100 respondent', () => {
tasks: [
{
id: 'uploadDocuments',
linkText: 'Upload Documents',
linkText: 'Upload documents, applications and statements',
href: '/respondent/documents/upload',
disabled: false,
stateTag: {
Expand Down
Loading

0 comments on commit a8f193f

Please sign in to comment.