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

DFPL-2313 Update Additional Documents flow and include new Statement type. #5780

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 8 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
49 changes: 8 additions & 41 deletions ccd-definition/CaseEventToComplexTypes/uploadDocuments.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "documentType",
"ListElementCode": "document",
"EventElementLabel": "Upload a file",
"FieldDisplayOrder": 1,
"DisplayContext": "MANDATORY"
},
Expand All @@ -13,7 +14,7 @@
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "documentName",
"ListElementCode": "documentType",
"FieldDisplayOrder": 2,
"DisplayContext": "MANDATORY"
},
Expand All @@ -22,20 +23,19 @@
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "includedInSWET",
"EventElementLabel": "Let us know what you are including in your SWET",
"ListElementCode": "documentName",
"FieldDisplayOrder": 3,
"DisplayContext": "OPTIONAL"
"DisplayContext": "MANDATORY"
},
{
"LiveFrom": "01/01/2017",
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "document",
"EventElementLabel": "Upload a file",
"ListElementCode": "includedInSWET",
"EventElementLabel": "Let us know what you are including in your SWET",
"FieldDisplayOrder": 4,
"DisplayContext": "MANDATORY"
"DisplayContext": "OPTIONAL"
},
{
"LiveFrom": "01/01/2017",
Expand All @@ -56,38 +56,5 @@
"FieldDisplayOrder": 6,
"DisplayContext": "OPTIONAL",
"FieldShowCondition": "temporaryApplicationDocuments=\"DO NOT SHOW\""
},
{
"LiveFrom": "01/01/2017",
"ID": "ManageDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "confidentialWarningLabel",
"FieldDisplayOrder": 7,
"DisplayContext": "READONLY",
"EventElementLabel": "<br /><div class='govuk-warning-text'><span class='govuk-warning-text__icon' aria-hidden='true'>!</span><strong class='govuk-warning-text__text'>Check if documents are confidential</strong></div><br>",
"ShowSummaryChangeOption": "N",
"FieldShowCondition": "allowMarkDocumentConfidential = \"YES\""
},
{
"LiveFrom": "01/01/2017",
"ID": "ManageDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "confidential",
"FieldDisplayOrder": 8,
"DisplayContext": "OPTIONAL",
"EventElementLabel": "Tick to restrict to the LA, Cafcass and HMCTS staff",
"FieldShowCondition": "allowMarkDocumentConfidential = \"YES\""
},
{
"LiveFrom": "01/01/2017",
"ID": "UploadApplicationDocuments",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "temporaryApplicationDocuments",
"ListElementCode": "allowMarkDocumentConfidential",
"FieldDisplayOrder": 9,
"DisplayContext": "READONLY",
"FieldShowCondition": "confidential=\"DO_NOT_SHOW\""
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"CaseTypeID": "CARE_SUPERVISION_EPO",
"CaseEventID": "uploadDocuments",
"CaseFieldID": "applicationDocumentsToFollowReason",
"CaseEventFieldLabel": "Give details of documents to follow, including why you're not sending them now, and when you think they'll be ready.",
"CaseEventFieldLabel": "Give details of any documents you will upload at a later date.",
"PageFieldDisplayOrder": 3,
"DisplayContext": "OPTIONAL",
"PageID": "addApplicationDocuments",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"ListElementCode": "documentType",
"FieldType": "FixedList",
"FieldTypeParameter": "ApplicationDocumentType",
"ElementLabel": "Type of document",
"ElementLabel": "Document type",
"SecurityClassification": "Public"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,18 @@
"ListElement": "Birth certificate",
"DisplayOrder": 8
},
{
"LiveFrom": "01/01/2017",
"ID": "ApplicationDocumentType",
"ListElementCode": "STATEMENT",
"ListElement": "Statement",
"DisplayOrder": 9
},
{
"LiveFrom": "01/01/2017",
"ID": "ApplicationDocumentType",
"ListElementCode": "OTHER",
"ListElement": "Other",
"DisplayOrder": 9
"DisplayOrder": 10
}
]
4 changes: 2 additions & 2 deletions playwright-e2e/pages/add-application-documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ export class AddApplicationDocuments {
this.page = page;
this.applicationDocumentsHeading = page.getByRole('heading', { name: 'Application documents' });
this.addNewButton = page.getByRole('button', { name: 'Add new' });
this.typeOfDocument = page.getByLabel('Type of document');
this.typeOfDocument = page.getByLabel('Document type');
this.chooseFileButton = page.locator('input#temporaryApplicationDocuments_0_document').first();
this.giveDetailsText = page.getByLabel('Give details of documents to follow, including why you\'re not sending them now, and when you think they\'ll be ready. (Optional)');
this.giveDetailsText = page.getByLabel('Give details of any documents you will upload at a later date.');
}

async uploadDocumentSmokeTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public enum ApplicationDocumentType {
GENOGRAM("Genogram", "Genogram"),
CHECKLIST_DOCUMENT("Checklist document", "Dogfen wirio"),
BIRTH_CERTIFICATE("Birth certificate", "Tystysgrif geni"),
STATEMENT("Statement", "Datganiad"),
OTHER("Other", "Arall");

private final String label;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.OTHER;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.SOCIAL_WORK_CHRONOLOGY;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.SOCIAL_WORK_STATEMENT;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.STATEMENT;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.SWET;
import static uk.gov.hmcts.reform.fpl.enums.ApplicationDocumentType.THRESHOLD;
import static uk.gov.hmcts.reform.fpl.utils.ElementUtils.element;
Expand Down Expand Up @@ -77,7 +78,7 @@ private Map<String, Object> synchroniseToNewFields(List<Element<ApplicationDocum
public Map<String, Object> synchroniseToNewFields(List<Element<ApplicationDocument>> applicationDocuments) {
Map<String, Object> ret = new HashMap<>();
ret.putAll(synchroniseToNewFields(applicationDocuments, List.of(SWET, SOCIAL_WORK_CHRONOLOGY,
SOCIAL_WORK_STATEMENT, GENOGRAM, CHECKLIST_DOCUMENT, BIRTH_CERTIFICATE, OTHER),
SOCIAL_WORK_STATEMENT, GENOGRAM, CHECKLIST_DOCUMENT, BIRTH_CERTIFICATE, STATEMENT, OTHER),
"documentsFiledOnIssueList"));
ret.putAll(synchroniseToNewFields(applicationDocuments, List.of(CARE_PLAN), "carePlanList"));
ret.putAll(synchroniseToNewFields(applicationDocuments, List.of(THRESHOLD), "thresholdList"));
Expand Down
Loading