\n\n
Only fill the following if you haven't requested the hearing yet<\/strong><\/p><\/br>\n\n<\/div>\n\n<\/details>",
+ "hearingSpecificDatesOptionsEnum": null,
+ "firstDateOfTheHearing": null,
+ "hearingMustTakePlaceAtHour": null,
+ "hearingMustTakePlaceAtMinute": null,
+ "earliestHearingDate": null,
+ "latestHearingDate": null,
+ "hearingPriorityTypeEnum": null,
+ "hearingEstimatedDays": null,
+ "hearingEstimatedHours": null,
+ "hearingEstimatedMinutes": null,
+ "hearingChannelsEnum": null,
+ "allPartiesAttendHearingSameWayYesOrNo": null,
+ "applicantHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "applicantSolicitorHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "respondentHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "respondentSolicitorHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "applicantHearingChannel1": null,
+ "applicantSolicitorHearingChannel1": null,
+ "applicantHearingChannel2": null,
+ "applicantSolicitorHearingChannel2": null,
+ "applicantHearingChannel3": null,
+ "applicantSolicitorHearingChannel3": null,
+ "applicantHearingChannel4": null,
+ "applicantSolicitorHearingChannel4": null,
+ "applicantHearingChannel5": null,
+ "applicantSolicitorHearingChannel5": null,
+ "respondentHearingChannel1": null,
+ "respondentSolicitorHearingChannel1": null,
+ "respondentHearingChannel2": null,
+ "respondentSolicitorHearingChannel2": null,
+ "respondentHearingChannel3": null,
+ "respondentSolicitorHearingChannel3": null,
+ "respondentHearingChannel4": null,
+ "respondentSolicitorHearingChannel4": null,
+ "respondentHearingChannel5": null,
+ "respondentSolicitorHearingChannel5": null,
+ "cafcassHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "cafcassCymruHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "localAuthorityHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "courtList": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "827534:",
+ "label": "Aberystwyth Justice Centre - Trefechan - SY23 1AS"
+ },
+ {
+ "code": "101959:",
+ "label": "Carmarthen County Court and Tribunal Hearing Centre - Hill House, Picton Terrace, Carmarthen - SA31 3BT"
+ },
+ {
+ "code": "816875:family.chelmsford.countycourt@test.com",
+ "label": "Chelmsford County and Family Court - Priory Place - CM2 0PP"
+ },
+ {
+ "code": "497679:Coventryprivatelawapplications@test.com",
+ "label": "Coventry Combined Court Centre - Much Park Street, Coventry - CV1 2SN"
+ },
+ {
+ "code": "898213:eastlondonfamilypr@test.com",
+ "label": "East London Family Court - Westferry Circus (Westferry House), Part Ground, 6th And 7th Floors, 11 Westferry Circus, Canary Wharf, London, E14 4HE - E14 4HD"
+ },
+ {
+ "code": "735217:family.exeter.countycourt@test.com",
+ "label": "Exeter Combined Court Centre - Southernhay Gardens, Exeter - EX1 1UH"
+ },
+ {
+ "code": "198592:family.gloucester.countycourt@test.com",
+ "label": "Gloucestershire Family and Civil Court - Kimbrose Way, Gloucester Docks - GL1 2DE"
+ },
+ {
+ "code": "700596:",
+ "label": "Haverfordwest County and Family - Penffynnon, Hawthorn Rise - SA61 2AZ"
+ },
+ {
+ "code": "195520:hull.private.filing@test.com",
+ "label": "Kingston-upon-Hull Combined Court Centre - The Combined Court Centre - HU1 2EZ"
+ },
+ {
+ "code": "195465:PLP.LINCOLN@test.com",
+ "label": "Lincoln County Court and Family Court - High Street - LN5 7PS"
+ },
+ {
+ "code": "390932:",
+ "label": "Llanelli Law Courts - Town Hall Square, Llanelli - SA15 3AW"
+ },
+ {
+ "code": "487294:KentPRL@test.com",
+ "label": "Medway County Court and Family Court - 47-67 High Street Chatham Kent - ME4 4DW"
+ },
+ {
+ "code": "366796:newcastle.c100applications@test.com",
+ "label": "Newcastle Civil & Family Courts and Tribunals Centre - Barras Bridge, Newcastle-Upon-Tyne - NE99 1NA"
+ },
+ {
+ "code": "471569:family.peterborough.countycourt@test.com",
+ "label": "Peterborough Combined Court Centre - Crown Buildings, Rivergate - PE1 1EJ"
+ },
+ {
+ "code": "846055:",
+ "label": "Port Talbot Justice Centre - Harbourside Road - SA13 1SB"
+ },
+ {
+ "code": "43104:family.southampton.countycourt@test.com",
+ "label": "Southampton Combined Court Centre - The Courts of Justice, London Road - SO15 2XQ"
+ },
+ {
+ "code": "234946:",
+ "label": "Swansea Civil Justice Centre - Quay West, Quay Parade - SA1 1SP"
+ }
+ ]
+ },
+ "hearingAuthority": null,
+ "hearingJudgePersonalCode": null,
+ "hearingJudgeLastName": null,
+ "hearingJudgeEmailAddress": null,
+ "hearingListedLinkedCases": {
+ "value": null,
+ "list_items": []
+ },
+ "confirmedHearingDates": {
+ "value": {
+ "code": null,
+ "label": null
+ },
+ "list_items": []
+ },
+ "customDetails": null,
+ "instructionsForRemoteHearing": null,
+ "additionalHearingDetails": null,
+ "additionalDetailsForHearingDateOptions": "Some perf test details",
+ "hearingVideoChannels": null,
+ "hearingTelephoneChannels": null,
+ "hearingChannels": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "applicantName": "#{ApplicantFirstName} #{ApplicantLastName}",
+ "applicantSolicitor": "Solfirst,Sollast",
+ "respondentName": "#{RespondentFirstName} #{RespondentLastName}",
+ "respondentSolicitor": "null,null",
+ "applicantName1": null,
+ "applicantName2": null,
+ "applicantName3": null,
+ "applicantName4": null,
+ "applicantName5": null,
+ "applicantSolicitor1": null,
+ "respondentName1": null,
+ "respondentSolicitor1": null,
+ "applicantSolicitor2": null,
+ "respondentName2": null,
+ "respondentSolicitor2": null,
+ "applicantSolicitor3": null,
+ "respondentName3": null,
+ "respondentSolicitor3": null,
+ "applicantSolicitor4": null,
+ "respondentName4": null,
+ "respondentSolicitor4": null,
+ "applicantSolicitor5": null,
+ "respondentName5": null,
+ "respondentSolicitor5": null,
+ "isCafcassCymru": "Yes",
+ "hearingdataFromHearingTab": []
+ },
+ "id": "#{hearingId}"
+ }
+ ],
+ "isApplicant1Present": "No",
+ "isApplicant2Present": "No",
+ "isApplicant3Present": "No",
+ "isApplicant4Present": "No",
+ "isApplicant5Present": "No",
+ "isApplicant1SolicitorPresent": "No",
+ "isApplicant2SolicitorPresent": "No",
+ "isApplicant3SolicitorPresent": "No",
+ "isApplicant4SolicitorPresent": "No",
+ "isApplicant5SolicitorPresent": "No",
+ "isRespondent1Present": "No",
+ "isRespondent2Present": "No",
+ "isRespondent3Present": "No",
+ "isRespondent4Present": "No",
+ "isRespondent5Present": "No",
+ "isRespondent1SolicitorPresent": "No",
+ "isRespondent2SolicitorPresent": "No",
+ "isRespondent3SolicitorPresent": "No",
+ "isRespondent4SolicitorPresent": "No",
+ "isRespondent5SolicitorPresent": "No",
+ "previewOrderDoc": {
+ "document_url": "#{document_url}",
+ "document_binary_url": "#{document_url}/binary",
+ "document_filename": "#{document_filename}",
+ "document_hash": "#{document_hash}"
+ },
+ "amendOrderSelectCheckOptions": "noCheck",
+ "selectTypeOfOrder": "interim",
+ "cafcassOrCymruNeedToProvideReport": "No",
+ "orderEndsInvolvementOfCafcassOrCymru": "No",
+ "doYouWantToServeOrder": "Yes",
+ "serveOrderDynamicList": {
+ "value": [
+ {
+ "code": "#{orderCode}",
+ "label": "#{orderLabel}"
+ }
+ ],
+ "list_items": [
+ {
+ "code": "#{orderCode}",
+ "label": "#{orderLabel}"
+ }
+ ]
+ },
+ "serveOrderAdditionalDocuments": [],
+ "ordersNeedToBeServed": "Yes",
+ "isOnlyC47aOrderSelectedToServe": "No",
+ "displayLegalRepOption": "Yes",
+ "servingRespondentsOptionsDA": "courtAdmin",
+ "serveOtherPartiesDA": []
+ },
+ "event": {
+ "id": "manageOrders",
+ "summary": "",
+ "description": ""
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLOrderToServeListFL401.json b/src/gatling/resources/bodies/prl/fl401/PRLOrderToServeListFL401.json
new file mode 100644
index 00000000..90384ec8
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLOrderToServeListFL401.json
@@ -0,0 +1,602 @@
+{
+ "data": {
+ "serveOrderDynamicList": {
+ "value": [
+ {
+ "code": "#{orderCode}",
+ "label": "#{orderLabel}"
+ }
+ ],
+ "list_items": [
+ {
+ "code": "#{orderCode}",
+ "label": "#{orderLabel}"
+ }
+ ]
+ },
+ "serveOrderAdditionalDocuments": [],
+ "isOnlyC47aOrderSelectedToServe": null
+ },
+ "event": {
+ "id": "manageOrders",
+ "summary": "",
+ "description": ""
+ },
+ "event_data": {
+ "manageOrderHeader1": null,
+ "manageOrdersOptions": "createAnOrder",
+ "isSdoSelected": "No",
+ "sdoPreamblesTempList": null,
+ "sdoCafcassOrCymruTempList": null,
+ "sdoLocalAuthorityTempList": null,
+ "sdoCourtTempList": null,
+ "sdoDocumentationAndEvidenceTempList": null,
+ "sdoOtherTempList": null,
+ "sdoHearingsAndNextStepsTempList": null,
+ "listElementsSetToDefaultValue": null,
+ "createSelectOrderOptions": "blank",
+ "selectedOrder": "Blank order (FL404B)\n\n<\/span>",
+ "daOrderForCaCase": "No",
+ "typeOfC21Order": "",
+ "isTheOrderByConsent": "Yes",
+ "wasTheOrderApprovedAtHearing": "No",
+ "judgeOrMagistrateTitle": "districtJudge",
+ "judgeOrMagistratesLastName": "#{JudgeLastName}",
+ "justiceLegalAdviserFullName": "#{LegalAdviserName}",
+ "dateOrderMade": "#{todayDate}",
+ "isTheOrderAboutChildren": "No",
+ "recitalsOrPreamble": "Some details",
+ "orderDirections": "Some directions",
+ "fl404CustomFields": {
+ "fl404bHearingOutcome": "The hearing was perf tested",
+ "fl404bCourtName1": null,
+ "fl404bTimeEstimate": null,
+ "fl404bDateOfNextHearing": null,
+ "fl404bTimeOfNextHearing": null,
+ "fl404bDateAndTimeOfNextHearing": "",
+ "fl404bRespondentNotToThreat": [],
+ "fl404bRespondentNotIntimidate": [],
+ "fl404bRespondentNotToTelephone": [],
+ "fl404bRespondentNotToDamageOrThreat": [],
+ "fl404bRespondentNotToDamage": [],
+ "fl404bRespondentNotToEnterProperty": [],
+ "fl404bRespondentNotToThreatChild": [],
+ "fl404bRespondentNotHarassOrIntimidate": [],
+ "fl404bRespondentNotToTelephoneChild": [],
+ "fl404bRespondentNotToEnterSchool": [],
+ "fl404bApplicantIsEntitledToOccupy": [],
+ "fl404bApplicantHasHomeRight": [],
+ "fl404bApplicantHasRightToEnter": [],
+ "fl404bApplicantHasOtherInstruction": [],
+ "fl404bApplicantAllowedToOccupy": [],
+ "fl404bRespondentMustNotOccupyAddress": [],
+ "fl404bRespondentShallLeaveAddress": [],
+ "fl404bRespondentMustNotEnterAddress": [],
+ "fl404bRespondentObstructOrHarass": [],
+ "fl404bRespondentOtherInstructions": [],
+ "addDirections": [],
+ "fl404bRespondentAddress": {
+ "AddressLine1": null,
+ "AddressLine2": null,
+ "AddressLine3": null,
+ "PostTown": null,
+ "County": null,
+ "PostCode": null,
+ "Country": null
+ },
+ "fl404bOtherCourtAddress": {
+ "AddressLine1": null,
+ "AddressLine2": null,
+ "AddressLine3": null,
+ "PostTown": null,
+ "County": null,
+ "PostCode": null,
+ "Country": null
+ }
+ },
+ "isCafcassCymru": "Yes",
+ "isFL401ApplicantPresent": "Yes",
+ "isFL401ApplicantSolicitorPresent": "Yes",
+ "isFL401RespondentPresent": "Yes",
+ "isFL401RespondentSolicitorPresent": "No",
+ "ordersHearingDetails": [
+ {
+ "value": {
+ "hearingTypes": {
+ "value": {
+ "code": "ABA5-APL",
+ "label": "Appeal"
+ },
+ "list_items": [
+ {
+ "code": "ABA5-2GA",
+ "label": "2nd Gatekeeping Appointment"
+ },
+ {
+ "code": "ABA5-ALL",
+ "label": "Allocation"
+ },
+ {
+ "code": "ABA5-APL",
+ "label": "Appeal"
+ },
+ {
+ "code": "ABA5-APP",
+ "label": "Application"
+ },
+ {
+ "code": "ABA5-BRE",
+ "label": "Breach"
+ },
+ {
+ "code": "ABA5-CMC",
+ "label": "Case Management Conference"
+ },
+ {
+ "code": "ABA5-CMH",
+ "label": "Case Management Hearing"
+ },
+ {
+ "code": "ABA5-COM",
+ "label": "Committal"
+ },
+ {
+ "code": "ABA5-CON",
+ "label": "Conciliation"
+ },
+ {
+ "code": "ABA5-COS",
+ "label": "Costs"
+ },
+ {
+ "code": "ABA5-DIR",
+ "label": "Directions (First/Further)"
+ },
+ {
+ "code": "ABA5-DRA",
+ "label": "Dispute Resolution Appointment"
+ },
+ {
+ "code": "ABA5-FCM",
+ "label": "Further Case Management Hearing"
+ },
+ {
+ "code": "ABA5-FFH",
+ "label": "Full/Final hearing"
+ },
+ {
+ "code": "ABA5-FHD",
+ "label": "First Hearing Dispute Resolution Appointment (FHDRA)"
+ },
+ {
+ "code": "ABA5-FHR",
+ "label": "First Hearing"
+ },
+ {
+ "code": "ABA5-FOF",
+ "label": "Finding of Fact"
+ },
+ {
+ "code": "ABA5-GRH",
+ "label": "Ground Rules Hearing"
+ },
+ {
+ "code": "ABA5-HRA",
+ "label": "Human Rights Act Application"
+ },
+ {
+ "code": "ABA5-JMT",
+ "label": "Judgment"
+ },
+ {
+ "code": "ABA5-NEH",
+ "label": "Neutral Evaluation Hearing"
+ },
+ {
+ "code": "ABA5-PER",
+ "label": "Permission Hearing"
+ },
+ {
+ "code": "ABA5-PHR",
+ "label": "Pre Hearing Review"
+ },
+ {
+ "code": "ABA5-REV",
+ "label": "Review"
+ },
+ {
+ "code": "ABA5-SCF",
+ "label": "Settlement Conference"
+ },
+ {
+ "code": "ABA5-SGA",
+ "label": "Safeguarding Gatekeeping Appointment"
+ }
+ ]
+ },
+ "hearingDateConfirmOptionEnum": "dateConfirmedByListingTeam",
+ "isRenderingRequiredFlag": null,
+ "applicantHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "applicantSolicitorHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "respondentHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "respondentSolicitorHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "applicantHearingChannel1": null,
+ "applicantSolicitorHearingChannel1": null,
+ "applicantHearingChannel2": null,
+ "applicantSolicitorHearingChannel2": null,
+ "applicantHearingChannel3": null,
+ "applicantSolicitorHearingChannel3": null,
+ "applicantHearingChannel4": null,
+ "applicantSolicitorHearingChannel4": null,
+ "applicantHearingChannel5": null,
+ "applicantSolicitorHearingChannel5": null,
+ "respondentHearingChannel1": null,
+ "respondentSolicitorHearingChannel1": null,
+ "respondentHearingChannel2": null,
+ "respondentSolicitorHearingChannel2": null,
+ "respondentHearingChannel3": null,
+ "respondentSolicitorHearingChannel3": null,
+ "respondentHearingChannel4": null,
+ "respondentSolicitorHearingChannel4": null,
+ "respondentHearingChannel5": null,
+ "respondentSolicitorHearingChannel5": null,
+ "cafcassHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "cafcassCymruHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "localAuthorityHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "courtList": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "827534:",
+ "label": "Aberystwyth Justice Centre - Trefechan - SY23 1AS"
+ },
+ {
+ "code": "101959:",
+ "label": "Carmarthen County Court and Tribunal Hearing Centre - Hill House, Picton Terrace, Carmarthen - SA31 3BT"
+ },
+ {
+ "code": "816875:family.chelmsford.countycourt@test.com",
+ "label": "Chelmsford County and Family Court - Priory Place - CM2 0PP"
+ },
+ {
+ "code": "497679:Coventryprivatelawapplications@test.com",
+ "label": "Coventry Combined Court Centre - Much Park Street, Coventry - CV1 2SN"
+ },
+ {
+ "code": "898213:eastlondonfamilypr@test.com",
+ "label": "East London Family Court - Westferry Circus (Westferry House), Part Ground, 6th And 7th Floors, 11 Westferry Circus, Canary Wharf, London, E14 4HE - E14 4HD"
+ },
+ {
+ "code": "735217:family.exeter.countycourt@test.com",
+ "label": "Exeter Combined Court Centre - Southernhay Gardens, Exeter - EX1 1UH"
+ },
+ {
+ "code": "198592:family.gloucester.countycourt@test.com",
+ "label": "Gloucestershire Family and Civil Court - Kimbrose Way, Gloucester Docks - GL1 2DE"
+ },
+ {
+ "code": "700596:",
+ "label": "Haverfordwest County and Family - Penffynnon, Hawthorn Rise - SA61 2AZ"
+ },
+ {
+ "code": "195520:hull.private.filing@test.com",
+ "label": "Kingston-upon-Hull Combined Court Centre - The Combined Court Centre - HU1 2EZ"
+ },
+ {
+ "code": "195465:PLP.LINCOLN@test.com",
+ "label": "Lincoln County Court and Family Court - High Street - LN5 7PS"
+ },
+ {
+ "code": "390932:",
+ "label": "Llanelli Law Courts - Town Hall Square, Llanelli - SA15 3AW"
+ },
+ {
+ "code": "487294:KentPRL@test.com",
+ "label": "Medway County Court and Family Court - 47-67 High Street Chatham Kent - ME4 4DW"
+ },
+ {
+ "code": "366796:newcastle.c100applications@test.com",
+ "label": "Newcastle Civil & Family Courts and Tribunals Centre - Barras Bridge, Newcastle-Upon-Tyne - NE99 1NA"
+ },
+ {
+ "code": "471569:family.peterborough.countycourt@test.com",
+ "label": "Peterborough Combined Court Centre - Crown Buildings, Rivergate - PE1 1EJ"
+ },
+ {
+ "code": "846055:",
+ "label": "Port Talbot Justice Centre - Harbourside Road - SA13 1SB"
+ },
+ {
+ "code": "43104:family.southampton.countycourt@test.com",
+ "label": "Southampton Combined Court Centre - The Courts of Justice, London Road - SO15 2XQ"
+ },
+ {
+ "code": "234946:",
+ "label": "Swansea Civil Justice Centre - Quay West, Quay Parade - SA1 1SP"
+ }
+ ]
+ },
+ "hearingAuthority": null,
+ "hearingListedLinkedCases": {
+ "value": null,
+ "list_items": []
+ },
+ "additionalDetailsForHearingDateOptions": "Some perf test details",
+ "hearingVideoChannels": null,
+ "hearingTelephoneChannels": null,
+ "hearingChannels": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "applicantName": "#{ApplicantFirstName} #{ApplicantLastName}",
+ "applicantSolicitor": "Solfirst,Sollast",
+ "respondentName": "#{RespondentFirstName} #{RespondentLastName}",
+ "respondentSolicitor": "null,null",
+ "applicantName1": null,
+ "applicantName2": null,
+ "applicantName3": null,
+ "applicantName4": null,
+ "applicantName5": null,
+ "applicantSolicitor1": null,
+ "respondentName1": null,
+ "respondentSolicitor1": null,
+ "applicantSolicitor2": null,
+ "respondentName2": null,
+ "respondentSolicitor2": null,
+ "applicantSolicitor3": null,
+ "respondentName3": null,
+ "respondentSolicitor3": null,
+ "applicantSolicitor4": null,
+ "respondentName4": null,
+ "respondentSolicitor4": null,
+ "applicantSolicitor5": null,
+ "respondentName5": null,
+ "respondentSolicitor5": null,
+ "isCafcassCymru": "Yes",
+ "hearingdataFromHearingTab": []
+ },
+ "id": "#{hearingId}"
+ }
+ ],
+ "isApplicant1Present": "No",
+ "isApplicant2Present": "No",
+ "isApplicant3Present": "No",
+ "isApplicant4Present": "No",
+ "isApplicant5Present": "No",
+ "isApplicant1SolicitorPresent": "No",
+ "isApplicant2SolicitorPresent": "No",
+ "isApplicant3SolicitorPresent": "No",
+ "isApplicant4SolicitorPresent": "No",
+ "isApplicant5SolicitorPresent": "No",
+ "isRespondent1Present": "No",
+ "isRespondent2Present": "No",
+ "isRespondent3Present": "No",
+ "isRespondent4Present": "No",
+ "isRespondent5Present": "No",
+ "isRespondent1SolicitorPresent": "No",
+ "isRespondent2SolicitorPresent": "No",
+ "isRespondent3SolicitorPresent": "No",
+ "isRespondent4SolicitorPresent": "No",
+ "isRespondent5SolicitorPresent": "No",
+ "previewOrderDocWelsh": null,
+ "previewOrderDoc": {
+ "document_url": "#{document_url}",
+ "document_binary_url": "#{document_url}/binary",
+ "document_filename": "#{document_filename}",
+ "document_hash": "#{document_hash}"
+ },
+ "amendOrderSelectCheckOptions": "noCheck",
+ "selectTypeOfOrder": "interim",
+ "cafcassOrCymruNeedToProvideReport": "No",
+ "orderEndsInvolvementOfCafcassOrCymru": "No",
+ "doYouWantToServeOrder": "Yes",
+ "serveOrderDynamicList": {
+ "value": [
+ {
+ "code": "#{orderCode}",
+ "label": "#{orderLabel}"
+ }
+ ],
+ "list_items": [
+ {
+ "code": "#{orderCode}",
+ "label": "#{orderLabel}"
+ }
+ ]
+ },
+ "serveOrderAdditionalDocuments": [],
+ "isOnlyC47aOrderSelectedToServe": null
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false,
+ "case_reference": "#{caseId}"
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLOrderToServeRespondentOptionsFL401.json b/src/gatling/resources/bodies/prl/fl401/PRLOrderToServeRespondentOptionsFL401.json
new file mode 100644
index 00000000..919d050f
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLOrderToServeRespondentOptionsFL401.json
@@ -0,0 +1,590 @@
+{
+ "data": {
+ "servingRespondentsOptionsDA": "courtAdmin",
+ "serveOtherPartiesDA": []
+ },
+ "event": {
+ "id": "manageOrders",
+ "summary": "",
+ "description": ""
+ },
+ "event_data": {
+ "manageOrderHeader1": null,
+ "manageOrdersOptions": "createAnOrder",
+ "isSdoSelected": "No",
+ "sdoPreamblesTempList": null,
+ "sdoCafcassOrCymruTempList": null,
+ "sdoLocalAuthorityTempList": null,
+ "sdoCourtTempList": null,
+ "sdoDocumentationAndEvidenceTempList": null,
+ "sdoOtherTempList": null,
+ "sdoHearingsAndNextStepsTempList": null,
+ "listElementsSetToDefaultValue": null,
+ "createSelectOrderOptions": "blank",
+ "selectedOrder": "Blank order (FL404B)\n\n<\/span>",
+ "daOrderForCaCase": "No",
+ "typeOfC21Order": "",
+ "isTheOrderByConsent": "Yes",
+ "wasTheOrderApprovedAtHearing": "No",
+ "judgeOrMagistrateTitle": "districtJudge",
+ "judgeOrMagistratesLastName": "#{JudgeLastName}",
+ "justiceLegalAdviserFullName": "#{LegalAdviserName}",
+ "dateOrderMade": "#{todayDate}",
+ "isTheOrderAboutChildren": "No",
+ "recitalsOrPreamble": "Some details",
+ "orderDirections": "Some directions",
+ "fl404CustomFields": {
+ "fl404bHearingOutcome": "The hearing was perf tested",
+ "fl404bCourtName1": null,
+ "fl404bTimeEstimate": null,
+ "fl404bDateOfNextHearing": null,
+ "fl404bTimeOfNextHearing": null,
+ "fl404bDateAndTimeOfNextHearing": "",
+ "fl404bRespondentNotToThreat": [],
+ "fl404bRespondentNotIntimidate": [],
+ "fl404bRespondentNotToTelephone": [],
+ "fl404bRespondentNotToDamageOrThreat": [],
+ "fl404bRespondentNotToDamage": [],
+ "fl404bRespondentNotToEnterProperty": [],
+ "fl404bRespondentNotToThreatChild": [],
+ "fl404bRespondentNotHarassOrIntimidate": [],
+ "fl404bRespondentNotToTelephoneChild": [],
+ "fl404bRespondentNotToEnterSchool": [],
+ "fl404bApplicantIsEntitledToOccupy": [],
+ "fl404bApplicantHasHomeRight": [],
+ "fl404bApplicantHasRightToEnter": [],
+ "fl404bApplicantHasOtherInstruction": [],
+ "fl404bApplicantAllowedToOccupy": [],
+ "fl404bRespondentMustNotOccupyAddress": [],
+ "fl404bRespondentShallLeaveAddress": [],
+ "fl404bRespondentMustNotEnterAddress": [],
+ "fl404bRespondentObstructOrHarass": [],
+ "fl404bRespondentOtherInstructions": [],
+ "addDirections": [],
+ "fl404bRespondentAddress": {
+ "AddressLine1": null,
+ "AddressLine2": null,
+ "AddressLine3": null,
+ "PostTown": null,
+ "County": null,
+ "PostCode": null,
+ "Country": null
+ },
+ "fl404bOtherCourtAddress": {
+ "AddressLine1": null,
+ "AddressLine2": null,
+ "AddressLine3": null,
+ "PostTown": null,
+ "County": null,
+ "PostCode": null,
+ "Country": null
+ }
+ },
+ "isCafcassCymru": "Yes",
+ "isFL401ApplicantPresent": "Yes",
+ "isFL401ApplicantSolicitorPresent": "Yes",
+ "isFL401RespondentPresent": "Yes",
+ "isFL401RespondentSolicitorPresent": "No",
+ "ordersHearingDetails": [
+ {
+ "value": {
+ "hearingTypes": {
+ "value": {
+ "code": "ABA5-APL",
+ "label": "Appeal"
+ },
+ "list_items": [
+ {
+ "code": "ABA5-2GA",
+ "label": "2nd Gatekeeping Appointment"
+ },
+ {
+ "code": "ABA5-ALL",
+ "label": "Allocation"
+ },
+ {
+ "code": "ABA5-APL",
+ "label": "Appeal"
+ },
+ {
+ "code": "ABA5-APP",
+ "label": "Application"
+ },
+ {
+ "code": "ABA5-BRE",
+ "label": "Breach"
+ },
+ {
+ "code": "ABA5-CMC",
+ "label": "Case Management Conference"
+ },
+ {
+ "code": "ABA5-CMH",
+ "label": "Case Management Hearing"
+ },
+ {
+ "code": "ABA5-COM",
+ "label": "Committal"
+ },
+ {
+ "code": "ABA5-CON",
+ "label": "Conciliation"
+ },
+ {
+ "code": "ABA5-COS",
+ "label": "Costs"
+ },
+ {
+ "code": "ABA5-DIR",
+ "label": "Directions (First/Further)"
+ },
+ {
+ "code": "ABA5-DRA",
+ "label": "Dispute Resolution Appointment"
+ },
+ {
+ "code": "ABA5-FCM",
+ "label": "Further Case Management Hearing"
+ },
+ {
+ "code": "ABA5-FFH",
+ "label": "Full/Final hearing"
+ },
+ {
+ "code": "ABA5-FHD",
+ "label": "First Hearing Dispute Resolution Appointment (FHDRA)"
+ },
+ {
+ "code": "ABA5-FHR",
+ "label": "First Hearing"
+ },
+ {
+ "code": "ABA5-FOF",
+ "label": "Finding of Fact"
+ },
+ {
+ "code": "ABA5-GRH",
+ "label": "Ground Rules Hearing"
+ },
+ {
+ "code": "ABA5-HRA",
+ "label": "Human Rights Act Application"
+ },
+ {
+ "code": "ABA5-JMT",
+ "label": "Judgment"
+ },
+ {
+ "code": "ABA5-NEH",
+ "label": "Neutral Evaluation Hearing"
+ },
+ {
+ "code": "ABA5-PER",
+ "label": "Permission Hearing"
+ },
+ {
+ "code": "ABA5-PHR",
+ "label": "Pre Hearing Review"
+ },
+ {
+ "code": "ABA5-REV",
+ "label": "Review"
+ },
+ {
+ "code": "ABA5-SCF",
+ "label": "Settlement Conference"
+ },
+ {
+ "code": "ABA5-SGA",
+ "label": "Safeguarding Gatekeeping Appointment"
+ }
+ ]
+ },
+ "hearingDateConfirmOptionEnum": "dateConfirmedByListingTeam",
+ "isRenderingRequiredFlag": null,
+ "applicantHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "applicantSolicitorHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "respondentHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "respondentSolicitorHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "applicantHearingChannel1": null,
+ "applicantSolicitorHearingChannel1": null,
+ "applicantHearingChannel2": null,
+ "applicantSolicitorHearingChannel2": null,
+ "applicantHearingChannel3": null,
+ "applicantSolicitorHearingChannel3": null,
+ "applicantHearingChannel4": null,
+ "applicantSolicitorHearingChannel4": null,
+ "applicantHearingChannel5": null,
+ "applicantSolicitorHearingChannel5": null,
+ "respondentHearingChannel1": null,
+ "respondentSolicitorHearingChannel1": null,
+ "respondentHearingChannel2": null,
+ "respondentSolicitorHearingChannel2": null,
+ "respondentHearingChannel3": null,
+ "respondentSolicitorHearingChannel3": null,
+ "respondentHearingChannel4": null,
+ "respondentSolicitorHearingChannel4": null,
+ "respondentHearingChannel5": null,
+ "respondentSolicitorHearingChannel5": null,
+ "cafcassHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "cafcassCymruHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "localAuthorityHearingChannel": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "courtList": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "827534:",
+ "label": "Aberystwyth Justice Centre - Trefechan - SY23 1AS"
+ },
+ {
+ "code": "101959:",
+ "label": "Carmarthen County Court and Tribunal Hearing Centre - Hill House, Picton Terrace, Carmarthen - SA31 3BT"
+ },
+ {
+ "code": "816875:family.chelmsford.countycourt@test.com",
+ "label": "Chelmsford County and Family Court - Priory Place - CM2 0PP"
+ },
+ {
+ "code": "497679:Coventryprivatelawapplications@test.com",
+ "label": "Coventry Combined Court Centre - Much Park Street, Coventry - CV1 2SN"
+ },
+ {
+ "code": "898213:eastlondonfamilypr@test.com",
+ "label": "East London Family Court - Westferry Circus (Westferry House), Part Ground, 6th And 7th Floors, 11 Westferry Circus, Canary Wharf, London, E14 4HE - E14 4HD"
+ },
+ {
+ "code": "735217:family.exeter.countycourt@test.com",
+ "label": "Exeter Combined Court Centre - Southernhay Gardens, Exeter - EX1 1UH"
+ },
+ {
+ "code": "198592:family.gloucester.countycourt@test.com",
+ "label": "Gloucestershire Family and Civil Court - Kimbrose Way, Gloucester Docks - GL1 2DE"
+ },
+ {
+ "code": "700596:",
+ "label": "Haverfordwest County and Family - Penffynnon, Hawthorn Rise - SA61 2AZ"
+ },
+ {
+ "code": "195520:hull.private.filing@test.com",
+ "label": "Kingston-upon-Hull Combined Court Centre - The Combined Court Centre - HU1 2EZ"
+ },
+ {
+ "code": "195465:PLP.LINCOLN@test.com",
+ "label": "Lincoln County Court and Family Court - High Street - LN5 7PS"
+ },
+ {
+ "code": "390932:",
+ "label": "Llanelli Law Courts - Town Hall Square, Llanelli - SA15 3AW"
+ },
+ {
+ "code": "487294:KentPRL@test.com",
+ "label": "Medway County Court and Family Court - 47-67 High Street Chatham Kent - ME4 4DW"
+ },
+ {
+ "code": "366796:newcastle.c100applications@test.com",
+ "label": "Newcastle Civil & Family Courts and Tribunals Centre - Barras Bridge, Newcastle-Upon-Tyne - NE99 1NA"
+ },
+ {
+ "code": "471569:family.peterborough.countycourt@test.com",
+ "label": "Peterborough Combined Court Centre - Crown Buildings, Rivergate - PE1 1EJ"
+ },
+ {
+ "code": "846055:",
+ "label": "Port Talbot Justice Centre - Harbourside Road - SA13 1SB"
+ },
+ {
+ "code": "43104:family.southampton.countycourt@test.com",
+ "label": "Southampton Combined Court Centre - The Courts of Justice, London Road - SO15 2XQ"
+ },
+ {
+ "code": "234946:",
+ "label": "Swansea Civil Justice Centre - Quay West, Quay Parade - SA1 1SP"
+ }
+ ]
+ },
+ "hearingAuthority": null,
+ "hearingListedLinkedCases": {
+ "value": null,
+ "list_items": []
+ },
+ "additionalDetailsForHearingDateOptions": "Some perf test details",
+ "hearingVideoChannels": null,
+ "hearingTelephoneChannels": null,
+ "hearingChannels": {
+ "value": null,
+ "list_items": [
+ {
+ "code": "INTER",
+ "label": "In Person"
+ },
+ {
+ "code": "NA",
+ "label": "Not in Attendance"
+ },
+ {
+ "code": "ONPPRS",
+ "label": "On the Papers"
+ },
+ {
+ "code": "TEL",
+ "label": "Telephone"
+ },
+ {
+ "code": "VID",
+ "label": "Video"
+ }
+ ]
+ },
+ "applicantName": "#{ApplicantFirstName} #{ApplicantLastName}",
+ "applicantSolicitor": "Solfirst,Sollast",
+ "respondentName": "#{RespondentFirstName} #{RespondentLastName}",
+ "respondentSolicitor": "null,null",
+ "applicantName1": null,
+ "applicantName2": null,
+ "applicantName3": null,
+ "applicantName4": null,
+ "applicantName5": null,
+ "applicantSolicitor1": null,
+ "respondentName1": null,
+ "respondentSolicitor1": null,
+ "applicantSolicitor2": null,
+ "respondentName2": null,
+ "respondentSolicitor2": null,
+ "applicantSolicitor3": null,
+ "respondentName3": null,
+ "respondentSolicitor3": null,
+ "applicantSolicitor4": null,
+ "respondentName4": null,
+ "respondentSolicitor4": null,
+ "applicantSolicitor5": null,
+ "respondentName5": null,
+ "respondentSolicitor5": null,
+ "isCafcassCymru": "Yes",
+ "hearingdataFromHearingTab": []
+ },
+ "id": "#{hearingId}"
+ }
+ ],
+ "isApplicant1Present": "No",
+ "isApplicant2Present": "No",
+ "isApplicant3Present": "No",
+ "isApplicant4Present": "No",
+ "isApplicant5Present": "No",
+ "isApplicant1SolicitorPresent": "No",
+ "isApplicant2SolicitorPresent": "No",
+ "isApplicant3SolicitorPresent": "No",
+ "isApplicant4SolicitorPresent": "No",
+ "isApplicant5SolicitorPresent": "No",
+ "isRespondent1Present": "No",
+ "isRespondent2Present": "No",
+ "isRespondent3Present": "No",
+ "isRespondent4Present": "No",
+ "isRespondent5Present": "No",
+ "isRespondent1SolicitorPresent": "No",
+ "isRespondent2SolicitorPresent": "No",
+ "isRespondent3SolicitorPresent": "No",
+ "isRespondent4SolicitorPresent": "No",
+ "isRespondent5SolicitorPresent": "No",
+ "previewOrderDocWelsh": null,
+ "previewOrderDoc": {
+ "document_url": "#{document_url}",
+ "document_binary_url": "#{document_url}/binary",
+ "document_filename": "#{document_filename}",
+ "document_hash": "#{document_hash}"
+ },
+ "amendOrderSelectCheckOptions": "noCheck",
+ "selectTypeOfOrder": "interim",
+ "cafcassOrCymruNeedToProvideReport": "No",
+ "orderEndsInvolvementOfCafcassOrCymru": "No",
+ "doYouWantToServeOrder": "Yes",
+ "serveOrderDynamicList": {
+ "value": [
+ {
+ "code": "#{orderCode}",
+ "label": "#{orderLabel}"
+ }
+ ],
+ "list_items": [
+ {
+ "code": "#{orderCode}",
+ "label": "#{orderLabel}"
+ }
+ ]
+ },
+ "serveOrderAdditionalDocuments": [],
+ "isOnlyC47aOrderSelectedToServe": "No",
+ "servingRespondentsOptionsDA": "courtAdmin",
+ "serveOtherPartiesDA": []
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false,
+ "case_reference": "#{caseId}"
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLRemoveBarrister.json b/src/gatling/resources/bodies/prl/fl401/PRLRemoveBarrister.json
new file mode 100644
index 00000000..10309bf8
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLRemoveBarrister.json
@@ -0,0 +1,56 @@
+{
+ "data": {
+ "allocatedBarrister": {
+ "partyList": {
+ "value": {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ },
+ "list_items": [
+ {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ }
+ ]
+ },
+ "barristerFirstName": null,
+ "barristerLastName": null,
+ "barristerEmail": null,
+ "barristerOrg": {
+ "OrganisationID": null,
+ "OrganisationName": null
+ }
+ }
+ },
+ "event": {
+ "id": "adminRemoveBarrister",
+ "summary": "",
+ "description": ""
+ },
+ "event_data": {
+ "allocatedBarrister": {
+ "partyList": {
+ "value": {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ },
+ "list_items": [
+ {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ }
+ ]
+ },
+ "barristerFirstName": null,
+ "barristerLastName": null,
+ "barristerEmail": null,
+ "barristerOrg": {
+ "OrganisationID": null,
+ "OrganisationName": null
+ }
+ }
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false,
+ "case_reference": "#{caseId}"
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLRemoveBarristerEvent.json b/src/gatling/resources/bodies/prl/fl401/PRLRemoveBarristerEvent.json
new file mode 100644
index 00000000..6822f423
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLRemoveBarristerEvent.json
@@ -0,0 +1,32 @@
+{
+ "data": {
+ "allocatedBarrister": {
+ "partyList": {
+ "value": {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ },
+ "list_items": [
+ {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ }
+ ]
+ },
+ "barristerFirstName": null,
+ "barristerLastName": null,
+ "barristerEmail": null,
+ "barristerOrg": {
+ "OrganisationID": null,
+ "OrganisationName": null
+ }
+ }
+ },
+ "event": {
+ "id": "adminRemoveBarrister",
+ "summary": "",
+ "description": ""
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLSelectOrderFL401.json b/src/gatling/resources/bodies/prl/fl401/PRLSelectOrderFL401.json
new file mode 100644
index 00000000..9e8c0b7b
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLSelectOrderFL401.json
@@ -0,0 +1,29 @@
+{
+ "data": {
+ "createSelectOrderOptions": "blank",
+ "selectedOrder": null
+ },
+ "event": {
+ "id": "manageOrders",
+ "summary": "",
+ "description": ""
+ },
+ "event_data": {
+ "manageOrderHeader1": null,
+ "manageOrdersOptions": "createAnOrder",
+ "isSdoSelected": "No",
+ "sdoPreamblesTempList": null,
+ "sdoCafcassOrCymruTempList": null,
+ "sdoLocalAuthorityTempList": null,
+ "sdoCourtTempList": null,
+ "sdoDocumentationAndEvidenceTempList": null,
+ "sdoOtherTempList": null,
+ "sdoHearingsAndNextStepsTempList": null,
+ "listElementsSetToDefaultValue": null,
+ "createSelectOrderOptions": "blank",
+ "selectedOrder": null
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false,
+ "case_reference": "#{caseId}"
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLServiceOfApplicationDetails.json b/src/gatling/resources/bodies/prl/fl401/PRLServiceOfApplicationDetails.json
new file mode 100644
index 00000000..2301601f
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLServiceOfApplicationDetails.json
@@ -0,0 +1,62 @@
+{
+ "data": {
+ "isConfidential": "Yes",
+ "serviceOfApplicationHeader": null,
+ "serviceOfApplicationScreen1": {
+ "value": [
+ {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ }
+ ],
+ "list_items": [
+ {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ }
+ ]
+ },
+ "noticeOfSafetySupportLetter": {
+ "document_url": "#{document_url}",
+ "document_binary_url": "#{document_url}/binary",
+ "document_filename": "120KB.pdf"
+ },
+ "additionalDocumentsList": [],
+ "soaIsOrderListEmpty": "No",
+ "missingAddressWarningText": ""
+ },
+ "event": {
+ "id": "serviceOfApplication",
+ "summary": "",
+ "description": ""
+ },
+ "event_data": {
+ "isConfidential": "Yes",
+ "serviceOfApplicationHeader": null,
+ "serviceOfApplicationScreen1": {
+ "value": [
+ {
+ "code":"#{appCodeOrder1}",
+ "label":"#{appLabelOrder1}"
+ }
+ ],
+ "list_items": [
+ {
+ "code":"#{appCodeOrder1}",
+ "label":"#{appLabelOrder1}"
+ }
+ ]
+ },
+ "noticeOfSafetySupportLetter": {
+ "document_url": "#{document_url}",
+ "document_binary_url": "#{document_url}/binary",
+ "document_filename": "120KB.pdf"
+ },
+ "additionalDocumentsList": [],
+ "soaIsOrderListEmpty": "No",
+ "missingAddressWarningText": ""
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false,
+ "case_reference": "#{caseId}"
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLServiceOfApplicationDetailsSubmit.json b/src/gatling/resources/bodies/prl/fl401/PRLServiceOfApplicationDetailsSubmit.json
new file mode 100644
index 00000000..f51eb561
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLServiceOfApplicationDetailsSubmit.json
@@ -0,0 +1,76 @@
+{
+ "data": {
+ "soaServeToRespondentOptions": "No",
+ "soaRecipientsOptions": {
+ "value": [
+ {
+ "code":"#{appCode2}",
+ "label":"#{appLabel2}"
+ }
+ ],
+ "list_items": [
+ {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ },
+ {
+ "code":"#{appCode2}",
+ "label":"#{appLabel2}"
+ }
+ ]
+ }
+ },
+ "event": {
+ "id": "serviceOfApplication",
+ "summary": "",
+ "description": ""
+ },
+ "event_data": {
+ "isConfidential": "Yes",
+ "serviceOfApplicationHeader": null,
+ "serviceOfApplicationScreen1": {
+ "value": [
+ {
+ "code":"#{appCodeOrder1}",
+ "label":"#{appLabelOrder1}"
+ }
+ ],
+ "list_items": [
+ {
+ "code":"#{appCodeOrder1}",
+ "label":"#{appLabelOrder1}"
+ }
+ ]
+ },
+ "noticeOfSafetySupportLetter": {
+ "document_url": "#{document_url}",
+ "document_binary_url": "#{document_url}/binary",
+ "document_filename": "120KB.pdf"
+ },
+ "additionalDocumentsList": [],
+ "soaIsOrderListEmpty": "No",
+ "missingAddressWarningText": "",
+ "soaServeToRespondentOptions": "No",
+ "soaRecipientsOptions": {
+ "value": [
+ {
+ "code":"#{appCode2}",
+ "label":"#{appLabel2}"
+ }
+ ],
+ "list_items": [
+ {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ },
+ {
+ "code":"#{appCode2}",
+ "label":"#{appLabel2}"
+ }
+ ]
+ }
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false,
+ "case_reference": "#{caseId}"
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLServiceOfApplicationEvent.json b/src/gatling/resources/bodies/prl/fl401/PRLServiceOfApplicationEvent.json
new file mode 100644
index 00000000..1cf71db3
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLServiceOfApplicationEvent.json
@@ -0,0 +1,62 @@
+{
+ "data": {
+ "isConfidential": "Yes",
+ "serviceOfApplicationHeader": null,
+ "sentDocumentPlaceHolder": "\n\n\n\n\n\nDocuments served in the pack\n\n
\n\n
\n\n\n\nCertain documents will be automatically included in the pack that is sent out on parties (the people in the case).\n\nThis includes:\n\n
- an application form (FL401)
- witness statement
- privacy notice
- cover letter (if not represented)
\n\nYou do not need to upload these documents yourself.\n\n
\n\n ",
+ "serviceOfApplicationScreen1": {
+ "value": [
+ {
+ "code":"#{appCodeOrder1}",
+ "label":"#{appLabelOrder1}"
+ }
+ ],
+ "list_items": [
+ {
+ "code":"#{appCodeOrder1}",
+ "label":"#{appLabelOrder1}"
+ }
+ ]
+ },
+ "noticeOfSafetySupportLetter": {
+ "document_url": "#{document_url}",
+ "document_binary_url": "#{document_url}/binary",
+ "document_filename": "120KB.pdf"
+ },
+ "additionalDocumentsList": [],
+ "caseTypeOfApplication": "FL401",
+ "soaIsOrderListEmpty": "No",
+ "missingAddressWarningText": "",
+ "displayLegalRepOption": "Yes",
+ "isC8CheckNeeded": null,
+ "responsibleForService": null,
+ "isOccupationOrderSelected": null,
+ "isApplicantRepresented": "Yes",
+ "productHearingBundleOn": null,
+ "soaServeToRespondentOptions": "No",
+ "soaRecipientsOptions": {
+ "value": [
+ {
+ "code":"#{appCode2}",
+ "label":"#{appLabel2}"
+ }
+ ],
+ "list_items": [
+ {
+ "code":"#{appCode1}",
+ "label":"#{appLabel1}"
+ },
+ {
+ "code":"#{appCode2}",
+ "label":"#{appLabel2}"
+ }
+ ]
+ }
+ },
+ "event": {
+ "id": "serviceOfApplication",
+ "summary": "",
+ "description": ""
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLSoADocumentsFL401.json b/src/gatling/resources/bodies/prl/fl401/PRLSoADocumentsFL401.json
new file mode 100644
index 00000000..f687c586
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLSoADocumentsFL401.json
@@ -0,0 +1,64 @@
+{
+ "data": {
+ "isConfidential": "Yes",
+ "serviceOfApplicationHeader": null,
+ "serviceOfApplicationScreen1": {
+ "value": [
+ {
+ "code": "#{serviceOfApplicationScreenCode}",
+ "label": "#{serviceOfApplicationScreenLabel}"
+ }
+ ],
+ "list_items": [
+ {
+ "code": "#{serviceOfApplicationScreenCode}",
+ "label": "#{serviceOfApplicationScreenLabel}"
+ }
+ ]
+ },
+ "noticeOfSafetySupportLetter": {
+ "document_url": "#{DocumentURLSoN}",
+ "document_binary_url": "#{DocumentURLSoN}/binary",
+ "document_filename": "120KB.pdf",
+ "document_hash": "#{documentHashSoN}"
+ },
+ "additionalDocumentsList": [],
+ "soaIsOrderListEmpty": "No",
+ "missingAddressWarningText": ""
+ },
+ "event": {
+ "id": "serviceOfApplication",
+ "summary": "",
+ "description": ""
+ },
+ "event_data": {
+ "isConfidential": "Yes",
+ "serviceOfApplicationHeader": null,
+ "serviceOfApplicationScreen1": {
+ "value": [
+ {
+ "code": "#{serviceOfApplicationScreenCode}",
+ "label": "#{serviceOfApplicationScreenLabel}"
+ }
+ ],
+ "list_items": [
+ {
+ "code": "#{serviceOfApplicationScreenCode}",
+ "label": "#{serviceOfApplicationScreenLabel}"
+ }
+ ]
+ },
+ "noticeOfSafetySupportLetter": {
+ "document_url": "#{DocumentURLSoN}",
+ "document_binary_url": "#{DocumentURLSoN}/binary",
+ "document_filename": "120KB.pdf",
+ "document_hash": "#{documentHashSoN}"
+ },
+ "additionalDocumentsList": [],
+ "soaIsOrderListEmpty": "No",
+ "missingAddressWarningText": ""
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false,
+ "case_reference": "#{caseId}"
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLSoARecipientsFL401.json b/src/gatling/resources/bodies/prl/fl401/PRLSoARecipientsFL401.json
new file mode 100644
index 00000000..d9dc7772
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLSoARecipientsFL401.json
@@ -0,0 +1,43 @@
+{
+ "data": {
+ "soaServeToRespondentOptions": "Yes",
+ "soaServingRespondentsOptionsDA": "courtAdmin"
+ },
+ "event": {
+ "id": "serviceOfApplication",
+ "summary": "",
+ "description": ""
+ },
+ "event_data": {
+ "isConfidential": "Yes",
+ "serviceOfApplicationHeader": null,
+ "serviceOfApplicationScreen1": {
+ "value": [
+ {
+ "code": "#{serviceOfApplicationScreenCode}",
+ "label": "#{serviceOfApplicationScreenLabel}"
+ }
+ ],
+ "list_items": [
+ {
+ "code": "#{serviceOfApplicationScreenCode}",
+ "label": "#{serviceOfApplicationScreenLabel}"
+ }
+ ]
+ },
+ "noticeOfSafetySupportLetter": {
+ "document_url": "#{DocumentURLSoN}",
+ "document_binary_url": "#{DocumentURLSoN}/binary",
+ "document_filename": "120KB.pdf",
+ "document_hash": "#{documentHashSoN}"
+ },
+ "additionalDocumentsList": [],
+ "soaIsOrderListEmpty": "No",
+ "missingAddressWarningText": "",
+ "soaServeToRespondentOptions": "Yes",
+ "soaServingRespondentsOptions": "courtAdmin"
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false,
+ "case_reference": "#{caseId}"
+}
\ No newline at end of file
diff --git a/src/gatling/resources/bodies/prl/fl401/PRLSoASubmitFL401.json b/src/gatling/resources/bodies/prl/fl401/PRLSoASubmitFL401.json
new file mode 100644
index 00000000..7491d9ed
--- /dev/null
+++ b/src/gatling/resources/bodies/prl/fl401/PRLSoASubmitFL401.json
@@ -0,0 +1,47 @@
+{
+ "data": {
+ "isConfidential": "Yes",
+ "serviceOfApplicationHeader": null,
+ "sentDocumentPlaceHolder": "\n\n\n\n\n\nDocuments served in the pack\n\n<\/h3>\n\n<\/summary>\n\n\n\nCertain documents will be automatically included in the pack that is sent out on parties (the people in the case).\n\nThis includes:\n\n
- an application form (FL401)<\/li>
- witness statement<\/li>
- privacy notice<\/li>
- cover letter (if not represented)<\/li><\/ul>\n\nYou do not need to upload these documents yourself.\n\n<\/div>\n\n<\/details>",
+ "serviceOfApplicationScreen1": {
+ "value": [
+ {
+ "code": "#{serviceOfApplicationScreenCode}",
+ "label": "#{serviceOfApplicationScreenLabel}"
+ }
+ ],
+ "list_items": [
+ {
+ "code": "#{serviceOfApplicationScreenCode}",
+ "label": "#{serviceOfApplicationScreenLabel}"
+ }
+ ]
+ },
+ "noticeOfSafetySupportLetter": {
+ "document_url": "#{DocumentURLSoN}",
+ "document_binary_url": "#{DocumentURLSoN}/binary",
+ "document_filename": "120KB.pdf",
+ "document_hash": "#{documentHashSoN}"
+
+ },
+ "additionalDocumentsList": [],
+ "caseTypeOfApplication": "FL401",
+ "soaIsOrderListEmpty": "No",
+ "missingAddressWarningText": "",
+ "displayLegalRepOption": "Yes",
+ "isC8CheckNeeded": null,
+ "responsibleForService": null,
+ "isOccupationOrderSelected": null,
+ "isApplicantRepresented": null,
+ "productHearingBundleOn": null,
+ "soaServeToRespondentOptions": "Yes",
+ "soaServingRespondentsOptions": "courtAdmin"
+ },
+ "event": {
+ "id": "serviceOfApplication",
+ "summary": "",
+ "description": ""
+ },
+ "event_token": "#{event_token}",
+ "ignore_warning": false
+}
\ No newline at end of file
diff --git a/src/gatling/simulations/scenarios/Barrister_PRL_C100.scala b/src/gatling/simulations/scenarios/Barrister_PRL_C100.scala
new file mode 100644
index 00000000..add9dc6e
--- /dev/null
+++ b/src/gatling/simulations/scenarios/Barrister_PRL_C100.scala
@@ -0,0 +1,179 @@
+package scenarios
+
+import io.gatling.core.Predef._
+import io.gatling.http.Predef._
+import utils.{Common, Environment, Headers}
+
+/*===============================================================================================================
+* Court Admin C100 case progression. Send to local court --> Send to Gatekeeper --> Add an order --> Serve
+================================================================================================================*/
+
+object Barrister_PRL_C100 {
+
+ val BaseURL = Environment.baseURL
+
+ val MinThinkTime = Environment.minThinkTime
+ val MaxThinkTime = Environment.maxThinkTime
+
+ exec(_.setAll(
+ "PRLRandomString" -> (Common.randomString(7)),
+ "PRLRandomPhone" -> (Common.randomNumber(8)),
+ "PRLAppDobDay" -> Common.getDay(),
+ "PRLAppDobMonth" -> Common.getMonth(),
+ "JudgeFirstName" -> (Common.randomString(4) + "judgefirst"),
+ "JudgeLastName" -> (Common.randomString(4) + "judgeLast"),
+ "todayDate" -> Common.getDate(),
+ "LegalAdviserName" -> (Common.randomString(4) + " " + Common.randomString(4) + "legAdv")))
+
+ val AddDocumentC100Applicant =
+
+ /*======================================================================================
+ * Run Manage Document task
+ ======================================================================================*/
+
+ group("XUI_PRL_C100progress_200_010_ApplicantAddDocument") {
+ exec(http("XUI_PRL_C100progress_200_010_ApplicantManageDocsPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/manageDocumentsNew/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_200_020_ApplicantManageDocs_EventTrigger") {
+ exec(http("XUI_PRL_C100progress_200_020_ApplicantManageDocs_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/manageDocumentsNew?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value[0].id").saveAs("id_value"))
+ .check(substring("Confirm the document is related to this case"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_200_030_ApplicantManageDocTask_Upload") {
+ exec(http("XUI_PRL_C100progress_200_030_ApplicantManageDocTask_Upload")
+ .post("/documents")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .bodyPart(RawFileBodyPart("files", "120KB.pdf")
+ .fileName("120KB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(jsonPath("$._embedded.documents[0]._links.self.href").saveAs("document_url"))
+ .check(substring("originalDocumentName"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_200_040_ApplicantManageDocTask_Validate") {
+ exec(http("XUI_PRL_C100progress_200_040_ApplicantManageDocTask_Validate")
+ .post("/data/case-types/PRLAPPS/validate?pageId=manageDocumentsNew1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLAddDocument.json"))
+ .check(substring("isCurrentAddressKnown"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_200_050_ApplicantManageDocTask_Event") {
+ exec(http("XUI_PRL_C100progress_200_050_ApplicantManageDocTask_Event")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLAddDocumentEvent.json"))
+ .check(substring("newAllegationsOfHarmDomesticAbuseYesNo"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val AddDocumentC100Respondent =
+
+ /*======================================================================================
+ * Run Manage Document task
+ ======================================================================================*/
+
+ group("XUI_PRL_C100progress_200_010_RespondentManageDocsPrivateLaw") {
+ exec(http("XUI_PRL_C100progress_200_010_RespondentManageDocsPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/manageDocumentsNew/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_200_020_RespondentManageDocs_EventTrigger") {
+ exec(http("XUI_PRL_C100progress_200_020_RespondentManageDocs_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/manageDocumentsNew?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value[0].id").saveAs("id_value"))
+ .check(substring("Confirm the document is related to this case"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_200_030_RespondentManageDocTask_Upload") {
+ exec(http("XUI_PRL_C100progress_200_030_RespondentManageDocTask_Upload")
+ .post("/documents")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .bodyPart(RawFileBodyPart("files", "120KB.pdf")
+ .fileName("120KB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(jsonPath("$._embedded.documents[0]._links.self.href").saveAs("document_url"))
+ .check(substring("originalDocumentName"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_200_040_RespondentManageDocTask_Validate") {
+ exec(http("XUI_PRL_C100progress_200_040_RespondentManageDocTask_Validate")
+ .post("/data/case-types/PRLAPPS/validate?pageId=manageDocumentsNew1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLAddDocumentRespondent.json"))
+ .check(substring("isCurrentAddressKnown"))
+ .check(status.is(200)))
+ }
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_200_050_RespondentManageDocTask_Event") {
+ exec(http("XUI_PRL_C100progress_200_050_RespondentManageDocTask_Event")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLAddDocumentEventRespondent.json"))
+ .check(substring("newAllegationsOfHarmDomesticAbuseYesNo"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+}
\ No newline at end of file
diff --git a/src/gatling/simulations/scenarios/Barrister_PRL_FL401.scala b/src/gatling/simulations/scenarios/Barrister_PRL_FL401.scala
new file mode 100644
index 00000000..30684265
--- /dev/null
+++ b/src/gatling/simulations/scenarios/Barrister_PRL_FL401.scala
@@ -0,0 +1,179 @@
+package scenarios
+
+import io.gatling.core.Predef._
+import io.gatling.http.Predef._
+import scenarios.Barrister_PRL_C100.{MaxThinkTime, MinThinkTime}
+import utils.{Common, Environment, Headers}
+
+/*======================================================================================
+* Create a new Private Law FL401 application as a professional user (e.g. solicitor)
+======================================================================================*/
+
+object Barrister_PRL_FL401 {
+
+ val BaseURL = Environment.baseURL
+ val MinThinkTime = Environment.minThinkTime
+ val MaxThinkTime = Environment.maxThinkTime
+
+ val CreatePrivateLawCase =
+
+ //set session variables
+ exec(_.setAll(
+ "ApplicantFirstName" -> ("App" + Common.randomString(5)),
+ "ApplicantLastName" -> ("Test" + Common.randomString(5)),
+ "RespondentFirstName" -> ("Resp" + Common.randomString(5)),
+ "RespondentLastName" -> ("Test" + Common.randomString(5)),
+ "AppDobDay" -> Common.getDay(),
+ "AppDobMonth" -> Common.getMonth(),
+ "AppDobYear" -> Common.getDobYear(),
+ "RespDobDay" -> Common.getDay(),
+ "RespDobMonth" -> Common.getMonth(),
+ "RespDobYear" -> Common.getDobYear()))
+
+
+ val DraftAnOrderFL401 =
+
+ /*======================================================================================
+ * Run Draft Order task
+ ======================================================================================*/
+
+ group("XUI_PRL_FL401progress_200_010_DraftAnOrderPrivateLaw") {
+ exec(http("XUI_PRL_FL401progress_200_010_DraftAnOrderPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/draftAnOrder/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_FL401progress_200_020_DraftAnOrder_EventTrigger") {
+ exec(http("XUI_PRL_FL401progress_200_020_DraftAnOrder_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/draftAnOrder?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ //.check(jsonPath("$.case_fields[0].value.partyList.list_items[0].code").saveAs("appCode1"))
+ //.check(jsonPath("$.case_fields[0].value.partyList.list_items[0].label").saveAs("appLabel1"))
+ .check(substring("sdoHearingUrgentCheckList"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select Draft Order option
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_200_040_DraftAnOrderOptions") {
+ exec(http("XUI_PRL_FL401progress_200_040_DraftAnOrderOptions")
+ .post("/data/case-types/PRLAPPS/validate?pageId=draftAnOrder1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLDraftAnOrderOptions.json"))
+ .check(substring("c7ResponseSubmitted"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select type of Order
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_200_050_DraftAnOrderType") {
+ exec(http("XUI_PRL_FL401progress_200_050_DraftAnOrderType")
+ .post("/data/case-types/PRLAPPS/validate?pageId=draftAnOrder2")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLDraftAnOrderType.json"))
+ .check(substring("typesOfApplication"))
+ .check(status.is(200)))
+ }
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Enter order details
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_200_060_DraftAnOrderDetails") {
+ exec(http("XUI_PRL_FL401progress_200_060_DraftAnOrderDetails")
+ .post("/data/case-types/PRLAPPS/validate?pageId=draftAnOrder4")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLDraftAnOrderDetails.json"))
+ .check(substring("caseNameHmctsInternal"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Enter Hearing outcome
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_200_070_DraftAnOrderDetails") {
+ exec(http("XUI_PRL_FL401progress_200_070_DraftAnOrderDetails")
+ .post("/data/case-types/PRLAPPS/validate?pageId=draftAnOrder5")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLDraftAnOrderHearingOutcome.json"))
+ .check(substring("judgeOrMagistratesLastName"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Enter Hearing details
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_200_080_DraftAnOrderDetails") {
+ exec(http("XUI_PRL_FL401progress_200_080_DraftAnOrderDetails")
+ .post("/data/case-types/PRLAPPS/validate?pageId=draftAnOrder16")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLDraftAnOrderHearingDetails.json"))
+ .check(jsonPath("$.data.previewOrderDoc.document_hash").saveAs("document_hash"))
+ .check(jsonPath("$.data.previewOrderDoc.document_url").saveAs("document_url"))
+ .check(jsonPath("$.data.previewOrderDoc.document_filename").saveAs("document_filename"))
+ .check(substring("attendToCourt"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Validate order preview is correct
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_200_090_DraftAnOrderPreview") {
+ exec(http("XUI_PRL_FL401progress_200_090_DraftAnOrderPreview")
+ .post("/data/case-types/PRLAPPS/validate?pageId=draftAnOrder20")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLDraftAnOrderPreview.json"))
+ .check(substring("previewOrderDoc"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Run draft an order event
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_200_100_DraftAnOrderEvent") {
+ exec(http("XUI_PRL_FL401progress_200_100_DraftAnOrderEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLDraftAnOrderEvent.json"))
+ .check(substring("missingAddressWarningText"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+}
\ No newline at end of file
diff --git a/src/gatling/simulations/scenarios/Caseworker_Navigation.scala b/src/gatling/simulations/scenarios/Caseworker_Navigation.scala
index 2359d6d3..54cac4f1 100644
--- a/src/gatling/simulations/scenarios/Caseworker_Navigation.scala
+++ b/src/gatling/simulations/scenarios/Caseworker_Navigation.scala
@@ -115,7 +115,7 @@ object Caseworker_Navigation {
}).optional.saveAs("documentUrl"))
)
- .exec(Common.caseActivityPost)
+ //.exec(Common.caseActivityPost)
.pause(2)
.exec(Common.caseActivityGet)
@@ -176,7 +176,7 @@ object Caseworker_Navigation {
)
}
- .exec(Common.caseActivityPost)
+ //.exec(Common.caseActivityPost)
.pause(2)
.exec(Common.caseActivityGet)
diff --git a/src/gatling/simulations/scenarios/CourtAdmin_PRL_C100.scala b/src/gatling/simulations/scenarios/CourtAdmin_PRL_C100.scala
new file mode 100644
index 00000000..40165379
--- /dev/null
+++ b/src/gatling/simulations/scenarios/CourtAdmin_PRL_C100.scala
@@ -0,0 +1,1658 @@
+package scenarios
+
+import io.gatling.core.Predef._
+import io.gatling.http.Predef._
+import scenarios.Barrister_PRL_C100.{MaxThinkTime, MinThinkTime}
+import scenarios.CourtAdmin_PRL_FL401.{MaxThinkTime, MinThinkTime}
+import utils.{Common, CsrfCheck, Environment, Headers}
+
+import java.io.{BufferedWriter, FileWriter}
+
+/*===============================================================================================================
+* Court Admin C100 case progression. Send to local court --> Send to Gatekeeper --> Add an order --> Serve
+================================================================================================================*/
+
+object CourtAdmin_PRL_C100 {
+
+ val BaseURL = Environment.baseURL
+
+ val MinThinkTime = Environment.minThinkTime
+ val MaxThinkTime = Environment.maxThinkTime
+
+ exec(_.setAll(
+ "PRLRandomString" -> (Common.randomString(7)),
+ "PRLRandomPhone" -> (Common.randomNumber(8)),
+ "PRLAppDobDay" -> Common.getDay(),
+ "PRLAppDobMonth" -> Common.getMonth(),
+ "JudgeFirstName" -> (Common.randomString(4) + "judgefirst"),
+ "JudgeLastName" -> (Common.randomString(4) + "judgeLast"),
+ "todayDate" -> Common.getDate(),
+ "LegalAdviserName" -> (Common.randomString(4) + " " + Common.randomString(4) + "legAdv")))
+
+ val CourtAdminCheckApplication =
+
+ exec(http("XUI_PRL_C100Progress_030_SearchCase")
+ .get(BaseURL + "/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json")
+ .check(jsonPath("$.tabs[0].fields[0].value").saveAs("caseName"))
+ .check(jsonPath("$.case_id").is("#{caseId}")))
+
+ .exec(Common.waJurisdictions)
+ .exec(Common.activity)
+ .exec(Common.userDetails)
+ .exec(Common.caseActivityGet)
+ .exec(Common.isAuthenticated)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*=====================================================================================
+ * Select task tab
+ ======================================================================================*/
+
+ .exec(http("XUI_PRL_C100Progress_040_SelectCase")
+ .get(BaseURL + "/cases/case-details/#{caseId}/task")
+ .headers(Headers.commonHeader)
+ .check(substring("HMCTS Manage cases")))
+
+ .exec(http("XUI_PRL_C100Progress_050_SelectCaseTask")
+ .get(BaseURL + "/workallocation/case/task/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .check(jsonPath("$[0].id").optional.saveAs("taskId"))
+ .check(jsonPath("$[0].type").optional.saveAs("taskType")))
+
+ //Save taskType from response
+ .exec(session => {
+ // Initialise task type in session if it's not already present, ensure the variable exists before entering Loop
+ session("taskType").asOption[String] match {
+ case Some(taskType) => session
+ case None => session.set("taskType", "")
+ }
+ })
+
+ // Loop until the task type matches "checkApplicationC100" *For Cases which selected HWF different steps are required here
+ .asLongAs(session => session("taskType").as[String] != "checkApplicationC100") {
+ exec(http("XUI_PRL_C100Progress_055_SelectCaseTaskRepeat")
+ .get(BaseURL + "/workallocation/case/task/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .check(jsonPath("$[0].id").optional.saveAs("taskId"))
+ .check(jsonPath("$[0].type").optional.saveAs("taskType")))
+
+ .pause(5, 10) // Wait between retries
+
+ // // Log task Type
+ // .exec (session => {
+ // println(s"Current Task Type: ${session("taskType").as[String]}")
+ // session
+ // })
+ }
+
+ /*=====================================================================================
+ * Claim the task
+ ======================================================================================*/
+
+ .exec(http("XUI_PRL_C100Progress_060_ClaimTask")
+ .post(BaseURL + "/workallocation/task/#{taskId}/claim")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(StringBody("""{}"""))
+ .check(status.in(200, 204)))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*=====================================================================================
+ * Select Issue and send to local Court
+ ======================================================================================*/
+
+ .exec(http("XUI_PRL_C100Progress_070_IssueAndSendToLocalCourt")
+ .get(BaseURL + "/workallocation/case/tasks/#{caseId}/event/issueAndSendToLocalCourtCallback/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/json")
+ .check(jsonPath("$.task_required_for_event").is("false")))
+
+ .exec(Common.activity)
+ .exec(Common.profile)
+
+ .exec(http("XUI_PRL_C100Progress_080_IssueAndSendToLocalCourtEventTrigger") //*** SAVE THE Courtlist response here for use in later post requests **
+ .get(BaseURL + "/data/internal/cases/#{caseId}/event-triggers/issueAndSendToLocalCourtCallback?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.id").is("issueAndSendToLocalCourtCallback"))
+ .check(status.in(200, 403)))
+
+ .exec(http("XUI_PRL_C100Progress_090_IssueAndSendToLocalCourtEvent")
+ .get(BaseURL + "/workallocation/case/tasks/#{caseId}/event/issueAndSendToLocalCourtCallback/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/json"))
+ //.check(substring("PRIVATELAW")))
+
+ // .exec(Common.caseActivityPost)
+ .exec(Common.userDetails)
+ //.exec(Common.caseActivityOnlyGet)
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*=====================================================================================
+ * Select Court from dropdown and submit
+ ======================================================================================*/
+
+ .exec(http("XUI_PRL_C100Progress_100_SelectCourt")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=issueAndSendToLocalCourtCallback1")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLLocalCourt.json"))
+ .check(jsonPath("$.data.courtList.value.code").is("234946:")))
+ //Value does not change for now.
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(Common.activity)
+ .exec(Common.userDetails)
+ .exec(Common.activity)
+
+ .exec(http("XUI_PRL_C100Progress_110_SubmitToLocalCourtEvent")
+ .post(BaseURL + "/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLLocalCourtSubmit.json"))
+ .check(jsonPath("$.data.courtList.value.code").is("234946:"))) //Value does not change for now.
+
+ .exec(http("XUI_PRL_C100Progress_120_SubmitToLocalCourtCompleteTask")
+ .post(BaseURL + "/workallocation/task/#{taskId}/complete")
+ .headers(Headers.navigationHeader)
+ .header("Content-Type", "application/json")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .header("accept", "application/json") //No check available for this request
+ .body(StringBody("""{"actionByEvent":true,"eventName":"Issue and send to local court"}""")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val CourtAdminSendToGateKeeper =
+
+ exec(http("XUI_PRL_C100Progress_130_SelectCase")
+ .get(BaseURL + "/cases/case-details/#{caseId}/task")
+ .headers(Headers.commonHeader)
+ .check(substring("HMCTS Manage cases")))
+
+ //.exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).saveAs("XSRFToken")))
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+
+ .exec(Common.activity)
+ .exec(Common.configUI)
+ .exec(Common.configJson)
+ .exec(Common.userDetails)
+
+ .exec(http("XUI_PRL_C100Progress_140_SelectCaseTask")
+ .get(BaseURL + "/workallocation/case/task/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .check(jsonPath("$[0].id").optional.saveAs("taskId"))
+ .check(jsonPath("$[0].type").optional.saveAs("taskType"))
+ )
+
+ // Log task Type
+ // .exec (session => {
+ // println(s"Current respTaskType: ${session("respTaskType").as[String]}")
+ // println(s"Current respTaskId: ${session("respTaskId").as[String]}")
+ // session
+ // })
+
+ //Save taskType from response
+ .exec(session => {
+ // Initialise task type in session if it's not already present, ensure the variable exists before entering Loop
+ session("taskType").asOption[String] match {
+ case Some(taskType) => session
+ case None => session.set("taskType", "")
+ }
+ })
+
+ // Loop until the task type matches "sendToGateKeeperC100"
+ .asLongAs(session => session("taskType").as[String] != "sendToGateKeeperC100") {
+ exec(http("XUI_PRL_C100Progress_150_SelectCaseTaskRepeat")
+ .get(BaseURL + "/workallocation/case/task/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .check(jsonPath("$[0].id").optional.saveAs("taskId"))
+ .check(jsonPath("$[0].type").optional.saveAs("taskType")))
+
+ .pause(5, 10) // Wait between retries
+
+ // // Log task Type
+ // .exec (session => {
+ // println(s"Current respTaskType: ${session("respTaskType").as[String]}")
+ // println(s"Current respTaskId: ${session("respTaskId").as[String]}")
+ // session
+ // })
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Click on 'Send to Gate Keeper'
+ ======================================================================================*/
+
+ .exec(http("XUI_PRL_C100Progress_160_SendToGateKeeper")
+ .get(BaseURL + "/data/internal/cases/#{caseId}/event-triggers/sendToGateKeeper?ignore-warning=false")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.id").is("sendToGateKeeper")))
+
+ .exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+ //.exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).saveAs("XSRFToken")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Add Gate Keeper
+ ======================================================================================*/
+
+ .exec(http("XUI_PRL_C100Progress_170_AddGateKeeper")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=sendToGateKeeper1")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLAddGateKeeper.json"))
+ .check(substring("isJudgeOrLegalAdviserGatekeeping")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Send to Gate Keeper Submit
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_180_GateKeeperSubmit") {
+ exec(http("XUI_PRL_C100Progress_180_005_GateKeeperSubmit")
+ .post(BaseURL + "/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLAddGateKeeperSubmit.json"))
+ .check(substring("gatekeepingDetails")))
+
+ .exec(http("XUI_PRL_C100Progress_180_010_GateKeeperSubmitCompleteTask")
+ .post(BaseURL + "/workallocation/task/#{taskId}/complete")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(StringBody("""{"actionByEvent":true,"eventName":"Send to Gatekeeper"}""")))
+
+ .exec(http("XUI_PRL_C100Progress_180_015_SelectCase")
+ .get(BaseURL + "/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .check(jsonPath("$.case_type.name").is("C100 & FL401 Applications")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val CourtAdminManageOrders =
+
+ exec(_.setAll(
+ "PRLRandomString" -> (Common.randomString(7)),
+ //"PRLRandomPhone" -> (Common.randomNumber(8)),
+ //"PRLAppDobDay" -> Common.getDay(),
+ //"PRLAppDobMonth" -> Common.getMonth(),
+ //"JudgeFirstName" -> (Common.randomString(4) + "judgefirst"),
+ "JudgeLastName" -> (Common.randomString(4) + "judgeLast"),
+ "todayDate" -> Common.getDate(),
+ "OrderDateYear" -> Common.getCurrentYear(),
+ "OrderDateMonth" -> Common.getCurrentMonth(),
+ "OrderDateDay" -> Common.getCurrentDay(),
+ "LegalAdviserName" -> (Common.randomString(4) + " " + Common.randomString(4) + "legAdv"))) //*/
+
+ /*======================================================================================
+ * Click on 'Manage Orders'
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_190_ManageOrders") {
+ exec(http("XUI_PRL_C100Progress_190_005_ManageOrders")
+ .get(BaseURL + "/data/internal/cases/#{caseId}/event-triggers/manageOrders?ignore-warning=false")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.id").is("manageOrders")))
+
+ .exec(Common.userDetails)
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+ //.exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).saveAs("XSRFToken")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Create an Order
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_200_CreateOrder") {
+ exec(http("XUI_PRL_C100Progress_200_005_CreateOrder")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders1")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLCreateOrder.json"))
+ .check(substring("isSdoSelected")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select Order - Special guardianship order (C43A)
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_210_SelectOrder") {
+ exec(http("XUI_PRL_C100Progress_210_005_SelectOrder")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLSelectOrder.json"))
+ .check(substring("otherPartyInTheCaseRevised")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order Details
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_220_OrderDetails") {
+ exec(http("XUI_PRL_C100Progress_220_005_OrderDetails")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders5")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLOrderDetails.json"))
+ .check(jsonPath("$.data.appointedGuardianName[0].id").saveAs("guardianId"))
+ .check(substring("isEngDocGen")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Guardian Name
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_230_GuardianName") {
+ exec(http("XUI_PRL_C100Progress_230_005_GuardianName")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders11")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLGuardianName.json"))
+ .check(jsonPath("$.data.previewOrderDoc.document_url").saveAs("document_url"))
+ .check(jsonPath("$.data.previewOrderDoc.document_hash").saveAs("document_hash"))
+ .check(jsonPath("$.data.previewOrderDoc.document_hash").saveAs("document_filename"))
+ .check(substring("previewOrderDoc")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Check Your Order
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_240_CheckYourOrder") {
+ exec(http("XUI_PRL_C100Progress_240_005_CheckYourOrder")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders20")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ //.header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLCheckOrder.json"))
+ .check(substring("previewOrderDoc")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order Recipients
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_250_OrderRecipients") {
+ exec(http("XUI_PRL_C100Progress_250_005_OrderRecipients")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders24")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLOrderRecipients.json"))
+ .check(substring("amendOrderSelectCheckOptions")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order Serve
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_260_OrderServe") {
+ exec(http("XUI_PRL_C100Progress_260_005_OrderServe")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders26")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLOrderServe.json"))
+ .check(jsonPath("$.data.serveOrderDynamicList.value[0].code").saveAs("orderCode"))
+ .check(jsonPath("$.data.serveOrderDynamicList.value[0].label").saveAs("orderLabel"))
+ .check(substring("orderRecipients")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order To Serve List
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_270_OrderServe") {
+ exec(http("XUI_PRL_C100Progress_270_005_OrderToServeList")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders27")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLOrderToServeList.json"))
+ .check(substring("otherPartyInTheCaseRevised")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Serve to Respondent Options
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_280_ServeToRespondentOptions") {
+ exec(http("XUI_PRL_C100Progress_280_005_ServeToRespondentOptions")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders28")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLOrderToServeRespondentOptions.json"))
+ .check(substring("otherPartyInTheCaseRevised")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order Submit
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_290_OrderSubmit") {
+ exec(http("XUI_PRL_C100Progress_290_005_OrderSubmit")
+ .post(BaseURL + "/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLOrderSubmit.json"))
+ .check(substring("JUDICIAL_REVIEW")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val CourtAdminServiceApplication =
+
+ /*======================================================================================
+ * Click on 'Service of Application'
+ ======================================================================================*/
+
+ group("XUI_PRL_C100Progress_300_ServiceOfApplication") {
+ exec(http("XUI_PRL_C100Progress_300_005_ServiceOfApplication")
+ .get(BaseURL + "/data/internal/cases/#{caseId}/event-triggers/serviceOfApplication?ignore-warning=false")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[7].value.list_items[0].code") saveAs ("serviceOfApplicationScreenCode"))
+ .check(jsonPath("$.case_fields[7].value.list_items[0].label") saveAs ("serviceOfApplicationScreenLabel"))
+ .check(jsonPath("$.case_fields[31].value.list_items[0].code") saveAs ("serviceOfApplicationApplicantCode"))
+ .check(jsonPath("$.case_fields[31].value.list_items[0].label") saveAs ("serviceOfApplicationApplicantName"))
+ .check(jsonPath("$.case_fields[31].value.list_items[2].code") saveAs ("serviceOfApplicationRespondentCode"))
+ .check(jsonPath("$.case_fields[31].value.list_items[2].label") saveAs ("serviceOfApplicationRespondentName"))
+ .check(jsonPath("$.id").is("serviceOfApplication")))
+
+ .exec(http("XUI_Common_000_UserDetails")
+ .get("/api/user/details?refreshRoleAssignments=undefined")
+ .headers(Headers.commonHeader)
+ .header("Cache-Control", "no-cache")
+ .header("Pragma", "no-cache")
+ .header("accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.roleAssignmentInfo[0].primaryLocation") saveAs ("locationId"))
+ .check(status.in(200)))
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * PD36Q letter Upload
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_310_PD36QUpload") {
+ exec(http("XUI_PRL_C100Progress_310_005_PD36QUpload")
+ .post(BaseURL + "/documentsv2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .bodyPart(RawFileBodyPart("files", "120KB.pdf")
+ .fileName("120KB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(substring("originalDocumentName"))
+ .check(jsonPath("$.documents[0].hashToken").saveAs("documentHashPD36Q"))
+ .check(jsonPath("$.documents[0]._links.self.href").saveAs("DocumentURLPD36Q")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(session => {
+ for (_ <- 1 to 10) { // Adjust the loop count as needed
+ Thread.sleep(500) // 500ms delay per iteration
+ println("Debug: Delaying the script...")
+ }
+ session
+ })
+
+
+
+ /*======================================================================================
+ * Special arrangements letter Upload
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_320_SpecialArrangementsUpload") {
+ exec(http("XUI_PRL_C100Progress_320_SpecialArrangementsUpload")
+ .post(BaseURL + "/documentsv2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .bodyPart(RawFileBodyPart("files", "120KB.pdf")
+ .fileName("120KB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(substring("originalDocumentName"))
+ .check(jsonPath("$.documents[0].hashToken").saveAs("documentHashSpecial"))
+ .check(jsonPath("$.documents[0]._links.self.href").saveAs("DocumentURLSpecial")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Service of Application document uploads
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_330_DocumentUpload") {
+ exec(http("XUI_PRL_C100Progress_330_005_DocumentUpload")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=serviceOfApplication2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLSoADocuments.json"))
+ .check(substring("additionalDocuments")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Service of Application Confirm recipients
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_340_ServiceRecipients") {
+ exec(http("XUI_PRL_C100Progress_340_005_ServiceRecipients")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=serviceOfApplication4")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLSoARecipients.json"))
+ .check(substring("otherPartyInTheCaseRevised")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Service of Application Submit
+ ======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_350_ServiceSubmit") {
+ exec(http("XUI_PRL_C100Progress_350_005_ServiceSubmit")
+ .post(BaseURL + "/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLSoASubmit.json"))
+ .check(jsonPath("$.data.caseInvites[0].value.accessCode").saveAs("prlAccessCodeApplicant"))
+ .check(jsonPath("$.data.caseInvites[1].value.accessCode").saveAs("prlAccessCodeRespondent"))
+ .check(jsonPath("$.data.respondentTable[0].id").saveAs("respondentPartyId"))
+ .check(jsonPath("$.data.respondents[0].value.solicitorPartyId").saveAs("respondentSolicitorPartyId"))
+ .check(jsonPath("$.data.applicantTable[0].id").saveAs("applicantPartyId"))
+ .check(jsonPath("$.data.applicants[0].value.solicitorPartyId").saveAs("applicantSolicitorPartyId"))
+ .check(jsonPath("$.data.applicants[0].value.solicitorOrgUuid").saveAs("solicitorOrgId")))
+ }
+
+ val CourtAdminListHearing =
+
+ /*======================================================================================
+* Click the Hearing Tab
+======================================================================================*/
+
+ group("XUI_PRL_C100Progress_370_HearingsTab") {
+ exec(http("XUI_PRL_C100Progress_370_005_HearingsTab")
+ .get("/api/hearings/getHearings?caseId=#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_C100Progress_370_010_GetHearingsJurisdiction")
+ .post("/api/hearings/loadServiceHearingValues?jurisdictionId=PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(StringBody("""{"caseReference":"#{caseId}"}"""))
+ .check(substring("hearing-facilities")))
+
+ .exec(http("XUI_PRL_C100Progress_370_015_GetHearingTypes")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingType&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingType")))
+
+ //.exec(Common.caseActivityPost)
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+* Select Request a Hearing
+=======================================================================================*/
+
+ .group("XUI_PRL_C100Progress_380_RequestHearing") {
+
+ //exec(Common.caseActivityPost)
+ exec(Common.isAuthenticated)
+
+ .exec(http("XUI_PRL_C100Progress_380_005_GetCaseFlag")
+ .get("/api/prd/caseFlag/getCaseFlagRefData?serviceId=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+ .exec(http("XUI_PRL_C100Progress_380_010_LocationById")
+ .get("/api/prd/location/getLocationById?epimms_id=#{locationId}&serviceCode=null")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+* Navigate through hearing screens and submit hearing request
+=======================================================================================*/
+
+ .exec(http("XUI_PRL_C100Progress_390_GetCaseFlag")
+ .get("/api/prd/caseFlag/getCaseFlagRefData?serviceId=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(http("XUI_PRL_C100Progress_400_GetHearingChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingChannel&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingChannel")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(http("XUI_PRL_C100Progress_410_LocationByIdServiceCode")
+ .get("/api/prd/location/getLocationById?epimms_id=#{locationId}&serviceCode=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(http("XUI_PRL_C100Progress_420_GetHearingChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=JudgeType&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("JudgeType")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(http("XUI_PRL_C100Progress_430_GetHearingChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingPriority&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingPriority")))
+
+ .group("XUI_PRL_C100Progress_440_ListHearing") {
+ exec(http("XUI_PRL_C100Progress_440_005_LoadServiceLinkedCases")
+ .post("/api/hearings/loadServiceLinkedCases?jurisdictionId=PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(StringBody("""{"caseReference":"#{caseId}","hearingId": ""}"""))
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_C100Progress_440_010_CaseLinkingReasonCode")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingPriority&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingPriority")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100Progress_450_ListHearing") {
+ exec(http("XUI_PRL_C100Progress_390_005_GetCaseFlag")
+ .get("/api/prd/caseFlag/getCaseFlagRefData?serviceId=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+
+ .exec(http("XUI_PRL_C100Progress_450_010_GetHearingChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingChannel&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingChannel")))
+
+ .exec(http("XUI_PRL_C100Progress_450_015_GetHearingSubChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingSubChannel&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingSubChannel")))
+
+ .exec(http("XUI_PRL_C100Progress_450_020_LocationByIdServiceCode")
+ .get("/api/prd/location/getLocationById?epimms_id=#{locationId}&serviceCode=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+* Submit hearing request
+=======================================================================================*/
+
+ .exec(http("XUI_PRL_C100Progress_460_SubmitHearingRequest")
+ .post("/api/hearings/submitHearingRequest")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLC100SubmitHearing.json"))
+ .check(jsonPath("$.hearingRequestID").saveAs("hearingRequestId"))
+ .check(status.is(201)))
+
+ //.exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).saveAs("XSRFToken")))
+ //.exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val CourtAdminHearingsTab =
+
+ /*======================================================================================
+ * Click on the Hearings tab to view any Hearings
+ ======================================================================================*/
+
+ group("XUI_PRL_C100Progress_470_HearingsTab") {
+ exec(http("XUI_PRL_C100_470_005_HearingsTab")
+ .get(BaseURL + "/cases/case-details/#{caseId}/hearings")
+ .headers(Headers.commonHeader)
+ .check(status.is(200)))
+
+ .exec(Common.configUI)
+ .exec(Common.userDetails)
+ .exec(Common.isAuthenticated)
+
+ .exec(http("XUI_PRL_C100Progress_470_010_HearingsTabGetCaseData")
+ .get("/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.is(200)))
+
+ .exec(Common.monitoringTools)
+ .exec(Common.manageLabellingRoleAssignment)
+ .exec(Common.waJurisdictions)
+
+ .exec(http("XUI_PRL_C100Progress_470_015_HearingsTabCaseWorkerJurisdictions")
+ .get("/aggregated/caseworkers/:uid/jurisdictions?access=read")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.is(200)))
+
+ .exec(Common.activity)
+
+ .exec(http("XUI_PRL_C100Progress_470_020_HearingsTabGetHearings")
+ .get("/api/hearings/getHearings?caseId=#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("LISTED"))
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_C100Progress_470_025_HearingsTabLoadHearingValues")
+ .post("/api/hearings/loadServiceHearingValues?jurisdictionId=PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(StringBody("""{"caseReference":"#{caseId}"}"""))
+ .check(substring("hearing-facilities")))
+
+ .exec(http("XUI_PRL_C100Progress_470_030_GetHearingTypes")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingType&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingType")))
+
+ //.exec(Common.caseActivityPost)
+ }
+
+
+ val AddBarristerC100Applicant =
+
+ /*======================================================================================
+ * Run Add Barrister task
+ ======================================================================================*/
+
+ group("XUI_PRL_C100progress_100_010_ApplicantAddBarristerPrivateLaw") {
+ exec(http("XUI_PRL_C100progress_100_010_ApplicantAddBarristerPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminAddBarrister/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_100_020_ApplicantAddBarristerTask_EventTrigger") {
+ exec(http("XUI_PRL_C100progress_100_020_ApplicantAddBarristerTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminAddBarrister?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].code").saveAs("appCode1"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].label").saveAs("appLabel1"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[1].code").saveAs("appCode2"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[1].label").saveAs("appLabel2"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[2].code").saveAs("appCode3"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[2].label").saveAs("appLabel3"))
+ .check(substring("Organisation Search"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Submit Barrister Details
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_100_040_ApplicantBarristerDetailsSubmit") {
+ exec(http("XUI_PRL_C100progress_100_040_ApplicantBarristerDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminAddBarrister1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLAddBarrister.json"))
+ .check(substring("perf_barrister"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_100_050_ApplicantBarristerEvent") {
+ exec(http("XUI_PRL_C100progress_100_050_ApplicantBarristerEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLAddBarristerEvent.json"))
+ .check(substring("perf_barrister"))
+ .check(status.is(201)))
+
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+
+ val AddBarristerC100Defendent =
+
+ /*======================================================================================
+ * Run Add Barrister task
+ ======================================================================================*/
+
+ group("XUI_PRL_C100progress_100_010_RespondentAddBarristerPrivateLaw") {
+ exec(http("XUI_PRL_C100progress_100_010_RespondentAddBarristerPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminAddBarrister/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_100_020_RespondentAddBarristerTask_EventTrigger") {
+ exec(http("XUI_PRL_C100progress_100_020_RespondentAddBarristerTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminAddBarrister?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].code").saveAs("appCode1"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].label").saveAs("appLabel1"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[1].code").saveAs("appCode2"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[1].label").saveAs("appLabel2"))
+ .check(substring("Organisation Search"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Submit Barrister Details
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_100_040_RespondentBarristerDetailsSubmit") {
+ exec(http("XUI_PRL_C100progress_100_040_RespondentBarristerDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminAddBarrister1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLAddBarristerRespondent.json"))
+ .check(substring("perf_barrister"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_100_050_RespondentBarristerEvent") {
+ exec(http("XUI_PRL_C100progress_100_050_RespondentBarristerEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLAddBarristerEventRespondent.json"))
+ .check(substring("perf_barrister"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val RemoveBarristerC100Applicant =
+
+ /*======================================================================================
+ * Run Remove Barrister task
+ ======================================================================================*/
+
+ group("XUI_PRL_C100progress_300_020_ApplicantRemoveBarristerTask_EventTrigger") {
+ exec(http("XUI_PRL_C100progress_300_020_ApplicantRemoveBarristerTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminRemoveBarrister?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].code").saveAs("appCode1"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].label").saveAs("appLabel1"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[1].code").saveAs("appCode2"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[1].label").saveAs("appLabel2"))
+ .check(substring("Caseworker remove barrister"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Submit Barrister Remove Details
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_300_040_ApplicantRemoveBarristerDetailsSubmit") {
+ exec(http("XUI_PRL_C100progress_300_040_ApplicantRemoveBarristerDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminRemoveBarrister1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLRemoveBarrister.json"))
+ .check(substring("OrganisationName"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_300_050_ApplicantRemoveBarristerEvent") {
+ exec(http("XUI_PRL_C100progress_300_050_ApplicantRemoveBarristerEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLRemoveBarristerEvent.json"))
+ .check(substring("perf_barrister"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val RemoveBarristerC100Defendent =
+
+ /*======================================================================================
+ * Run Remove Barrister task
+ ======================================================================================*/
+
+ group("XUI_PRL_C100progress_400_020_DefendentRemoveBarristerTask_EventTrigger") {
+ exec(http("XUI_PRL_C100progress_400_020_DefendentRemoveBarristerTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminRemoveBarrister?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].code").saveAs("appCode1"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].label").saveAs("appLabel1"))
+ .check(substring("Caseworker remove barrister"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Submit Barrister Remove Details
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_400_040_DefendentRemoveBarristerDetailsSubmit") {
+ exec(http("XUI_PRL_C100progress_400_040_DefendentRemoveBarristerDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminRemoveBarrister1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLRemoveBarristerDefendent.json"))
+ .check(substring("OrganisationName"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_400_050_DefendentRemoveBarristerEvent") {
+ exec(http("XUI_PRL_C100progress_400_050_DefendentRemoveBarristerEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLRemoveBarristerEventDefendent.json"))
+ .check(substring("If children live with another party"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val ServiceOfApplicationC100 =
+
+ /*======================================================================================
+ * Run ServiceOfApplication task
+ ======================================================================================*/
+
+ group("XUI_PRL_C100progress_400_010_ServiceOfApplicationPrivateLaw") {
+ exec(http("XUI_PRL_C100progress_400_010_ServiceOfApplicationPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminAddBarrister/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_400_020_ServiceOfApplicationTask_EventTrigger") {
+ exec(http("XUI_PRL_C100progress_400_020_ServiceOfApplicationTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/serviceOfApplication?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[7].value.list_items[0].code").saveAs("appCode1"))
+ .check(jsonPath("$.case_fields[7].value.list_items[0].label").saveAs("appLabel1"))
+ .check(jsonPath("$.case_fields[30].value.list_items[0].code").saveAs("personAppCode1"))
+ .check(jsonPath("$.case_fields[30].value.list_items[0].label").saveAs("personAppLabel1"))
+ .check(jsonPath("$.case_fields[30].value.list_items[1].code").saveAs("personAppCode2"))
+ .check(jsonPath("$.case_fields[30].value.list_items[1].label").saveAs("personAppLabel2"))
+ .check(jsonPath("$.case_fields[30].value.list_items[2].code").saveAs("personAppCode3"))
+ .check(jsonPath("$.case_fields[30].value.list_items[2].label").saveAs("personAppLabel3"))
+ .check(jsonPath("$.case_fields[31].value.list_items[0].code").saveAs("otherPartiesAppCode1"))
+ .check(jsonPath("$.case_fields[31].value.list_items[0].label").saveAs("otherPartiesAppLabel1"))
+ .check(jsonPath("$.case_fields[31].value.list_items[1].code").saveAs("otherPartiesAppCode2"))
+ .check(jsonPath("$.case_fields[31].value.list_items[1].label").saveAs("otherPartiesAppLabel2"))
+ .check(substring("Event to serve the parties"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Document Upload - pd36qLetter
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_200_030_ServiceOfApplicationTask_pd36qLetterUpload") {
+ exec(http("XUI_PRL_C100progress_200_030_ServiceOfApplicationTask_pd36qLetterUpload")
+ .post("/documents")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .bodyPart(RawFileBodyPart("files", "120KB.pdf")
+ .fileName("120KB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(jsonPath("$._embedded.documents[0]._links.self.href").saveAs("pd36qLetter_document_url"))
+ .check(jsonPath("$._embedded.documents[0]._links.binary.href").saveAs("pd36qLetter_document_binary_url"))
+ .check(substring("originalDocumentName"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Document Upload - specialArrangementsLetter
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_200_030_ServiceOfApplicationTask_specialArrangementsLetterUpload") {
+ exec(http("XUI_PRL_C100progress_200_030_ServiceOfApplicationTask_specialArrangementsLetterUpload")
+ .post("/documents")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .bodyPart(RawFileBodyPart("files", "120KB.pdf")
+ .fileName("120KB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(jsonPath("$._embedded.documents[0]._links.self.href").saveAs("specialArrangementsLetter_document_url"))
+ .check(jsonPath("$._embedded.documents[0]._links.binary.href").saveAs("specialArrangementsLetter_document_binary_url"))
+ .check(substring("originalDocumentName"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select the Draft Order
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_400_040_ServiceOfApplicationDetails") {
+ exec(http("XUI_PRL_C100progress_400_040_ServiceOfApplicationDetails")
+ .post("/data/case-types/PRLAPPS/validate?pageId=serviceOfApplication2")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLServiceOfApplicationDetails.json"))
+ .check(substring("serviceOfApplicationHeader"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Enter final decision details
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_400_040_ServiceOfApplicationDetailsSubmit") {
+ exec(http("XUI_PRL_C100progress_400_040_ServiceOfApplicationDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=serviceOfApplication4")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLServiceOfApplicationDetailsSubmit.json"))
+ .check(substring("FPRL Child Arrangements"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * ServiceOfApplication Event
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_400_050_ServiceOfApplicationEvent") {
+ exec(http("XUI_PRL_C100progress_400_050_ServiceOfApplicationEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLServiceOfApplicationEvent.json"))
+ .check(substring("I understand that proceedings for contempt of court"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val FinalDecisionC100 =
+
+ /*======================================================================================
+ * Run recordFinalDecision task
+ ======================================================================================*/
+
+ group("XUI_PRL_C100progress_500_010_FinalOrderPrivateLaw") {
+ exec(http("XUI_PRL_C100progress_500_010_FinalOrderPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminAddBarrister/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_500_020_FinalOrderTask_EventTrigger") {
+ exec(http("XUI_PRL_C100progress_500_020_FinalOrderTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/recordFinalDecision?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[3].value.list_items[0].code").saveAs("appCodeChild1"))
+ .check(jsonPath("$.case_fields[3].value.list_items[0].label").ofType[String]
+ .transform(_.split(" ")(0))
+ .saveAs("firstName1"))
+ .check(jsonPath("$.case_fields[3].value.list_items[0].label").ofType[String]
+ .transform(_.split(" ")(1))
+ .saveAs("lastName1"))
+ .check(substring("finalOutcomeForChildren"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select final order
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_500_040_FinalOrderDetails") {
+ exec(http("XUI_PRL_C100progress_500_040_FinalOrderDetails")
+ .post("/data/case-types/PRLAPPS/validate?pageId=recordFinalDecision1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLFinalOrder.json"))
+ .check(substring("solicitorRepresented"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Enter final order details
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_500_040_FinalOrderDetailsSubmit") {
+ exec(http("XUI_PRL_C100progress_500_040_FinalOrderDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=recordFinalDecision2")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLFinalOrderDetails.json"))
+ .check(substring("solicitorRepresented"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Final order Event
+ ======================================================================================*/
+ .group("XUI_PRL_C100progress_500_050_FinalOrderEvent") {
+ exec(http("XUI_PRL_C100progress_500_050_FinalOrderEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PRLFinalOrderEvent.json"))
+ .check(substring("ALL_FINAL_ORDERS_ISSUED"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val PathfinderCase =
+
+ group("XUI_PRL_LA_010_PathfinderEvent") {
+ exec(http("XUI_PRL_LA_010_005_PathfinderEvent")
+ .get("/workallocation/case/tasks/#{caseId}/event/pathfinderDecision/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+
+ exec(http("XUI_PRL_LA_010_010_PathfinderEvent_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/pathfinderDecision?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ //.check(jsonPath("$.case_fields[0].value[0].id").saveAs("id_value"))
+ .check(substring("Is this a Pathfinder case"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_020_PathfinderEvent_Validate") {
+ exec(http("XUI_PRL_LA_020_005_PathfinderEvent_Validate")
+ .post("/data/case-types/PRLAPPS/validate?pageId=pathfinderDecision1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PathfinderValidate.json"))
+ .check(substring("isPathfinderCase"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_030_PathfinderEvent_Event") {
+ exec(http("XUI_PRL_LA_030_005_PathfinderEvent_Event")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PathfinderEvent.json"))
+ .check(substring("seekHelpDetails"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val AddLocalAuthority =
+
+ group("XUI_PRL_LA_040_AddLocalAuthority") {
+ exec(http("XUI_PRL_LA_040_005_AddLocalAuthority")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminAddLocalAuthority/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+
+ exec(http("XUI_PRL_LA_040_010_AddLocalAuthority_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminAddLocalAuthority?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ //.check(jsonPath("$.case_fields[0].value[0].id").saveAs("id_value"))
+ .check(substring("adminAddLocalAuthority"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_050_AddLocalAuthority_Validate") {
+ exec(http("XUI_PRL_LA_050_005_AddLocalAuthority_Validate")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminAddLocalAuthority1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/AddLocalAuthorityValidate.json"))
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_060_AddLocalAuthority_Event") {
+ exec(http("XUI_PRL_LA_060_005_AddLocalAuthority_Event")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/AddLocalAuthorityEvent.json"))
+ .check(substring("seekHelpDetails"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val RemoveLocalAuthority =
+
+ group("XUI_PRL_LA_150_RemoveLocalAuthority") {
+ exec(http("XUI_PRL_LA_150_005_RemoveLocalAuthority")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminRemoveLocalAuthority/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_LA_150_010_RemoveLocalAuthority_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminRemoveLocalAuthority?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value[0].id").saveAs("id_value"))
+ .check(substring("adminRemoveLocalAuthority"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_160_RemoveLocalAuthority_Validate") {
+ exec(http("XUI_PRL_LA_160_005_RemoveLocalAuthority_Validate")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminRemoveLocalAuthority1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/RemoveLocalAuthorityValidate.json"))
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_170_010_RemoveLocalAuthority_Event") {
+ exec(http("XUI_PRL_LA_000_000_RemoveLocalAuthority_Event")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/RemoveLocalAuthorityEvent.json"))
+ .check(substring("responseToAllegationsOfHarmDocument"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val LAOpenCase =
+
+ group("XUI_PRL_LA_070_OpenCase") {
+ exec(http("XUI_PRL_LA_070_005_OpenCase")
+ .get("/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+
+ exec(http("XUI_PRL_LA_070_010_OpenCase")
+ .post("/api/role-access/roles/manageLabellingRoleAssignment/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .body(ElFileBody("bodies/prl/c100/LAOpenCase.json"))
+ .check(substring("adminRemoveLocalAuthority"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val ManageDocsUpload =
+
+ group("XUI_PRL_LA_090_ManageDocs_Task") {
+ exec(http("XUI_PRL_LA_000_005_ManageDocsTask")
+ .get("/workallocation/case/tasks/#{caseId}/event/manageDocumentsNew/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+
+ exec(http("XUI_PRL_LA_090_010_ManageDocs_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/manageDocumentsNew?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ //.check(jsonPath("$.case_fields[0].value[0].id").saveAs("id"))
+ .check(jsonPath("$.case_fields[0].value[0].id").saveAs("id"))
+ .check(substring("manageDocumentsNew"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_100_ManageDocs_Upload") {
+ exec(http("XUI_PRL_LA_100_005_ManageDocs_Upload")
+ .post("/documents")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .bodyPart(RawFileBodyPart("files", "3MB.pdf.pdf")
+ .fileName("3MB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(substring("originalDocumentName4545"))
+ .check(jsonPath("$.documents[0].hashToken").saveAs("documentHash_cir"))
+ .check(jsonPath("$._embedded.documents[0]._links.self.href").saveAs("DocumentURL_cir")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_110_ManageDocs_Validate") {
+ exec(http("XUI_PRL_LA_110_005_ManageDocs_Validate")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminRemoveLocalAuthority1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/managedocs_validate.json"))
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_120_RemoveLocalAuthority_Event") {
+ exec(http("XUI_PRL_LA_120_005_RemoveLocalAuthority_Event")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/managedocs_validate.json"))
+ .check(substring("responseToAllegationsOfHarmDocument"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val caseFileView =
+
+ group("XUI_PRL_LA_130_CFV_ClickTab") {
+ exec(http("XUI_PRL_LA_130_005_CFV_ClickTab")
+ .get("/categoriesAndDocuments/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_LA_140_CFV_ClickDocument") {
+ exec(http("XUI_PRL_LA_140_005_CFV_Filter")
+ .get("/em-anno/annotation-sets/filter?documentId=391d5b5c-c3f4-4500-b4b4-50fbde9ef070")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_LA_140_010_CFV_markup")
+ .get("/api/markups/391d5b5c-c3f4-4500-b4b4-50fbde9ef070")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_LA_140_015_CFV_bookmark")
+ .get("/em-anno/391d5b5c-c3f4-4500-b4b4-50fbde9ef070/bookmarks")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_LA_140_020_CFV")
+ .get("/documents/391d5b5c-c3f4-4500-b4b4-50fbde9ef070/binary")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_LA_140_025_CFV")
+ .get("/em-anno/metadata/391d5b5c-c3f4-4500-b4b4-50fbde9ef070")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+ }
+
+ val clickParties =
+
+ group("XUI_PRL_LA_080_Parties") {
+ exec(http("XUI_PRL_LA_080_005_Parties")
+ .get("/api/caseshare/orgs")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("organisationIdentifier"))
+ .check(status.is(200)))
+ }
+
+ val writeToFile =
+ exec { session =>
+ val fw = new BufferedWriter(new FileWriter("LAData.csv", true))
+ try {
+ fw.write(session("orgID").as[String] + "," + session("LAUser").as[String] + "," + session("LAPassword").as[String] + "," + session("LAFirm").as[String] + "," + session("LAFirstName").as[String] + "," + session("LALastName").as[String] + "," + session("LARole").as[String] + "," + session("caseId").as[String] + "\r\n")
+ } finally fw.close()
+ session
+ }
+
+}
+/*
+//Write applicant access code to file
+ .exec { session =>
+ val fw = new BufferedWriter(new FileWriter("C100caseNumberAndCodeApplicant.csv", true))
+ try {
+ fw.write(session("caseId").as[String] + "," + session("prlAccessCodeApplicant").as[String] + "\r\n")
+ } finally fw.close()
+ session
+ }
+ //Write respondent access code to file
+ .exec { session =>
+ val fw = new BufferedWriter(new FileWriter("C100caseNumberAndCodeRespondent.csv", true))
+ try {
+ fw.write(session("caseId").as[String] + "," + session("prlAccessCodeRespondent").as[String] + "\r\n")
+ } finally fw.close()
+ session
+ }
+}*/
+
+// -- ADD HEARINGS NAVIGATION AND ADD HEARING
\ No newline at end of file
diff --git a/src/gatling/simulations/scenarios/CourtAdmin_PRL_FL401.scala b/src/gatling/simulations/scenarios/CourtAdmin_PRL_FL401.scala
new file mode 100644
index 00000000..0018a45e
--- /dev/null
+++ b/src/gatling/simulations/scenarios/CourtAdmin_PRL_FL401.scala
@@ -0,0 +1,980 @@
+package scenarios
+
+import io.gatling.core.Predef._
+import io.gatling.http.Predef._
+import scenarios.Barrister_PRL_C100.{MaxThinkTime, MinThinkTime}
+import scenarios.CourtAdmin_PRL_C100.{MaxThinkTime, MinThinkTime}
+import utils.{Common, CsrfCheck, Environment, Headers}
+
+import java.io.{BufferedWriter, FileWriter}
+
+/*===============================================================================================================
+* Court Admin FL401 case progression. Send to local court --> Sent to Gatekeeper --> Add an order --> Serve
+================================================================================================================*/
+
+object CourtAdmin_PRL_FL401 {
+
+ val BaseURL = Environment.baseURL
+
+ val MinThinkTime = Environment.minThinkTime
+ val MaxThinkTime = Environment.maxThinkTime
+
+ //set session variables
+ exec(_.setAll(
+ "PRLRandomString" -> (Common.randomString(7)),
+ "JudgeFirstName" -> (Common.randomString(4) + "judgefirst"),
+ "JudgeLastName" -> (Common.randomString(4) + "judgeLast"),
+ "PRLAppDobDay" -> Common.getDay(),
+ "PRLAppDobMonth" -> Common.getMonth(),
+ "todayDate" -> Common.getDate(),
+ "LegalAdviserName" -> (Common.randomString(4) + " " + Common.randomString(4) + "legAdv")))
+
+ val CourtAdminCheckApplication =
+
+ exec(http("XUI_PRL_FL401Progress_030_SearchCase")
+ .get(BaseURL + "/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json")
+ .check(jsonPath("$.tabs[0].fields[0].value").saveAs("caseName"))
+ .check(jsonPath("$.case_id").is("#{caseId}")))
+
+ .exec(Common.waJurisdictions)
+ .exec(Common.activity)
+ .exec(Common.userDetails)
+ .exec(Common.caseActivityGet)
+ .exec(Common.isAuthenticated)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*=====================================================================================
+ * Add case number
+ ======================================================================================*/
+
+ .exec(http("XUI_PRL_FL401Progress_040_AddCaseNumber")
+ .get(BaseURL + "/workallocation/case/tasks/#{caseId}/event/fl401AddCaseNumber/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/json")
+ .check(jsonPath("$.task_required_for_event").is("false")))
+
+ .exec(Common.activity)
+ .exec(Common.profile)
+
+ .exec(http("XUI_PRL_FL401Progress_050_AddCaseNumberEventTrigger") //*** SAVE THE Courtlist response here for use in later post requests **
+ .get(BaseURL + "/data/internal/cases/#{caseId}/event-triggers/fl401AddCaseNumber?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.id").is("fl401AddCaseNumber"))
+ .check(status.in(200, 403)))
+
+ .exec(http("XUI_PRL_FL401Progress_060_AddCaseNumberEvent")
+ .get(BaseURL + "/workallocation/case/tasks/#{caseId}/event/fl401AddCaseNumber/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/json"))
+
+ .exec(Common.userDetails)
+ .exec(Common.activity)
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*=====================================================================================
+ * Select Court from dropdown and submit
+ ======================================================================================*/
+
+ .exec(http("XUI_PRL_FL401Progress_070_AddCaseNumberEventValidate")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=fl401AddCaseNumber1")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/AddCaseNumber.json")))
+ //.check("familymanCaseNumber")
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(Common.activity)
+ .exec(Common.userDetails)
+ .exec(Common.activity)
+
+ .exec(http("XUI_PRL_FL401Progress_080_AddCaseNumberCheckApplication")
+ .get(BaseURL + "/workallocation/task/ee006e5a-f09e-11f0-8c83-b2f39bbc3f04")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/json")
+ .check(jsonPath("$.task.name").is("Check Application")))
+
+ .exec(http("XUI_PRL_FL401Progress_080_AddCaseNumberFinalEvent")
+ .post(BaseURL + "/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/AddCaseNumberSubmit.json"))
+ .check(jsonPath("$.state").is("CASE_ISSUED")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val CourtAdminSendToGateKeeper =
+
+ exec(http("XUI_PRL_FL401Progress_090_SelectCase")
+ .get(BaseURL + "/cases/case-details/#{caseId}/task")
+ .headers(Headers.commonHeader)
+ .check(substring("HMCTS Manage cases")))
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+
+ .exec(Common.activity)
+ .exec(Common.configUI)
+ .exec(Common.configJson)
+ .exec(Common.userDetails)
+
+/*======================================================================================
+* Click on 'Send to Gate Keeper'
+======================================================================================*/
+
+ .exec(http("XUI_PRL_FL401Progress_100_SendToGateKeeper")
+ .get(BaseURL + "/data/internal/cases/#{caseId}/event-triggers/sendToGateKeeper?ignore-warning=false")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.id").is("sendToGateKeeper")))
+
+ .exec(Common.userDetails)
+ //.exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).saveAs("XSRFToken")))
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+/*======================================================================================
+* Add Gate Keeper
+======================================================================================*/
+
+ .exec(http("XUI_PRL_FL401Progress_110_AddGateKeeper")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=sendToGateKeeper1")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLAddGateKeeper.json"))
+ .check(substring("isJudgeOrLegalAdviserGatekeeping")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+/*======================================================================================
+* Send to Gate Keeper Submit
+======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_120_GateKeeperSubmit") {
+ exec(http("XUI_PRL_FL401Progress_120_GateKeeperSubmit")
+ .post(BaseURL + "/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLAddGateKeeperSubmit.json"))
+ .check(substring("gatekeepingDetails")))
+
+ .exec(http("XUI_PRL_FL401Progress_130_SelectCase")
+ .get(BaseURL + "/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .check(jsonPath("$.case_type.name").is("C100 & FL401 Applications")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val CourtAdminManageOrders =
+
+ //set session variables
+ exec(_.setAll(
+ "PRLRandomString" -> (Common.randomString(7)),
+ "JudgeFirstName" -> (Common.randomString(4) + "judgefirst"),
+ "JudgeLastName" -> (Common.randomString(4) + "judgeLast"),
+ "PRLAppDobDay" -> Common.getDay(),
+ "PRLAppDobMonth" -> Common.getMonth(),
+ "todayDate" -> Common.getDate(),
+ "LegalAdviserName" -> (Common.randomString(4) + " " + Common.randomString(4) + "legAdv")))
+
+ /*======================================================================================
+ * Open Case
+ ======================================================================================*/
+
+ /*.exec(http("XUI_PRL_FL401Progress_130_SelectCase")
+ .get(BaseURL + "/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .check(jsonPath("$.tabs[6].fields[0].value.firstName").saveAs("ApplicantFirstName"))
+ .check(jsonPath("$.tabs[6].fields[0].value.lastName").saveAs("ApplicantLastName"))
+ .check(jsonPath("$.tabs[6].fields[1].value.firstName").saveAs("RespondentFirstName"))
+ .check(jsonPath("$.tabs[6].fields[1].value.lastName").saveAs("RespondentLastName"))
+ .check(jsonPath("$.case_id").is("#{caseId}")))
+
+ .pause(MinThinkTime, MaxThinkTime)*/
+
+ /*======================================================================================
+ * Click on 'Manage Orders'
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_140_ManageOrders") {
+ exec(http("XUI_PRL_FL401Progress_140_005_ManageOrders")
+ .get(BaseURL + "/data/internal/cases/#{caseId}/event-triggers/manageOrders?ignore-warning=false")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.id").is("manageOrders")))
+
+ .exec(Common.userDetails)
+ }
+ //.exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).saveAs("XSRFToken")))
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Create an Order
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_150_CreateOrder") {
+ exec(http("XUI_PRL_FL401Progress_150_005_CreateOrder")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders1")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLCreateOrder.json"))
+ .check(substring("isSdoSelected")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select Order - Blank Order
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_160_SelectOrder") {
+ exec(http("XUI_PRL_FL401Progress_160_005_SelectOrder")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401//PRLSelectOrderFL401.json"))
+ .check(jsonPath("$.data.ordersHearingDetails[0].id").saveAs("hearingDetailsID"))
+ .check(substring("caApplicant3InternalFlags")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order Details
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_170_OrderDetails") {
+ exec(http("XUI_PRL_FL401Progress_170_005_OrderDetails")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders5")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLOrderDetailsFL401.json"))
+ .check(substring("isEngDocGen")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Hearing Outcome
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_180_HearingOutcome") {
+ exec(http("XUI_PRL_FL401Progress_180_005_HearingOutcome")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders12")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLHearingOutcome.json"))
+ .check(jsonPath("$.data.previewOrderDoc.document_url").saveAs("document_url"))
+ .check(jsonPath("$.data.previewOrderDoc.document_hash").saveAs("document_hash"))
+ .check(substring("OrgPolicyCaseAssignedRole")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Hearing Type
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_190_HearingType") {
+ exec(http("XUI_PRL_FL401Progress_190_HearingType")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders19")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLHearingType.json"))
+ .check(jsonPath("$.data.previewOrderDoc.document_url").saveAs("document_url"))
+ .check(jsonPath("$.data.previewOrderDoc.document_filename").saveAs("document_filename"))
+ .check(jsonPath("$.data.previewOrderDoc.document_hash").saveAs("document_hash"))
+ .check(jsonPath("$.data.ordersHearingDetails[0].id").saveAs("hearingId"))
+ .check(substring("previewOrderDoc")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Check Your Order
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_200_CheckYourOrder") {
+ exec(http("XUI_PRL_FL401Progress_200_005_CheckYourOrder")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders20")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLCheckOrderFL401.json"))
+ .check(substring("previewOrderDoc")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order Recipients
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_210_OrderRecipients") {
+ exec(http("XUI_PRL_FL401Progress_210_005_OrderRecipients")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders24")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLOrderRecipientsFL401.json"))
+ .check(substring("amendOrderSelectCheckOptions")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order Serve
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_220_OrderServe") {
+ exec(http("XUI_PRL_FL401Progress_220_005_OrderServe")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders26")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLOrderServeFL401.json"))
+ .check(jsonPath("$.data.serveOrderDynamicList.value[0].code").saveAs("orderCode"))
+ .check(jsonPath("$.data.serveOrderDynamicList.value[0].label").saveAs("orderLabel"))
+ .check(substring("orderRecipients")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order To Serve List
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_230_OrderServe") {
+ exec(http("XUI_PRL_FL401Progress_230_005_OrderToServeList")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders27")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLOrderToServeListFL401.json"))
+ .check(substring("orderWithoutGivingNoticeToRespondent")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Serve to Respondent Options
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_240_ServeToRespondentOptions") {
+ exec(http("XUI_PRL_FL401Progress_240_005_ServeToRespondentOptions")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=manageOrders28")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLOrderToServeRespondentOptionsFL401.json"))
+ .check(substring("submitCountyCourtSelection")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Order Submit
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_250_OrderSubmit") {
+ exec(http("XUI_PRL_FL401Progress_250_005_OrderSubmit")
+ .post(BaseURL + "/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLOrderSubmitFL401.json"))
+ .check(substring("JUDICIAL_REVIEW")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val CourtAdminServiceApplication =
+
+ /*======================================================================================
+ * Click on 'Service of Application'
+ ======================================================================================*/
+
+ group("XUI_PRL_FL401Progress_260_ServiceOfApplication") {
+ exec(http("XUI_PRL_FL401Progress_260_005_ServiceOfApplication")
+ .get(BaseURL + "/data/internal/cases/#{caseId}/event-triggers/serviceOfApplication?ignore-warning=false")
+ .headers(Headers.navigationHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[7].value.list_items[0].code")saveAs("serviceOfApplicationScreenCode"))
+ .check(jsonPath("$.case_fields[7].value.list_items[0].label")saveAs("serviceOfApplicationScreenLabel"))
+ .check(jsonPath("$.id").is("serviceOfApplication")))
+
+ .exec(http("XUI_Common_000_UserDetails")
+ .get("/api/user/details?refreshRoleAssignments=undefined")
+ .headers(Headers.commonHeader)
+ .header("Cache-Control", "no-cache")
+ .header("Pragma", "no-cache")
+ .header("accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.roleAssignmentInfo[0].primaryLocation")saveAs("locationId"))
+ .check(status.in(200)))
+
+ }
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Safe Of Notice letter Upload
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_270_SoNUpload") {
+ exec(http("XUI_PRL_FL401Progress_270_005_SoNUpload")
+ .post(BaseURL + "/documentsv2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .bodyPart(RawFileBodyPart("files", "120KB.pdf")
+ .fileName("120KB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(substring("originalDocumentName"))
+ .check(jsonPath("$.documents[0].hashToken").saveAs("documentHashSoN"))
+ .check(jsonPath("$.documents[0]._links.self.href").saveAs("DocumentURLSoN")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Service of Application document uploads
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_280_DocumentUpload") {
+ exec(http("XUI_PRL_FL401Progress_280_005_DocumentUpload")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=serviceOfApplication2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLSoADocumentsFL401.json"))
+ .check(substring("additionalDocuments")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Service of Application Confirm recipients
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_290_ServiceRecipients") {
+ exec(http("XUI_PRL_FL401Progress_290_005_ServiceRecipients")
+ .post(BaseURL + "/data/case-types/PRLAPPS/validate?pageId=serviceOfApplication4")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLSoARecipientsFL401.json"))
+ .check(substring("soaServingRespondents")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Service of Application Submit
+ ======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_300_ServiceSubmit") {
+ exec(http("XUI_PRL_FL401Progress_300_005_ServiceSubmit")
+ .post(BaseURL + "/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLSoASubmitFL401.json"))
+ .check(jsonPath("$.data.caseInvites[0].value.accessCode").saveAs("prlAccessCodeApplicant"))
+ .check(jsonPath("$.data.caseInvites[1].value.accessCode").saveAs("prlAccessCodeRespondent"))
+ .check(jsonPath("$.data.respondentsFL401.partyId").saveAs("respondentPartyId"))
+ .check(jsonPath("$.data.respondentsFL401.solicitorPartyId").saveAs("respondentSolicitorPartyId"))
+ .check(jsonPath("$.data.applicantsFL401.partyId").saveAs("applicantPartyId"))
+ .check(jsonPath("$.data.applicantsFL401.solicitorPartyId").saveAs("applicantSolicitorPartyId"))
+ .check(jsonPath("$.data.applicantsFL401.solicitorOrgUuid").saveAs("solicitorOrgId"))
+ .check(status.is(201)))
+ }
+
+ val CourtAdminListHearing =
+
+/*======================================================================================
+* Click the Hearing Tab
+======================================================================================*/
+
+ group("XUI_PRL_FL401Progress_310_HearingsTab") {
+ exec(http("XUI_PRL_FL401Progress_310_005_HearingsTab")
+ .get("/api/hearings/getHearings?caseId=#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_FL401Progress_310_010_GetHearingsJurisdiction")
+ .post("/api/hearings/loadServiceHearingValues?jurisdictionId=PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(StringBody("""{"caseReference":"#{caseId}"}"""))
+ .check(substring("hearing-facilities")))
+
+ .exec(http("XUI_PRL_FL401Progress_310_015_GetHearingTypes")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingType&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingType")))
+
+ .exec(Common.caseActivityPost)
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+/*======================================================================================
+* Select Request a Hearing
+=======================================================================================*/
+
+ .group("XUI_PRL_FL401Progress_320_RequestHearing") {
+
+ exec(Common.caseActivityPost)
+ .exec(Common.isAuthenticated)
+
+ .exec(http("XUI_PRL_FL401Progress_320_005_GetCaseFlag")
+ .get("/api/prd/caseFlag/getCaseFlagRefData?serviceId=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+ .exec(http("XUI_PRL_FL401Progress_320_010_LocationById")
+ .get("/api/prd/location/getLocationById?epimms_id=#{locationId}&serviceCode=null") //*CORELE
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+/*======================================================================================
+* Navigate through hearing screens and submit hearing request
+=======================================================================================*/
+
+ .exec(http("XUI_PRL_FL401Progress_330_GetCaseFlag")
+ .get("/api/prd/caseFlag/getCaseFlagRefData?serviceId=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(http("XUI_PRL_FL401Progress_340_GetHearingChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingChannel&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingChannel")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(http("XUI_PRL_FL401Progress_350_LocationByIdServiceCode")
+ .get("/api/prd/location/getLocationById?epimms_id=#{locationId}&serviceCode=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(http("XUI_PRL_FL401Progress_360_GetHearingChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=JudgeType&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("JudgeType")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .exec(http("XUI_PRL_FL401Progress_370_GetHearingChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingPriority&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingPriority")))
+
+ .group("XUI_PRL_FL401Progress_380_ListHearing") {
+ exec(http("XUI_PRL_FL401Progress_380_005_LoadServiceLinkedCases")
+ .post("/api/hearings/loadServiceLinkedCases?jurisdictionId=PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(StringBody("""{"caseReference":"#{caseId}","hearingId": ""}"""))
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_FL401Progress_380_010_CaseLinkingReasonCode")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingPriority&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingPriority")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_FL401Progress_390_ListHearing") {
+ exec(http("XUI_PRL_FL401Progress_390_005_GetCaseFlag")
+ .get("/api/prd/caseFlag/getCaseFlagRefData?serviceId=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+
+ .exec(http("XUI_PRL_FL401Progress_390_010_GetHearingChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingChannel&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingChannel")))
+
+ .exec(http("XUI_PRL_FL401Progress_390_015_GetHearingSubChannel")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingSubChannel&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingSubChannel")))
+
+ .exec(http("XUI_PRL_FL401Progress_390_020_LocationByIdServiceCode")
+ .get("/api/prd/location/getLocationById?epimms_id=#{locationId}&serviceCode=ABA5")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.in(200, 304)))
+
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+/*======================================================================================
+* Submit hearing request
+=======================================================================================*/
+
+ .exec(http("XUI_PRL_FL401Progress_400_SubmitHearingRequest")
+ .post("/api/hearings/submitHearingRequest")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/fl401/PRLFL401SubmitHearing.json"))
+ .check(jsonPath("$.hearingRequestID").saveAs("hearingRequestId"))
+ .check(status.is(201)))
+
+ //.exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).saveAs("XSRFToken")))
+ //.exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+val CourtAdminHearingsTab =
+
+ /*======================================================================================
+ * Click on the Hearings tab to view any Hearings
+ ======================================================================================*/
+
+ /*======================================================================================
+ * Click on the Hearings tab to view any Hearings
+ ======================================================================================*/
+
+ group("XUI_PRL_FL401Progress_410_HearingsTab") {
+ exec(http("XUI_PRL_FL401_410_005_HearingsTab")
+ .get(BaseURL + "/cases/case-details/#{caseId}/hearings")
+ .headers(Headers.commonHeader)
+ .check(status.is(200)))
+
+ .exec(Common.configUI)
+ .exec(Common.userDetails)
+ .exec(Common.isAuthenticated)
+
+ .exec(http("XUI_PRL_FL401Progress_410_010_HearingsTabGetCaseData")
+ .get("/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.is(200)))
+
+ .exec(Common.monitoringTools)
+ .exec(Common.manageLabellingRoleAssignment)
+ .exec(Common.waJurisdictions)
+
+ .exec(http("XUI_PRL_FL401Progress_410_015_HearingsTabCaseWorkerJurisdictions")
+ .get("/aggregated/caseworkers/:uid/jurisdictions?access=read")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(status.is(200)))
+
+ .exec(Common.activity)
+
+ .exec(http("XUI_PRL_FL401Progress_410_020_HearingsTabGetHearings")
+ .get("/api/hearings/getHearings?caseId=#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("LISTED"))
+ .check(status.is(200)))
+
+ .exec(http("XUI_PRL_FL401Progress_410_025_HearingsTabLoadHearingValues")
+ .post("/api/hearings/loadServiceHearingValues?jurisdictionId=PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(StringBody("""{"caseReference":"#{caseId}"}"""))
+ .check(substring("hearing-facilities")))
+
+ .exec(http("XUI_PRL_FL401Progress_410_030_GetHearingTypes")
+ .get("/api/prd/lov/getLovRefData?categoryId=HearingType&serviceId=ABA5&isChildRequired=N")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("HearingType")))
+
+ .exec(Common.caseActivityPost)
+ }
+ .pause(MinThinkTime, MaxThinkTime)
+
+
+ val ServiceOfApplicationFL401 =
+
+ /*======================================================================================
+ * Run ServiceOfApplication task
+ ======================================================================================*/
+
+ group("XUI_PRL_FL401progress_400_010_ServiceOfApplicationPrivateLaw") {
+ exec(http("XUI_PRL_FL401progress_400_010_ServiceOfApplicationPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminAddBarrister/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_FL401progress_400_020_ServiceOfApplicationTask_EventTrigger") {
+ exec(http("XUI_PRL_FL401progress_400_020_ServiceOfApplicationTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/serviceOfApplication?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.case_fields[7].value.list_items[0].code").saveAs("appCodeOrder1"))
+ .check(jsonPath("$.case_fields[7].value.list_items[0].label").saveAs("appLabelOrder1"))
+ .check(jsonPath("$.case_fields[30].value.list_items[0].code").saveAs("appCode1"))
+ .check(jsonPath("$.case_fields[30].value.list_items[0].label").saveAs("appLabel1"))
+ .check(jsonPath("$.case_fields[30].value.list_items[1].code").saveAs("appCode2"))
+ .check(jsonPath("$.case_fields[30].value.list_items[1].label").saveAs("appLabel2"))
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(substring("Event to serve the parties"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Document Upload
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_200_030_ServiceOfApplicationTask_Upload") {
+ exec(http("XUI_PRL_FL401progress_200_030_ServiceOfApplicationTask_Upload")
+ .post("/documents")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .bodyPart(RawFileBodyPart("files", "120KB.pdf")
+ .fileName("120KB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(jsonPath("$._embedded.documents[0]._links.self.href").saveAs("document_url"))
+ .check(substring("originalDocumentName"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select the Draft Order
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_400_040_ServiceOfApplicationDetails") {
+ exec(http("XUI_PRL_FL401progress_400_040_ServiceOfApplicationDetails")
+ .post("/data/case-types/PRLAPPS/validate?pageId=serviceOfApplication2")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLServiceOfApplicationDetails.json"))
+ .check(substring("serviceOfApplicationHeader"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Enter final decision details
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_400_040_ServiceOfApplicationDetailsSubmit") {
+ exec(http("XUI_PRL_FL401progress_400_040_ServiceOfApplicationDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=serviceOfApplication4")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLServiceOfApplicationDetailsSubmit.json"))
+ .check(substring("FPRL Child Arrangements"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * ServiceOfApplication Event
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_400_050_ServiceOfApplicationEvent") {
+ exec(http("XUI_PRL_FL401progress_400_050_ServiceOfApplicationEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLServiceOfApplicationEvent.json"))
+ .check(substring("I understand that proceedings for contempt of court"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val FinalDecisionFL401 =
+
+ /*======================================================================================
+ * Run recordFinalDecision task
+ ======================================================================================*/
+
+ group("XUI_PRL_FL401progress_500_010_FinalOrderPrivateLaw") {
+ exec(http("XUI_PRL_FL401progress_500_010_FinalOrderPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminAddBarrister/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_FL401progress_500_020_FinalOrderTask_EventTrigger") {
+ exec(http("XUI_PRL_FL401progress_500_020_FinalOrderTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/recordFinalDecision?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(substring("Record final decision"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Upload Doc
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_500_030_FinalOrderTask_Upload") {
+ exec(http("XUI_PRL_FL401progress_500_030_FinalOrderTask_Upload")
+ .post("/documents")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .bodyPart(RawFileBodyPart("files", "120KB.pdf")
+ .fileName("120KB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "PRLAPPS")
+ .formParam("jurisdictionId", "PRIVATELAW")
+ .check(jsonPath("$._embedded.documents[0]._links.self.href").saveAs("document_url"))
+ .check(substring("originalDocumentName"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select final order
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_500_040_FinalOrderDetails") {
+ exec(http("XUI_PRL_FL401progress_500_040_FinalOrderDetails")
+ .post("/data/case-types/PRLAPPS/validate?pageId=recordFinalDecision1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLFinalOrder.json"))
+ .check(substring("fl401UploadWitnessDocuments"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Enter final order details
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_500_040_FinalOrderDetailsSubmit") {
+ exec(http("XUI_PRL_FL401progress_500_040_FinalOrderDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=recordFinalDecision2")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLFinalOrderDetails.json"))
+ .check(substring("solicitorRepresented"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Final order Event
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_500_050_FinalOrderEvent") {
+ exec(http("XUI_PRL_FL401progress_500_050_FinalOrderEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLFinalOrderEvent.json"))
+ .check(substring("ALL_FINAL_ORDERS_ISSUED"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+}
+
+//Write applicant access code to file
+ // .exec { session =>
+ // val fw = new BufferedWriter(new FileWriter("FL401caseNumberAndCodeApplicant.csv", true))
+ // try {
+ // fw.write(session("caseId").as[String] + "," + session("prlAccessCodeApplicant").as[String] + "\r\n")
+ // } finally fw.close()
+ // session
+ // }
+ // //Write respondent access code to file
+ // .exec { session =>
+ // val fw = new BufferedWriter(new FileWriter("FL401caseNumberAndCodeRespondent.csv", true))
+ // try {
+ // fw.write(session("caseId").as[String] + "," + session("prlAccessCodeRespondent").as[String] + "\r\n")
+ // } finally fw.close()
+ // session
+ // }
+
+// -- ADD HEARINGS NAVIGATION AND ADD HEARING
\ No newline at end of file
diff --git a/src/gatling/simulations/scenarios/ListHearingLA.scala b/src/gatling/simulations/scenarios/ListHearingLA.scala
new file mode 100644
index 00000000..47f646d7
--- /dev/null
+++ b/src/gatling/simulations/scenarios/ListHearingLA.scala
@@ -0,0 +1,86 @@
+package scenarios
+
+import com.typesafe.config.ConfigFactory
+import io.gatling.core.Predef._
+import io.gatling.http.Predef._
+import utils.{Common,Environment}
+
+object ListHearingLA {
+
+ val RpeAPIURL = Environment.rpeAPIURL
+ val IdamAPIURL = Environment.idamAPIURL
+ val HmcInboundURL = Environment.hmcInboundURL
+
+ val MinThinkTime = Environment.minThinkTime
+ val MaxThinkTime = Environment.maxThinkTime
+
+ val clientSecret = ConfigFactory.load.getString("auth.clientSecretHmcInbound")
+
+ // must be "prl", "example" or "any"
+ def Auth(jurisdiction: String) =
+
+ exec(session => jurisdiction match {
+ case "prl" => session.set("username", "prl_pt_ca_swansea@justice.gov.uk").set("password", "Nagoya0102")
+ case "example" => session.set("username", "ccdloadtest-la@gmail.com").set("password", "Password12")
+ case "any" => session.set("username", session("user").as[String]).set("password", session("password").as[String])
+ })
+
+ //set session variables
+ .exec(_.setAll(
+ "LARandomString" -> Common.randomString(7),
+ "LARandomNumber" -> Common.randomNumber(5),
+ "futureDate" -> Common.getFutureDate(),
+ "todayDate" -> Common.getDate()))
+
+ .exec(http("XUI_000_Auth")
+ .post(RpeAPIURL + "/testing-support/lease")
+ .body(StringBody("""{"microservice":"api_gw"}""")).asJson
+ .check(regex("(.+)").saveAs("authToken")))
+
+ .pause(1)
+
+ .exec(http("XUI_000_GetBearerToken")
+ .post(IdamAPIURL + "/o/token")
+ .formParam("grant_type", "password")
+ .formParam("username", "#{username}")
+ .formParam("password", "#{password}")
+ .formParam("client_id", "hmc_hmi_inbound_adapter")
+ .formParam("client_secret", clientSecret)
+ .formParam("scope", "openid profile roles openid roles profile")
+ .header("Content-Type", "application/x-www-form-urlencoded")
+ .check(jsonPath("$.access_token").saveAs("bearerToken")))
+
+ .pause(1)
+
+ val ListHearingFL401 =
+
+ exec(Auth("any"))
+
+ .exec(http("LA_000_ListHearing")
+ .put(HmcInboundURL + "/listings/#{hearingRequestId}")
+ .header("Authorization", "Bearer #{bearerToken}")
+ .header("ServiceAuthorization", "#{authToken}")
+ .header("Content-Type", "application/json")
+ .header("Accept","*/*")
+ .header("Accept-Encoding","gzip, deflate, br")
+ .body(ElFileBody("bodies/la/ListHearingFl401.json"))
+ .check(status.is(202)))
+
+ .pause(1)
+
+ val ListHearingC100 =
+
+ exec(Auth("any"))
+
+ .exec(http("LA_000_ListHearing")
+ .put(HmcInboundURL + "/listings/#{hearingRequestId}")
+ .header("Authorization", "Bearer #{bearerToken}")
+ .header("ServiceAuthorization", "#{authToken}")
+ .header("Content-Type", "application/json")
+ .header("Accept","*/*")
+ .header("Accept-Encoding","gzip, deflate, br")
+ .body(ElFileBody("bodies/la/ListHearingC100.json"))
+ .check(status.is(202)))
+
+ .pause(1)
+}
\ No newline at end of file
diff --git a/src/gatling/simulations/scenarios/Solicitor_FR.scala b/src/gatling/simulations/scenarios/Solicitor_FR.scala
new file mode 100644
index 00000000..2b752209
--- /dev/null
+++ b/src/gatling/simulations/scenarios/Solicitor_FR.scala
@@ -0,0 +1,323 @@
+package scenarios
+
+import io.gatling.core.Predef._
+import io.gatling.http.Predef._
+import utils.{Common, Environment, Headers}
+
+/*======================================================================================
+* Create a new FR application as a professional user (e.g. solicitor) for a specified Divorce case
+======================================================================================*/
+
+object Solicitor_FR {
+
+ val BaseURL = Environment.baseURL
+
+ val MinThinkTime = Environment.minThinkTime
+ val MaxThinkTime = Environment.maxThinkTime
+
+ /*======================================================================================
+ * Click the Create Case link
+ ======================================================================================*/
+
+ val CreateFRCase =
+
+ group("XUI_FR_030_CreateCase") {
+ exec(http("XUI_FR_030_CreateCase")
+ .get("/aggregated/caseworkers/:uid/jurisdictions?access=create")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json")
+ .check(substring("DIVORCE")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Jurisdiction = Family Divorce; Case Type = Financial Rem Consented Resp; Event = Consent Order Application
+ ======================================================================================*/
+
+ .group("XUI_FR_040_SelectCaseType") {
+ exec(http("XUI_FR_040_005_StartApplication")
+ .get("/data/internal/case-types/FinancialRemedyMVP2/event-triggers/FR_solicitorCreate?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-case-trigger.v2+json;charset=UTF-8")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.id").is("FR_solicitorCreate")))
+
+ .exec(Common.profile)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Click Continue
+ ======================================================================================*/
+
+ .group("XUI_FR_050_ContinueToApplication") {
+ exec(http("XUI_FR_050_005_ContinueToApplication")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate1")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FRContinueToApplication.json"))
+ .check(jsonPath("$.data.solicitorFirm").saveAs("firmName"))
+ .check(jsonPath("$.data.solicitorReference").saveAs("firmRef"))
+ .check(jsonPath("$.data.solicitorAddress.AddressLine1").saveAs("firmAddress1"))
+ .check(jsonPath("$.data.solicitorAddress.AddressLine2").saveAs("firmAddress2"))
+ .check(jsonPath("$.data.solicitorAddress.AddressLine3").saveAs("firmAddress3"))
+ .check(jsonPath("$.data.solicitorAddress.PostTown").saveAs("firmPostTown"))
+ .check(jsonPath("$.data.solicitorAddress.County").saveAs("firmCounty"))
+ .check(jsonPath("$.data.solicitorAddress.PostCode").saveAs("firmPostcode")))
+
+ //select applicant and respondent solicitor orgs now, as this call will be retrieved from cache in future
+ //requests, where checks aren't performed by Gatling https://gatling.io/docs/gatling/reference/current/http/protocol/#caching
+ .exec(http("XUI_FR_050_010_GetOrgs")
+ .get("/api/caseshare/orgs")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .check(regex(""""name":"(.+?)","organisationIdentifier":"([0-9A-Z]+?)"""").ofType[(String, String)].findRandom.saveAs("applicantOrgs"))
+ .check(regex(""""name":"(.+?)","organisationIdentifier":"([0-9A-Z]+?)"""").ofType[(String, String)].findRandom.saveAs("respondentOrgs")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Complete Solicitor details (some are pre-populated) and click Continue
+ ======================================================================================*/
+
+ .group("XUI_FR_060_AddSolicitorDetails") {
+ exec(http("XUI_FR_060_005_AddSolicitorDetails")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FRAddSolicitorDetails.json"))
+ .check(substring("solicitorAgreeToReceiveEmails")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Complete Divorce case details (FamilyMan code = EZ12D91234) and click Continue
+ ======================================================================================*/
+
+ .group("XUI_FR_070_AddDivorceCaseDetails") {
+ exec(http("XUI_FR_070_005_AddDivorceCaseDetails")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate3")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FRAddDivorceCaseDetails.json"))
+ .check(jsonPath("$.data.divorceStageReached").is("Petition Issued")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Enter the Applicant's details and click Continue
+ ======================================================================================*/
+
+ .group("XUI_FR_080_AddApplicantDetails") {
+ exec(http("XUI_FR_080_005_AddApplicantDetails")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate4")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FRAddApplicantDetails.json"))
+ .check(jsonPath("$.data.applicantFMName").is("ApplicantPerf")))
+
+ .exec(http("XUI_FR_080_010_GetOrgs")
+ .get("/api/caseshare/orgs")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*"))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Postcode Lookup for Respondent's Solicitor
+ ======================================================================================*/
+
+ .exec(Common.postcodeLookup)
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Enter the Respondent's details and click Continue
+ ======================================================================================*/
+
+ .group("XUI_FR_090_AddRespondentDetails") {
+ exec(http("XUI_FR_090_005_AddRespondentDetails")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate5")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FRAddRespondentDetails.json"))
+ .check(jsonPath("$.data.appRespondentRep").is("Yes")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select Lump Sum Order as the Nature of the Application and click Continue
+ ======================================================================================*/
+
+ .group("XUI_FR_100_AddNatureOfApplication") {
+ exec(http("XUI_FR_100_005_AddNatureOfApplication")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate6")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/AddNatureOfApplication.json"))
+ .check(jsonPath("$.data.natureOfApplication2[0]").is("Lump Sum Order")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Upload Consent Order PDF
+ ======================================================================================*/
+
+ .group("XUI_FR_110_UploadConsentOrder") {
+ exec(http("XUI_FR_110_005_UploadConsentOrder")
+ .post("/documentsv2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .bodyPart(RawFileBodyPart("files", "3MB.pdf")
+ .fileName("3MB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "FinancialRemedyMVP2")
+ .formParam("jurisdictionId", "DIVORCE")
+ .check(substring("originalDocumentName"))
+ .check(jsonPath("$.documents[0].hashToken").saveAs("ConsentOrderDocumentHash"))
+ .check(jsonPath("$.documents[0]._links.self.href").saveAs("ConsentOrderDocumentURL")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Click Continue to submit Consent Order document
+ ======================================================================================*/
+
+ .group("XUI_FR_120_SubmitConsentOrderDocument") {
+ exec(http("XUI_FR_120_005_SubmitConsentOrderDocument")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate8")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FRSubmitConsentOrderDocument.json")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Select Yes to Uploading a Joint D81 and upload the D81 PDF
+ ======================================================================================*/
+
+ .group("XUI_FR_130_UploadJointD81") {
+ exec(http("XUI_FR_130_005_UploadJointD81")
+ .post("/documentsv2")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*")
+ .header("content-type", "multipart/form-data")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .bodyPart(RawFileBodyPart("files", "3MB.pdf")
+ .fileName("3MB.pdf")
+ .transferEncoding("binary"))
+ .asMultipartForm
+ .formParam("classification", "PUBLIC")
+ .formParam("caseTypeId", "FinancialRemedyMVP2")
+ .formParam("jurisdictionId", "DIVORCE")
+ .check(substring("originalDocumentName"))
+ .check(jsonPath("$.documents[0].hashToken").saveAs("D81DocumentHash"))
+ .check(jsonPath("$.documents[0]._links.self.href").saveAs("D81DocumentURL")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Click Continue to submit D81 document
+ ======================================================================================*/
+
+ .group("XUI_FR_140_SubmitD81Document") {
+ exec(http("XUI_FR_140_005_SubmitD81Document")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate9")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FRSubmitD81Document.json")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Other Documents - click Continue
+ ======================================================================================*/
+
+ .group("XUI_FR_150_OtherDocuments") {
+ exec(http("XUI_FR_150_005_OtherDocuments")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate11")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FROtherDocuments.json"))
+ .check(substring("ApplicantOrganisationPolicy")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Consent Order Application - click Continue
+ ======================================================================================*/
+
+ .group("XUI_FR_160_ContinueToCheckYourAnswers") {
+ exec(http("XUI_FR_160_005_ContinueToCheckYourAnswers")
+ .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate12")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FRContinueToCheckYourAnswers.json"))
+ .check(substring(""""data":{}""")))
+
+ .exec(http("XUI_FR_160_010_GetOrgs")
+ .get("/api/caseshare/orgs")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*"))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Review Application - click Submit
+ ======================================================================================*/
+
+ .group("XUI_FR_170_SubmitApplication") {
+ exec(http("XUI_FR_170_005_SubmitApplication")
+ .post("/data/case-types/FinancialRemedyMVP2/cases?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/fr/FRSubmitApplication.json"))
+ .check(jsonPath("$.state").is("caseAdded"))
+ .check(jsonPath("$.id").saveAs("caseId")))
+
+ .exec(http("XUI_FR_170_010_ViewCase")
+ .get("/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json")
+ .check(jsonPath("$.state.id").is("caseAdded")))
+
+ .exec(http("XUI_FR_170_015_GetOrgs")
+ .get("/api/caseshare/orgs")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/json, text/plain, */*"))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+}
\ No newline at end of file
diff --git a/src/gatling/simulations/scenarios/Solicitor_FR_Consented.scala b/src/gatling/simulations/scenarios/Solicitor_FR_Consented.scala
deleted file mode 100644
index 418bc313..00000000
--- a/src/gatling/simulations/scenarios/Solicitor_FR_Consented.scala
+++ /dev/null
@@ -1,323 +0,0 @@
-package scenarios
-
-import io.gatling.core.Predef._
-import io.gatling.http.Predef._
-import utils.{Common, Environment, Headers}
-
-/*======================================================================================
-* Create a new FR application as a professional user (e.g. solicitor) for a specified Divorce case
-======================================================================================*/
-
-object Solicitor_FR_Consented {
-
- val BaseURL = Environment.baseURL
-
- val MinThinkTime = Environment.minThinkTime
- val MaxThinkTime = Environment.maxThinkTime
-
- /*======================================================================================
- * Click the Create Case link
- ======================================================================================*/
-
- val CreateFRCase =
-
- group("XUI_FR_Consented_030_CreateCase") {
- exec(http("XUI_FR_Consented_030_CreateCase")
- .get("/aggregated/caseworkers/:uid/jurisdictions?access=create")
- .headers(Headers.commonHeader)
- .header("accept", "application/json")
- .check(substring("DIVORCE")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Jurisdiction = Family Divorce; Case Type = Financial Rem Consented Resp; Event = Consent Order Application
- ======================================================================================*/
-
- .group("XUI_FR_Consented_040_SelectCaseType") {
- exec(http("XUI_FR_Consented_040_005_StartApplication")
- .get("/data/internal/case-types/FinancialRemedyMVP2/event-triggers/FR_solicitorCreate?ignore-warning=false")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-case-trigger.v2+json;charset=UTF-8")
- .check(jsonPath("$.event_token").saveAs("event_token"))
- .check(jsonPath("$.id").is("FR_solicitorCreate")))
-
- .exec(Common.profile)
-
- .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Consented_050_ContinueToApplication") {
- exec(http("XUI_FR_Consented_050_005_ContinueToApplication")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate1")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FRContinueToApplication.json"))
- .check(jsonPath("$.data.solicitorFirm").saveAs("firmName"))
- .check(jsonPath("$.data.solicitorReference").saveAs("firmRef"))
- .check(jsonPath("$.data.solicitorAddress.AddressLine1").saveAs("firmAddress1"))
- .check(jsonPath("$.data.solicitorAddress.AddressLine2").saveAs("firmAddress2"))
- .check(jsonPath("$.data.solicitorAddress.AddressLine3").saveAs("firmAddress3"))
- .check(jsonPath("$.data.solicitorAddress.PostTown").saveAs("firmPostTown"))
- .check(jsonPath("$.data.solicitorAddress.County").saveAs("firmCounty"))
- .check(jsonPath("$.data.solicitorAddress.PostCode").saveAs("firmPostcode")))
-
- //select applicant and respondent solicitor orgs now, as this call will be retrieved from cache in future
- //requests, where checks aren't performed by Gatling https://gatling.io/docs/gatling/reference/current/http/protocol/#caching
- .exec(http("XUI_FR_Consented_050_010_GetOrgs")
- .get("/api/caseshare/orgs")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*")
- .check(regex(""""name":"(.+?)","organisationIdentifier":"([0-9A-Z]+?)"""").ofType[(String, String)].findRandom.saveAs("applicantOrgs"))
- .check(regex(""""name":"(.+?)","organisationIdentifier":"([0-9A-Z]+?)"""").ofType[(String, String)].findRandom.saveAs("respondentOrgs")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Complete Solicitor details (some are pre-populated) and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Consented_060_AddSolicitorDetails") {
- exec(http("XUI_FR_Consented_060_005_AddSolicitorDetails")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate2")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FRAddSolicitorDetails.json"))
- .check(substring("solicitorAgreeToReceiveEmails")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Complete Divorce case details (FamilyMan code = EZ12D91234) and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Consented_070_AddDivorceCaseDetails") {
- exec(http("XUI_FR_Consented_070_005_AddDivorceCaseDetails")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate3")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FRAddDivorceCaseDetails.json"))
- .check(jsonPath("$.data.divorceStageReached").is("Petition Issued")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Enter the Applicant's details and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Consented_080_AddApplicantDetails") {
- exec(http("XUI_FR_Consented_080_005_AddApplicantDetails")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate4")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FRAddApplicantDetails.json"))
- .check(jsonPath("$.data.applicantFMName").is("ApplicantPerf")))
-
- .exec(http("XUI_FR_Consented_080_010_GetOrgs")
- .get("/api/caseshare/orgs")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*"))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Postcode Lookup for Respondent's Solicitor
- ======================================================================================*/
-
- .exec(Common.postcodeLookup)
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Enter the Respondent's details and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Consented_090_AddRespondentDetails") {
- exec(http("XUI_FR_Consented_090_005_AddRespondentDetails")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate5")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FRAddRespondentDetails.json"))
- .check(jsonPath("$.data.appRespondentRep").is("Yes")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Select Lump Sum Order as the Nature of the Application and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Consented_100_AddNatureOfApplication") {
- exec(http("XUI_FR_Consented_100_005_AddNatureOfApplication")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate6")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/AddNatureOfApplication.json"))
- .check(jsonPath("$.data.natureOfApplication2[0]").is("Lump Sum Order")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Upload Consent Order PDF
- ======================================================================================*/
-
- .group("XUI_FR_Consented_110_UploadConsentOrder") {
- exec(http("XUI_FR_Consented_110_005_UploadConsentOrder")
- .post("/documentsv2")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*")
- .header("content-type", "multipart/form-data")
- .header("x-xsrf-token", "#{XSRFToken}")
- .bodyPart(RawFileBodyPart("files", "3MB.pdf")
- .fileName("3MB.pdf")
- .transferEncoding("binary"))
- .asMultipartForm
- .formParam("classification", "PUBLIC")
- .formParam("caseTypeId", "FinancialRemedyMVP2")
- .formParam("jurisdictionId", "DIVORCE")
- .check(substring("originalDocumentName"))
- .check(jsonPath("$.documents[0].hashToken").saveAs("ConsentOrderDocumentHash"))
- .check(jsonPath("$.documents[0]._links.self.href").saveAs("ConsentOrderDocumentURL")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Click Continue to submit Consent Order document
- ======================================================================================*/
-
- .group("XUI_FR_Consented_120_SubmitConsentOrderDocument") {
- exec(http("XUI_FR_Consented_120_005_SubmitConsentOrderDocument")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate8")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FRSubmitConsentOrderDocument.json")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Select Yes to Uploading a Joint D81 and upload the D81 PDF
- ======================================================================================*/
-
- .group("XUI_FR_Consented_130_UploadJointD81") {
- exec(http("XUI_FR_Consented_130_005_UploadJointD81")
- .post("/documentsv2")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*")
- .header("content-type", "multipart/form-data")
- .header("x-xsrf-token", "#{XSRFToken}")
- .bodyPart(RawFileBodyPart("files", "3MB.pdf")
- .fileName("3MB.pdf")
- .transferEncoding("binary"))
- .asMultipartForm
- .formParam("classification", "PUBLIC")
- .formParam("caseTypeId", "FinancialRemedyMVP2")
- .formParam("jurisdictionId", "DIVORCE")
- .check(substring("originalDocumentName"))
- .check(jsonPath("$.documents[0].hashToken").saveAs("D81DocumentHash"))
- .check(jsonPath("$.documents[0]._links.self.href").saveAs("D81DocumentURL")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Click Continue to submit D81 document
- ======================================================================================*/
-
- .group("XUI_FR_Consented_140_SubmitD81Document") {
- exec(http("XUI_FR_Consented_140_005_SubmitD81Document")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate9")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FRSubmitD81Document.json")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Other Documents - click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Consented_150_OtherDocuments") {
- exec(http("XUI_FR_Consented_150_005_OtherDocuments")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate11")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FROtherDocuments.json"))
- .check(substring("ApplicantOrganisationPolicy")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Consent Order Application - click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Consented_160_ContinueToCheckYourAnswers") {
- exec(http("XUI_FR_Consented_160_005_ContinueToCheckYourAnswers")
- .post("/data/case-types/FinancialRemedyMVP2/validate?pageId=FR_solicitorCreate12")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FRContinueToCheckYourAnswers.json"))
- .check(substring(""""data":{}""")))
-
- .exec(http("XUI_FR_Consented_160_010_GetOrgs")
- .get("/api/caseshare/orgs")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*"))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Review Application - click Submit
- ======================================================================================*/
-
- .group("XUI_FR_Consented_170_SubmitApplication") {
- exec(http("XUI_FR_Consented_170_005_SubmitApplication")
- .post("/data/case-types/FinancialRemedyMVP2/cases?ignore-warning=false")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/FRSubmitApplication.json"))
- .check(jsonPath("$.state").is("caseAdded"))
- .check(jsonPath("$.id").saveAs("caseId")))
-
- .exec(http("XUI_FR_Consented_170_010_ViewCase")
- .get("/data/internal/cases/#{caseId}")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json")
- .check(jsonPath("$.state.id").is("caseAdded")))
-
- .exec(http("XUI_FR_Consented_170_015_GetOrgs")
- .get("/api/caseshare/orgs")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*"))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
-}
\ No newline at end of file
diff --git a/src/gatling/simulations/scenarios/Solicitor_FR_Contested.scala b/src/gatling/simulations/scenarios/Solicitor_FR_Contested.scala
deleted file mode 100644
index 98fdfee6..00000000
--- a/src/gatling/simulations/scenarios/Solicitor_FR_Contested.scala
+++ /dev/null
@@ -1,451 +0,0 @@
-package scenarios
-
-import io.gatling.core.Predef._
-import io.gatling.http.Predef._
-import utilities.DateUtils
-import utils.{Common, Environment, Headers}
-
-/*======================================================================================
-* Create a new FR application as a professional user (e.g. solicitor) for a Contested Divorce case
-======================================================================================*/
-
-object Solicitor_FR_Contested {
-
- val BaseURL = Environment.baseURL
-
- val MinThinkTime = Environment.minThinkTime
- val MaxThinkTime = Environment.maxThinkTime
-
- /*======================================================================================
- * Click the Create Case link
- ======================================================================================*/
- val CreateFRCase = {
-
- exec(
- _.setAll(
- //marriage date between 5 and 10 years ago
- "dateOfMarriage" -> DateUtils.getDatePastRandom("yyyy-MM-dd", minYears = 5, maxYears = 10),
- //separation date between 2 and 5 years ago, after marriage date
- "dateOfSeparation" -> DateUtils.getDatePastRandom("yyyy-MM-dd", minYears = 2, maxYears = 5),
- //Divorce Petition Issue date between 1 and 2 years ago and after separation date
- "divorcePetitionIssueDate" -> DateUtils.getDatePastRandom("yyyy-MM-dd", minYears = 1, maxYears = 2)
- )
- )
- .group("XUI_FR_Contested_010_CreateCase") {
- exec(
- http("XUI_FR_Contested_010_CreateCase")
- .get("/aggregated/caseworkers/:uid/jurisdictions?access=create")
- .headers(Headers.commonHeader)
- .header("accept", "application/json")
- .check(substring("DIVORCE"))
- )
- }
- .pause(MinThinkTime, MaxThinkTime)
-
- .group("XUI_FR_Contested_020_SelectCaseType") {
- exec(http("XUI_FR_Contested_020_005_StartApplication")
- .get("/data/internal/case-types/FinancialRemedyContested/event-triggers/FR_solicitorCreate?ignore-warning=false")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-case-trigger.v2+json;charset=UTF-8")
- .check(jsonPath("$.event_token").saveAs("event_token"))
- .check(jsonPath("$.id").is("FR_solicitorCreate"))
- )
- .exec(Common.profile)
-
- .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_030_ContinueToApplication") {
- exec(http("XUI_FR_030_005_ContinueToApplication")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate1")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRContinueToApplication.json"))
- .check(jsonPath("$.data.applicantSolicitorFirm").saveAs("firmName"))
- .check(jsonPath("$.data.solicitorReference").saveAs("firmRef"))
- .check(jsonPath("$.data.applicantSolicitorAddress.AddressLine1").saveAs("firmAddress1"))
- .check(jsonPath("$.data.applicantSolicitorAddress.AddressLine2").saveAs("firmAddress2"))
- .check(jsonPath("$.data.applicantSolicitorAddress.AddressLine3").saveAs("firmAddress3"))
- .check(jsonPath("$.data.applicantSolicitorAddress.PostTown").saveAs("firmPostTown"))
- .check(jsonPath("$.data.applicantSolicitorAddress.County").saveAs("firmCounty"))
- .check(jsonPath("$.data.applicantSolicitorAddress.PostCode").saveAs("firmPostcode"))
- .check(jsonPath("$.data.solicitorReference").is("#{orgref}"))
- .check(jsonPath("$.data.applicantSolicitorFirm").is("#{orgname}"))
- )
-
- //select applicant and respondent solicitor orgs now, as this call will be retrieved from cache in future
- .exec(http("XUI_FR_Contested_030_010_GetOrgs")
- .get("/api/caseshare/orgs")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*")
- .check(regex(""""name":"(.+?)","organisationIdentifier":"([0-9A-Z]+?)"""").ofType[(String, String)].findRandom.saveAs("applicantOrgs"))
- .check(regex(""""name":"(.+?)","organisationIdentifier":"([0-9A-Z]+?)"""").ofType[(String, String)].findRandom.saveAs("respondentOrgs")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Complete Applicant Solicitor details (some are pre-populated) and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_040_AddSolicitorDetails") {
- exec(http("XUI_FR_Contested_040_005_AddSolicitorDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate2")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRAddSolicitorDetails.json"))
- .check(substring("applicantSolicitorConsentForEmails"))
- .check(jsonPath("$.data.ApplicantOrganisationPolicy.Organisation.OrganisationID").is("#{applicantOrgs(1)}"))
- .check(jsonPath("$.data.ApplicantOrganisationPolicy.Organisation.OrganisationName").is("#{applicantOrgs(0)}"))
- .check(jsonPath("$.data.applicantSolicitorFirm").is("#{firmName}"))
- )
-
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Complete Divorce case details (FamilyMan code = EZ12D91234) and click Continue
- ======================================================================================*/
- .exec(Common.uploadFile("3MB.pdf", "PUBLIC", "#{caseType}", "DIVORCE", "Petition"))
-
- .pause(MinThinkTime, MaxThinkTime)
-
- .group("XUI_FR_Contested_050_AddDivorceCaseDetails") {
- exec(
- http("XUI_FR_Contested_050_010_AddDivorceCaseDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate3")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRAddDivorceCaseDetails.json"))
- .check(jsonPath("$.data.divorceStageReached").is("Petition Issued"))
- .check(jsonPath("$.data.divorceUploadPetition.document_hash").is("#{PetitionDocumentHashToken}"))
- )
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Enter the Applicant's details and click Continue
- ======================================================================================*/
-
- .exec(Common.postcodeLookup)
-
- .pause(MinThinkTime, MaxThinkTime)
-
- .group("XUI_FR_Contested_060_AddApplicantDetails") {
- exec(http("XUI_FR_Contested_060_005_AddApplicantDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate4")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRAddApplicantDetails.json"))
- .check(jsonPath("$.data.applicantFMName").is("ApplicantPerf"))
- .check(jsonPath("$.data.applicantAddress.AddressLine1").saveAs("applicantAddress1"))
- .check(jsonPath("$.data.applicantAddress.AddressLine2").saveAs("applicantAddress2"))
- .check(jsonPath("$.data.applicantAddress.AddressLine3").saveAs("applicantAddress3"))
- .check(jsonPath("$.data.applicantAddress.PostTown").saveAs("applicantPostTown"))
- .check(jsonPath("$.data.applicantAddress.County").saveAs("applicantCounty"))
- .check(jsonPath("$.data.applicantAddress.PostCode").saveAs("applicantPostcode"))
- )
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Enter the Respondent's details and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_070_AddRespondentDetails") {
- exec(http("XUI_FR__Contested_070_005_AddRespondentDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate6")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRAddRespondentDetails.json"))
- .check(jsonPath("$.data.respondentFMName").is("RespondentPerf"))
- )
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
-
- /*======================================================================================
- * Enter the Respondent Solicitor's details and click Continue
- ======================================================================================*/
- .exec(Common.postcodeLookup)
-
- .pause(MinThinkTime, MaxThinkTime)
-
- .group("XUI_FR_Contested_080_AddRespondentSolicitorDetails") {
-
- exec(
- http("XUI_FR_Contested_080_005_AddRespondentSolicitorDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate7" )
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRAddRespondentSolicitorDetails.json"))
- .check(jsonPath("$.data.ApplicantOrganisationPolicy.Organisation.OrganisationID").is("#{applicantOrgs(1)}"))
- .check(jsonPath("$.data.rSolicitorAddress.AddressLine1").saveAs("respondentSolicitorAddress1"))
- .check(jsonPath("$.data.rSolicitorAddress.AddressLine2").saveAs("respondentSolicitorAddress2"))
- .check(jsonPath("$.data.rSolicitorAddress.AddressLine3").saveAs("respondentSolicitorAddress3"))
- .check(jsonPath("$.data.rSolicitorAddress.PostTown").saveAs("respondentSolicitorPostTown"))
- .check(jsonPath("$.data.rSolicitorAddress.County").saveAs("respondentSolicitorCounty"))
- .check(jsonPath("$.data.rSolicitorAddress.PostCode").saveAs("respondentSolicitorPostcode"))
- )
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Select All checkbox as the Nature of the Application and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_090_AddNatureOfApplication") {
- exec(http("XUI_FR_Contested_090_005_AddNatureOfApplication")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate8")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRAddNatureOfApplication.json"))
- .check(jsonPath("$.data.natureOfApplicationChecklist[0]").is("Maintenance Pending Suit")))
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Property Adjustment order details and click Continue
- =====================================================================================*/
-
- .group("XUI_FR_Contested_100_AddPropertyAdjustmentOrderDetails") {
- exec(http("XUI_FR_Contested_100_005_AddPropertyAdjustmentOrderDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate9")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRAddPropertyAdjustment.json"))
- .check(jsonPath("$.data.additionalPropertyOrderDecision").is("Yes"))
- .check(jsonPath("$.data.propertyAddress").is("prop1"))
- )
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Periodical Payments order and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_110_AddPeriodicalPaymentsOrderDetails") {
- exec(http("XUI_FR_Contested_110_005_AddPeriodicalPaymentsOrderDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate10")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRPeriodicPayment.json"))
- .check(jsonPath("$.data.paymentForChildrenDecision").is("Yes"))
- )
- }
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Written Agreement for benefit of children and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_120_AddWrittenAgreementDetails") {
- exec(http("XUI_FR_Contested_120_005_AddWrittenAgreementDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate11")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRWrittenAgreement.json"))
- .check(jsonPath("$.data.benefitForChildrenDecision").is("No"))
- )
- }
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Fast Track Procedure and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_130_AddFastTrackProcedureDetails") {
- exec(http("XUI_FR_Contested_130_005_AddFastTrackProcedureDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate13")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRFastTrack.json"))
- .check(jsonPath("$.data.fastTrackDecision").is("No"))
- )
- }
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Financial Remedy details and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_140_AddFinancialRemedyDetails") {
- exec(http("XUI_FR_Contested_140_005_AddFinancialRemedyDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate14")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRFinancialRemedy.json"))
- .check(jsonPath("$.data.estimatedAssetsChecklistV2").is("underOneMillionPounds"))
- )
- }
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Select Financial Remedy Court and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_150_AddFinancialRemedyCourtDetails") {
- exec(http("XUI_FR_Contested_150_005_AddFinancialRemedyCourtDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate15")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRFinancialRemedyCourt.json"))
- .check(jsonPath("$.data.regionList").is("northwest"))
- .check(jsonPath("$.data.propertyAdjutmentOrderDetail[0].id").saveAs("propertyId"))
- )
- }
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Attended MIAM and click Continue
- ======================================================================================*/
-
- .group("XUI_FR_Contested_160_AddAttendedMIAMDetails") {
- exec(http("XUI_FR_Contested_160_005_AddAttendedMIAMDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate17")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRAttendedMIAM.json"))
- .check(jsonPath("$.data.applicantAttendedMIAM").is("Yes"))
- )
- }
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Add MIAM certification details and click Continue
- ======================================================================================*/
-
- .exec(Common.uploadFile("3MB.pdf", "PUBLIC", "FinancialRemedyContested", "DIVORCE", "Miam"))
-
- .pause(MinThinkTime, MaxThinkTime)
-
- .group("XUI_FR_Contested_170_AddMIAMCertificationDetails") {
- exec(http("XUI_FR_Contested_170_005_AddMIAMCertificationDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate23")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRAddMIAMDetails.json"))
- .check(jsonPath("$.data.soleTraderName").is("Wizard divorce service"))
- )
- }
- // Adding additional pauses to avoid http 429 too many requests error from document management service
- .pause(MinThinkTime, MaxThinkTime)
- .pause(MinThinkTime, MaxThinkTime)
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Add Variation order details and click Continue
- ======================================================================================*/
-
- .exec(Common.uploadFile("3MB.pdf", "PUBLIC", "FinancialRemedyContested", "DIVORCE", "Variation"))
-
- // Adding additional pauses to avoid http 429 too many requests error from document management service
- // (manually setting a higher pause time is overriden by the simulation configuration when running in a pipeline)
- .pause(MinThinkTime, MaxThinkTime)
- .pause(MinThinkTime, MaxThinkTime)
- .pause(MinThinkTime, MaxThinkTime)
- .pause(MinThinkTime, MaxThinkTime)
- .pause(MinThinkTime, MaxThinkTime)
-
- .exec(Common.uploadFile("3MB.pdf", "PUBLIC", "FinancialRemedyContested", "DIVORCE", "OtherDocument"))
-
- .pause(MinThinkTime, MaxThinkTime)
-
- .group("XUI_FR_Contested_180_AddVariationOrderDetails") {
-
- exec(http("XUI_FR_Contested_180_005_AddVariationOrderDetails")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate24")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRVariationOrderDetails.json"))
- .check(jsonPath("$.data.uploadAdditionalDocument[0].value.additionalDocumentType").is("noticeOfActing"))
- )
- }
- .pause(MinThinkTime, MaxThinkTime)
-
- /*======================================================================================
- * Saving the Case and click Continue to Check your answers page
- ======================================================================================*/
-
- .group("XUI_FR_Contested_190_SaveCase") {
- exec(http("XUI_FR_Contested_190_005_SaveCase")
- .post("/data/case-types/FinancialRemedyContested/validate?pageId=FR_solicitorCreate25")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRSaveCase.json"))
- .check(jsonPath("$.data.consentOrderFRCName").saveAs("Liverpool Civil And Family Court"))
- )
- .exec(Common.caseShareOrgs)
- }
- .pause(MinThinkTime, MaxThinkTime)
-
-
- /*======================================================================================
- * Review Application - click Submit
- ======================================================================================*/
-
- .group("XUI_FR_Contested_200_ReviewAndSubmitApplication") {
- exec(http("XUI_FR_Contested_200_005_ReviewAndSubmitApplication")
- .post("/data/case-types/FinancialRemedyContested/cases?ignore-warning=false")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8")
- .header("x-xsrf-token", "#{XSRFToken}")
- .body(ElFileBody("bodies/fr/contested/FRSubmitApplication.json"))
- .check(jsonPath("$.id").saveAs("caseId"))
- .check(jsonPath("$.state").is("caseAdded"))
- )
- .exec(http("XUI_FR_Contested_200_010_ViewCase")
- .get("/data/internal/cases/#{caseId}")
- .headers(Headers.commonHeader)
- .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json")
- .check(jsonPath("$.case_id").is("#{caseId}"))
- .check(jsonPath("$.case_type.id").is("#{caseType}"))
- )
- .exec(Common.caseShareOrgs)
- .exec(
- http("XUI_FR_Contested_200_015_WAJurisdictionsGet")
- .get("/api/wa-supported-jurisdiction/get")
- .headers(Headers.commonHeader)
- )
- }
-
- .pause(MinThinkTime, MaxThinkTime)
-
- .exec(
- session => {
- println(session)
- session
- }
- )
- }
-}
diff --git a/src/gatling/simulations/scenarios/Solicitor_PRL_C100.scala b/src/gatling/simulations/scenarios/Solicitor_PRL_C100.scala
index 4d2ce3f8..84676b41 100644
--- a/src/gatling/simulations/scenarios/Solicitor_PRL_C100.scala
+++ b/src/gatling/simulations/scenarios/Solicitor_PRL_C100.scala
@@ -204,7 +204,7 @@ object Solicitor_PRL_C100 {
.header("x-xsrf-token", "#{XSRFToken}")
.check(substring("Application for a court order to make arrangements for a child")))
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_100_015_CreateTypeOfApplicationEvent")
.get("/data/internal/cases/#{caseId}/event-triggers/selectApplicationType?ignore-warning=false")
@@ -289,19 +289,41 @@ object Solicitor_PRL_C100 {
.pause(MinThinkTime, MaxThinkTime)
+ // .group("XUI_PRL_C100_150_005_PermissionUpload") {
+ // exec(http("XUI_PRL_C100_150_005_PermissionUpload")
+ // .post("/documents")
+ // .headers(Headers.commonHeader)
+ // .header("accept", "application/json, text/plain, */*")
+ // .header("content-type", "multipart/form-data")
+ // .header("x-xsrf-token", "#{XSRFToken}")
+ // .bodyPart(RawFileBodyPart("files", "7PageDoc.pdf")
+ // .fileName("7PageDoc.pdf")
+ // .transferEncoding("binary"))
+ // .asMultipartForm
+ // .formParam("classification", "PUBLIC")
+ // .formParam("caseTypeId", "PRLAPPS")
+ // .formParam("jurisdictionId", "PRIVATELAW")
+ // .check(substring("originalDocumentName"))
+ //.check(jsonPath("$.documents[0].hashToken").saveAs("documentHash_permission"))
+ // .check(jsonPath("$._embedded.documents[0]._links.self.href").saveAs("DocumentURL_permission")))
+ // }
+
+ // .pause(MinThinkTime, MaxThinkTime)
+
/*======================================================================================
* Have you applied to the court for permission to make this application? - Yes
======================================================================================*/
- .group("XUI_PRL_C100_150_PermissionForApplication") {
- exec(http("XUI_PRL_C100_150_005_PermissionForApplication")
+ .group("XUI_PRL_C100_150_010_PermissionForApplication") {
+ exec(http("XUI_PRL_C100_150_010_PermissionForApplication")
.post("/data/case-types/PRLAPPS/validate?pageId=selectApplicationType3")
.headers(Headers.commonHeader)
.header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.case-data-validate.v2+json;charset=UTF-8")
.header("x-xsrf-token", "#{XSRFToken}")
.body(ElFileBody("bodies/prl/c100/PRLPermissionRequired.json"))
- .check(substring("applicationPermissionRequired")))
-
+ //.check(substring("orderInPlacePermissionRequired"))
+ .check(substring("applicationPermissionRequired"))
+ )
.exec(Common.userDetails)
}
@@ -385,7 +407,7 @@ object Solicitor_PRL_C100 {
.header("x-xsrf-token", "#{XSRFToken}")
.check(substring("Application for a court order to make arrangements for a child")))
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_180_020_HearingUrgencyEvent")
.get("/data/internal/cases/#{caseId}/event-triggers/hearingUrgency?ignore-warning=false")
@@ -469,7 +491,7 @@ object Solicitor_PRL_C100 {
.exec(Common.userDetails)
.exec(Common.isAuthenticated)
.exec(Common.monitoringTools)
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_220_005_ApplicantDetailsViewCase")
.get("/data/internal/cases/#{caseId}")
@@ -569,7 +591,7 @@ object Solicitor_PRL_C100 {
.exec(Common.userDetails)
.exec(Common.isAuthenticated)
.exec(Common.monitoringTools)
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_260_010_ChildDetailsCaseView")
.get("/data/internal/cases/#{caseId}")
@@ -689,7 +711,7 @@ object Solicitor_PRL_C100 {
.exec(Common.userDetails)
.exec(Common.isAuthenticated)
.exec(Common.monitoringTools)
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_310_010_RespondentDetailsCaseView")
.get("/data/internal/cases/#{caseId}")
@@ -791,7 +813,7 @@ object Solicitor_PRL_C100 {
.exec(Common.userDetails)
.exec(Common.isAuthenticated)
.exec(Common.monitoringTools)
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_350_010_MIAMCaseView")
.get("/data/internal/cases/#{caseId}")
@@ -884,7 +906,7 @@ object Solicitor_PRL_C100 {
.exec(Common.userDetails)
.exec(Common.isAuthenticated)
.exec(Common.monitoringTools)
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_390_010_AllegationsOfHarmRedirectCaseView")
.get("/data/internal/cases/#{caseId}")
@@ -1125,7 +1147,7 @@ object Solicitor_PRL_C100 {
.header("accept", "application/json")
.check(substring("task_required_for_event")))
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_490_015_OtherPeopleInTheCase")
.get("/data/internal/cases/#{caseId}")
@@ -1389,7 +1411,7 @@ object Solicitor_PRL_C100 {
.header("accept", "application/json")
.check(substring("task_required_for_event")))
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_518_015_ChildrenAndOtherPeople")
.get("/data/internal/cases/#{caseId}")
@@ -1469,7 +1491,7 @@ object Solicitor_PRL_C100 {
.exec(Common.userDetails)
.exec(Common.isAuthenticated)
.exec(Common.monitoringTools)
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_610_010_ViewPdfApplicationRedirectCaseView")
.get("/data/internal/cases/#{caseId}")
@@ -1534,7 +1556,7 @@ object Solicitor_PRL_C100 {
.body(ElFileBody("bodies/prl/c100/PRLViewPdfContinueSubmit.json")))
.exec(http("XUI_PRL_C100_640_010_ViewPdfSubmit")
- .get("/data/internal/cases/#{caseId}")
+ .get("/data/internal/cases/#{caseId}")
.headers(Headers.commonHeader)
.header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json")
.header("x-xsrf-token", "#{XSRFToken}")
@@ -1566,7 +1588,7 @@ object Solicitor_PRL_C100 {
.exec(Common.userDetails)
.exec(Common.isAuthenticated)
.exec(Common.monitoringTools)
- .exec(Common.caseActivityGet)
+ //.exec(Common.caseActivityGet)
.exec(http("XUI_PRL_C100_650_010_SubmitAndPayRedirectCaseView")
.get("/data/internal/cases/#{caseId}")
@@ -1581,6 +1603,8 @@ object Solicitor_PRL_C100 {
.headers(Headers.commonHeader)
.header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8")
.check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[17].value").saveAs("courtName"))
+ .check(jsonPath("$.case_fields[7].value").saveAs("feeAmount"))
.check(jsonPath("$.id").is("submitAndPay")))
.exec(Common.userDetails)
@@ -1679,34 +1703,69 @@ object Solicitor_PRL_C100 {
.pause(MinThinkTime, MaxThinkTime)
+ /*======================================================================================
+ * Select Dummy Payment Confirmation
+ ======================================================================================*/
+
+ .exec(http("XUI_PRL_C100_710_DummyPaymentEventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/testingSupportPaymentSuccessCallback?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-start-event-trigger.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.id").is("testingSupportPaymentSuccessCallback")))
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100_720_DummySubmitAndPayNow") {
+ exec(http("XUI_PRL_C100_720_005_DummySubmitAndPayNow")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .body(ElFileBody("bodies/prl/c100/PRLDummyPaymentSubmit.json"))
+ .check(substring("created_on")))
+
+ .exec(http("XUI_PRL_C100_730_010_DummySubmitAndPayNowViewCase")
+ .get("/data/internal/cases/#{caseId}")
+ .headers(Headers.commonHeader)
+ .header("accept", "application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-case-view.v2+json")
+ .header("x-xsrf-token", "#{XSRFToken}")
+ .check(jsonPath("$.events[?(@.event_id=='testingSupportPaymentSuccessCallback')]")))
+
+ .exec(Common.userDetails)
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
val HearingsTab =
/*======================================================================================
* Click on the Hearings tab to view any Hearings
======================================================================================*/
- group("XUI_PRL_C100_710_HearingsTab") {
- exec(http("XUI_PRL_C100_710_GetHearings")
+ group("XUI_PRL_C100_730_HearingsTab") {
+ exec(http("XUI_PRL_C100_730_GetHearings")
.get("/api/hearings/getHearings?caseId=#{caseId}")
.headers(Headers.commonHeader)
.header("Accept", "application/json, text/plain, */*")
.check(status.in(200, 403)))
- .exec(http("XUI_PRL_C100_710_GetHearingsJurisdiction")
+ .exec(http("XUI_PRL_C100_730_GetHearingsJurisdiction")
.post("/api/hearings/loadServiceHearingValues?jurisdictionId=PRIVATELAW")
.headers(Headers.commonHeader)
- .header("Content-Type", "application/json; charset=utf-8")
+ .header("Content-Type", "application/json")
.header("Accept", "application/json, text/plain, */*")
.header("x-xsrf-token", "#{XSRFToken}")
- .body(StringBody("""{"caseReference":"#{caseId}"}"""))
+ .body(StringBody("""{"caseReference":"#{caseId}"}""""))
.check(substring("hearing-facilities")))
- .exec(http("XUI_PRL_C100_710_GetRoleAssignments")
+ .exec(http("XUI_PRL_C100_730_GetRoleAssignments")
.get("/api/user/details?refreshRoleAssignments=undefined")
.headers(Headers.commonHeader)
.header("Accept", "application/json, text/plain, */*"))
- .exec(http("XUI_PRL_C100_710_GetHearingTypes")
+ .exec(http("XUI_PRL_C100_730_GetHearingTypes")
.get("/api/prd/lov/getLovRefData?categoryId=HearingType&serviceId=ABA5&isChildRequired=N")
.headers(Headers.commonHeader)
.header("Accept", "application/json, text/plain, */*")
@@ -1715,4 +1774,195 @@ object Solicitor_PRL_C100 {
.pause(MinThinkTime, MaxThinkTime)
+val PathfinderCase =
+
+ group("XUI_PRL_C100progress_000_000_PathfinderEvent") {
+ exec(http("XUI_PRL_C100progress_000_005_PathfinderEvent")
+ .get("/workallocation/case/tasks/#{caseId}/event/pathfinderDecision/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+
+ exec(http("XUI_PRL_C100progress_000_010_PathfinderEvent_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/pathfinderDecision?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value[0].id").saveAs("id_value"))
+ .check(substring("Is this a Pathfinder case"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_000_000_PathfinderEvent_Validate") {
+ exec(http("XUI_PRL_C100progress_000_000_PathfinderEvent_Validate")
+ .post("/data/case-types/PRLAPPS/validate?pageId=pathfinderDecision1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PathfinderValidate.json"))
+ .check(substring("isPathfinderCase"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_000_000_PathfinderEvent_Event") {
+ exec(http("XUI_PRL_C100progress_000_000_PathfinderEvent_Event")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/PathfinderEvent.json"))
+ .check(substring("seekHelpDetails"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val AddLocalAuthority =
+
+ group("XUI_PRL_C100progress_000_000_AddLocalAuthority") {
+ exec(http("XUI_PRL_C100progress_000_005_AddLocalAuthority")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminAddLocalAuthority/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+
+ exec(http("XUI_PRL_C100progress_000_010_AddLocalAuthority_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminAddLocalAuthority?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value[0].id").saveAs("id_value"))
+ .check(substring("adminAddLocalAuthority"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_000_000_AddLocalAuthority_Validate") {
+ exec(http("XUI_PRL_C100progress_000_000_AddLocalAuthority_Validate")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminAddLocalAuthority1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/AddLocalAuthorityValidate.json"))
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_000_000_AddLocalAuthority_Event") {
+ exec(http("XUI_PRL_C100progress_000_000_AddLocalAuthority_Event")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/AddLocalAuthorityEvent.json"))
+ .check(substring("seekHelpDetails"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val RemoveLocalAuthority = {
+
+ group("XUI_PRL_C100progress_000_000_RemoveLocalAuthority") {
+ exec(http("XUI_PRL_C100progress_000_005_RemoveLocalAuthority")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminRemoveLocalAuthority/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+
+ exec(http("XUI_PRL_C100progress_000_010_RemoveLocalAuthority_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminRemoveLocalAuthority?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value[0].id").saveAs("id_value"))
+ .check(substring("adminRemoveLocalAuthority"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_000_000_RemoveLocalAuthority_Validate") {
+ exec(http("XUI_PRL_C100progress_000_000_RemoveLocalAuthority_Validate")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminRemoveLocalAuthority1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/RemoveLocalAuthorityValidate.json"))
+ .check(substring("localAuthoritySolicitorOrganisationPolicy"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_C100progress_000_000_RemoveLocalAuthority_Event") {
+ exec(http("XUI_PRL_C100progress_000_000_RemoveLocalAuthority_Event")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/c100/RemoveLocalAuthorityEvent.json"))
+ .check(substring("responseToAllegationsOfHarmDocument"))
+ .check(status.is(201)))
+ }
+ }
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val OrgHomepage =
+
+ group("PRL_CitizenC100_010_PRLHome") {
+ exec(http("PRL_CitizenC100_010_005_PRLHome")
+ .get("https://manage-org.perftest.platform.hmcts.net/")
+ .headers(Headers.navigationHeader)
+ .header("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
+ .check(substring("Sign in or create an account")))
+
+ exec(http("PRL_CitizenC100_010_005_PRLHome")
+ .get("https://manage-org.perftest.platform.hmcts.net/auth/login")
+ .headers(Headers.navigationHeader)
+ .header("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
+ .check(substring("Sign in or create an account")))
+
+ exec(http("PRL_CitizenC100_010_005_PRLHome")
+ .get("https://idam-web-public.perftest.platform.hmcts.net/login?response_type=code&redirect_uri=https%3A%2F%2Fmanage-org.perftest.platform.hmcts.net%2Foauth2%2Fcallback&scope=profile%20openid%20roles%20manage-user%20create-user%20manage-roles&state=C8Bw2hEFXfmhwPWi1P-ifVVohjV-kD3qqypuczeM81w&client_id=xuimowebapp")
+ .headers(Headers.navigationHeader)
+ .header("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
+ .check(substring("Sign in or create an account")))
+ }
+
+
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*===============================================================================================
+ * Login
+ ===============================================================================================*/
+
+ .group("PRL_CitizenC100_020_Login") {
+ exec(http("PRL_CitizenC100_020_005_Login")
+ .post("https://idam-web-public.perftest.platform.hmcts.net/login?response_type=code&redirect_uri=https%3A%2F%2Fmanage-org.perftest.platform.hmcts.net%2Foauth2%2Fcallback&scope=profile%20openid%20roles%20manage-user%20create-user%20manage-roles&state=C8Bw2hEFXfmhwPWi1P-ifVVohjV-kD3qqypuczeM81w&client_id=xuimowebapp")
+ .headers(Headers.commonHeader)
+ .header("accept", "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9")
+ .header("content-type", "application/x-www-form-urlencoded")
+ .formParam("username", "#{user}")
+ .formParam("password", "#{password}")
+ .formParam("selfRegistrationEnabled", "false")
+ .formParam("mojLoginEnabled", "true")
+ .formParam("_csrf", "#{csrf}")
+ .check(substring("Child arrangements and family injunction cases")))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+
}
\ No newline at end of file
diff --git a/src/gatling/simulations/scenarios/Solicitor_PRL_FL401.scala b/src/gatling/simulations/scenarios/Solicitor_PRL_FL401.scala
index 4f201576..0e38098c 100644
--- a/src/gatling/simulations/scenarios/Solicitor_PRL_FL401.scala
+++ b/src/gatling/simulations/scenarios/Solicitor_PRL_FL401.scala
@@ -2,8 +2,12 @@ package scenarios
import io.gatling.core.Predef._
import io.gatling.http.Predef._
+import scenarios.Barrister_PRL_C100.{MaxThinkTime, MinThinkTime}
+import scenarios.CourtAdmin_PRL_C100.{MaxThinkTime, MinThinkTime}
import utils.{Common, Environment, Headers}
+import java.time.format.DateTimeFormatter
+
/*======================================================================================
* Create a new Private Law FL401 application as a professional user (e.g. solicitor)
======================================================================================*/
@@ -179,6 +183,8 @@ object Solicitor_PRL_FL401 {
.check(jsonPath("$.id").is("fl401TypeOfApplication")))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -298,6 +304,8 @@ object Solicitor_PRL_FL401 {
.check(jsonPath("$.id").is("withoutNoticeOrderDetails")))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -460,6 +468,8 @@ object Solicitor_PRL_FL401 {
.header("accept", "application/json, text/plain, */*"))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -572,6 +582,8 @@ object Solicitor_PRL_FL401 {
.header("accept", "application/json, text/plain, */*"))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -681,6 +693,10 @@ object Solicitor_PRL_FL401 {
.check(jsonPath("$.id").is("fl401ApplicantFamilyDetails")))
.exec(Common.userDetails)
+ .exec(Common.userDetails)
+ .exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -782,6 +798,8 @@ object Solicitor_PRL_FL401 {
.check(jsonPath("$.id").is("respondentRelationship")))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -901,6 +919,8 @@ object Solicitor_PRL_FL401 {
.check(jsonPath("$.id").is("respondentBehaviour")))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -1002,6 +1022,8 @@ object Solicitor_PRL_FL401 {
.check(jsonPath("$.id").is("fl401Home")))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -1105,6 +1127,8 @@ object Solicitor_PRL_FL401 {
.check(jsonPath("$.id").is("fl401UploadDocuments")))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -1234,6 +1258,8 @@ object Solicitor_PRL_FL401 {
.check(jsonPath("$.id").is("viewPdfDocument")))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -1335,6 +1361,8 @@ object Solicitor_PRL_FL401 {
.check(jsonPath("$.id").is("fl401StatementOfTruthAndSubmit")))
.exec(Common.userDetails)
+
+ .exec(getCookieValue(CookieKey("XSRF-TOKEN").withDomain(BaseURL.replace("https://", "")).withSecure(true).saveAs("XSRFToken")))
}
.pause(MinThinkTime, MaxThinkTime)
@@ -1465,4 +1493,123 @@ object Solicitor_PRL_FL401 {
.pause(MinThinkTime, MaxThinkTime)
+ val AddBarristerFL401Applicant =
+
+ /*======================================================================================
+ * Run Add Barrister task
+ ======================================================================================*/
+
+ group("XUI_PRL_FL401progress_100_010_ApplicantAddBarristerPrivateLaw") {
+ exec(http("XUI_PRL_FL401progress_100_010_ApplicantAddBarristerPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminAddBarrister/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_FL401progress_100_020_ApplicantAddBarristerTask_EventTrigger") {
+ exec(http("XUI_PRL_FL401progress_100_020_ApplicantAddBarristerTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminAddBarrister?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].code").saveAs("appCode1"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].label").saveAs("appLabel1"))
+ .check(substring("Organisation Search"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Submit Barrister Details
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_100_040_ApplicantBarristerDetailsSubmit") {
+ exec(http("XUI_PRL_FL401progress_100_040_ApplicantBarristerDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminAddBarrister1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLAddBarrister.json"))
+ .check(substring("perf_barrister"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_FL401progress_100_050_ApplicantBarristerEvent") {
+ exec(http("XUI_PRL_FL401progress_100_050_ApplicantBarristerEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLAddBarristerEvent.json"))
+ .check(substring("perf_barrister"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ val RemoveBarristerFL401Applicant =
+
+ /*======================================================================================
+ * Run Remove Barrister task
+ ======================================================================================*/
+
+ group("XUI_PRL_FL401progress_300_010_ApplicantRemoveBarristerPrivateLaw") {
+ exec(http("XUI_PRL_FL401progress_300_010_ApplicantRemoveBarristerPrivateLaw")
+ .get("/workallocation/case/tasks/#{caseId}/event/adminRemoveBarrister/caseType/PRLAPPS/jurisdiction/PRIVATELAW")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(substring("task_required_for_event"))
+ .check(status.is(200)))
+ }
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_FL401progress_300_020_ApplicantRemoveBarristerTask_EventTrigger") {
+ exec(http("XUI_PRL_FL401progress_300_020_ApplicantRemoveBarristerTask_EventTrigger")
+ .get("/data/internal/cases/#{caseId}/event-triggers/adminRemoveBarrister?ignore-warning=false")
+ .headers(Headers.commonHeader)
+ .header("Accept", "application/json, text/plain, */*")
+ .check(jsonPath("$.event_token").saveAs("event_token"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].code").saveAs("appCode1"))
+ .check(jsonPath("$.case_fields[0].value.partyList.list_items[0].label").saveAs("appLabel1"))
+ .check(substring("Caseworker remove barrister"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ /*======================================================================================
+ * Submit Barrister Remove Details
+ ======================================================================================*/
+ .group("XUI_PRL_FL401progress_300_040_ApplicantRemoveBarristerDetailsSubmit") {
+ exec(http("XUI_PRL_FL401progress_300_040_ApplicantRemoveBarristerDetailsSubmit")
+ .post("/data/case-types/PRLAPPS/validate?pageId=adminRemoveBarrister1")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLRemoveBarrister.json"))
+ .check(substring("barristerOrg"))
+ .check(status.is(200)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
+ .group("XUI_PRL_FL401progress_300_050_ApplicantRemoveBarristerEvent") {
+ exec(http("XUI_PRL_FL401progress_300_050_ApplicantRemoveBarristerEvent")
+ .post("/data/cases/#{caseId}/events")
+ .headers(Headers.commonHeader)
+ .header("Content-Type", "application/json; charset=utf-8")
+ .header("Accept", "application/json, text/plain, */*")
+ .body(ElFileBody("bodies/prl/fl401/PRLRemoveBarristerEvent.json"))
+ .check(substring("Statement of truth and submit"))
+ .check(status.is(201)))
+ }
+
+ .pause(MinThinkTime, MaxThinkTime)
+
}
\ No newline at end of file
diff --git a/src/gatling/simulations/simulations/XUI_Simulation.scala b/src/gatling/simulations/simulations/XUI_Simulation.scala
index 4f185f28..17a5dae5 100644
--- a/src/gatling/simulations/simulations/XUI_Simulation.scala
+++ b/src/gatling/simulations/simulations/XUI_Simulation.scala
@@ -8,13 +8,19 @@ import io.gatling.http.Predef._
import scenarios._
import utils._
import xui._
+import elasticSearchFeeder._
+
import scala.concurrent.duration._
import scala.io.Source
+import java.time.format.DateTimeFormatter
+import java.time.LocalDateTime
class XUI_Simulation extends Simulation {
val UserFeederPRL = csv("UserDataPRL.csv").circular
+ val UserFeederPRLBarrister = csv("UserDataPRLBarristerList.csv").circular
+ val UserFeederPRLCourtAdmin = csv("UserDataPRLCourtAdmin.csv").circular
val UserFeederBails = csv("UserDataBails.csv").circular
val UserFeederBailsHO = csv("UserDataBailsHO.csv").circular
val UserFeederBailsAdmin = csv("UserDataBailsAdmin.csv").circular
@@ -26,6 +32,9 @@ class XUI_Simulation extends Simulation {
val UserFeederFPL = csv("UserDataFPL.csv").circular
val CaseworkerUserFeeder = csv("UserDataCaseworkers.csv").circular
val UserFeederCTSC = csv("UserDataCTSC.csv").circular
+ //val UserFeederLA = csv("UserDataPRLLocalAuthorityList.csv").circular
+ //val AddLAList = csv("AddLAList.csv").circular
+ //val LAList = csv("LAList.csv").circular
//Read in text labels required for each NFD case type - sole and joint case labels are different, so are fed directly into the JSON payload bodies
val nfdSoleLabelsInitialised = Source.fromResource("bodies/nfd/labels/soleLabelsInitialised.txt").mkString
@@ -33,6 +42,8 @@ class XUI_Simulation extends Simulation {
val nfdJointLabelsInitialised = Source.fromResource("bodies/nfd/labels/jointLabelsInitialised.txt").mkString
val nfdJointLabelsPopulated = Source.fromResource("bodies/nfd/labels/jointLabelsPopulated.txt").mkString
+ val patternDate = DateTimeFormatter.ofPattern("yyyy-MM-dd")
+
/* TEST TYPE DEFINITION */
/* pipeline = nightly pipeline against the AAT environment (see the Jenkins_nightly file) */
/* perftest (default) = performance test against the perftest environment */
@@ -52,17 +63,19 @@ class XUI_Simulation extends Simulation {
/* ******************************** */
/* PERFORMANCE TEST CONFIGURATION */
- val prlC100TargetPerHour: Double = 66
- val prlFL401TargetPerHour: Double = 34
+ val prlC100TargetPerHour: Double = 64
+ val prlFL401TargetPerHour: Double = 36
+ val prlTargetPerHour: Double = 90
val bailsTargetPerHour: Double = 10
val probateTargetPerHour: Double = 250
val iacTargetPerHour: Double = 20
val nfdSoleTargetPerHour: Double = 120
val nfdJointTargetPerHour: Double = 120
val fplTargetPerHour: Double = 30
- val frConsentedTargetPerHour: Double = 50
- val frContestedTargetPerHour: Double = 50
+ val frTargetPerHour: Double = 100
val caseworkerTargetPerHour: Double = 1000
+ val prlC100BarristerTargetPerHour: Double = 17
+ val prlFL401BarristerTargetPerHour: Double = 11
val rampUpDurationMins = 5
val rampDownDurationMins = 5
@@ -93,457 +106,652 @@ class XUI_Simulation extends Simulation {
println(s"Debug Mode: ${debugMode}")
}
- /*===============================================================================================
- * XUI Solicitor Private Law C100 Scenario
- ===============================================================================================*/
- val PRLC100SolicitorScenario = scenario("***** Private Law C100 Create Case *****")
- .exitBlockOnFail {
- feed(UserFeederPRL)
- .exec(_.set("env", s"${env}")
- .set("caseType", "PRLAPPS"))
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .exec(Solicitor_PRL_C100.CreatePrivateLawCase)
- .exec(Solicitor_PRL_C100.TypeOfApplication)
- .exec(Solicitor_PRL_C100.HearingUrgency)
- .exec(Solicitor_PRL_C100.ApplicantDetails)
- .exec(Solicitor_PRL_C100.ChildDetails)
- .exec(Solicitor_PRL_C100.RespondentDetails)
- .exec(Solicitor_PRL_C100.AllegationsOfHarm)
- .exec(Solicitor_PRL_C100.OtherChildrenNotInCase)
- .exec(Solicitor_PRL_C100.OtherPeopleInCase)
- .exec(Solicitor_PRL_C100.ChildrenAndApplicants)
- .exec(Solicitor_PRL_C100.ChildrenAndRespondents)
- .exec(Solicitor_PRL_C100.ChildrenAndOtherPeople)
- .exec(Solicitor_PRL_C100.MIAM)
- .exec(Solicitor_PRL_C100.ViewPdfApplication)
- .exec(Solicitor_PRL_C100.SubmitAndPay)
- .exec(Solicitor_PRL_C100.HearingsTab)
- .exec(XuiHelper.Logout)
- }
-
- /*===============================================================================================
- * XUI Solicitor Private Law FL401 Scenario
- ===============================================================================================*/
- val PRLFL401SolicitorScenario = scenario("***** Private Law FL401 Create Case *****")
- .exitBlockOnFail {
- feed(UserFeederPRL)
- .exec(_.set("env", s"${env}")
- .set("caseType", "PRLAPPS"))
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .exec(Solicitor_PRL_FL401.CreatePrivateLawCase)
- .exec(Solicitor_PRL_FL401.TypeOfApplication)
- .exec(Solicitor_PRL_FL401.WithoutNoticeOrder)
- .exec(Solicitor_PRL_FL401.ApplicantDetails)
- .exec(Solicitor_PRL_FL401.RespondentDetails)
- .exec(Solicitor_PRL_FL401.ApplicantsFamily)
- .exec(Solicitor_PRL_FL401.Relationship)
- .exec(Solicitor_PRL_FL401.Behaviour)
- .exec(Solicitor_PRL_FL401.TheHome)
- .exec(Solicitor_PRL_FL401.UploadDocuments)
- .exec(Solicitor_PRL_FL401.ViewPDF)
- .exec(Solicitor_PRL_FL401.StatementOfTruth)
- .exec(Solicitor_PRL_FL401.HearingsTab)
- .exec(XuiHelper.Logout)
- }
-
- /*===============================================================================================
- * XUI Legal Rep Bails Scenario
- ===============================================================================================*/
- val BailsScenario = scenario("***** Bails Create Application *****")
- .exitBlockOnFail {
- feed(UserFeederBails)
- .exec(_.set("env", s"${env}")
- .set("caseType", "Bail"))
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .exec(Solicitor_Bails.CreateBailApplication)
- .exec(Solicitor_Bails.SubmitBailApplication)
- .exec(XuiHelper.Logout)
-
- .feed(UserFeederBailsAdmin)
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .exec(Solicitor_Bails.ConfirmLocation)
- .exec(Solicitor_Bails.ListCase)
- .exec(XuiHelper.Logout)
-
- .feed(UserFeederBailsHO)
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .exec(Solicitor_Bails.UploadBailSummary)
- .exec(XuiHelper.Logout)
+ //Elastic search is being used to identify appropriate cases for Barrister scenarios
+ val iterationsC100 = if (debugMode == "off") CalculateRecordsRequired.calculate(prlC100BarristerTargetPerHour*3, rampUpDurationMins, testDurationMins, rampDownDurationMins) else 1
+ val iterationsFL401 = if (debugMode == "off") CalculateRecordsRequired.calculate(prlFL401BarristerTargetPerHour*3, rampUpDurationMins, testDurationMins, rampDownDurationMins) else 1
+ val currentPath: String = System.getProperty("user.dir")
+
+ /*val caseIdFeederC100 = ElasticSearchCaseFeeder.feeder(
+ esIndices.PRL,
+ s"${currentPath}/src/gatling/resources/bodies/prl/c100/C100_ElasticSearch_Query.json",
+ FeederType.RANDOM,
+ iterationsC100)
+
+ val caseIdFeederFL401 = ElasticSearchCaseFeeder.feeder(
+ esIndices.PRL,
+ s"${currentPath}/src/gatling/resources/bodies/prl/fl401/FL401_ElasticSearch_Query.json",
+ FeederType.RANDOM,
+ iterationsFL401)
+
+ def getCaseC100(caseIdFeederC100: Iterator[Map[String, Any]]) =
+ feed(caseIdFeederC100)
+
+ def getCaseFL401(caseIdFeederFL401: Iterator[Map[String, Any]]) =
+ feed(caseIdFeederFL401)*/
+
+
+ /*===============================================================================================
+* XUI Solicitor Private Law C100 Scenario
+===============================================================================================*/
+ val PRLC100SolicitorScenario = scenario("***** Private Law Solicitor C100 Create Case *****")
+ .exitBlockOnFail {
+ feed(UserFeederPRL)
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "PRLAPPS"))
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ //Solicitor creates application
+ .exec(Solicitor_PRL_C100.CreatePrivateLawCase)
+ .exec(Solicitor_PRL_C100.TypeOfApplication)
+ .exec(Solicitor_PRL_C100.HearingUrgency)
+ .exec(Solicitor_PRL_C100.ApplicantDetails)
+ .exec(Solicitor_PRL_C100.ChildDetails)
+ .exec(Solicitor_PRL_C100.RespondentDetails)
+ .exec(Solicitor_PRL_C100.AllegationsOfHarm)
+ .exec(Solicitor_PRL_C100.OtherChildrenNotInCase)
+ .exec(Solicitor_PRL_C100.OtherPeopleInCase)
+ .exec(Solicitor_PRL_C100.ChildrenAndApplicants)
+ .exec(Solicitor_PRL_C100.ChildrenAndRespondents)
+ .exec(Solicitor_PRL_C100.ChildrenAndOtherPeople)
+ .exec(Solicitor_PRL_C100.MIAM)
+ .exec(Solicitor_PRL_C100.ViewPdfApplication)
+ .exec(Solicitor_PRL_C100.SubmitAndPay)
+ .exec(XuiHelper.Logout)
+ .feed(UserFeederPRLCourtAdmin)
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ //Case worker progress case
+ .exec(CourtAdmin_PRL_C100.CourtAdminCheckApplication)
+ .exec(CourtAdmin_PRL_C100.CourtAdminSendToGateKeeper)
+ .exec(CourtAdmin_PRL_C100.CourtAdminManageOrders)
+ .exec(CourtAdmin_PRL_C100.CourtAdminServiceApplication)
+ //.exec(CourtAdmin_PRL_C100.CourtAdminListHearing)
+ //.exec(CourtAdmin_PRL_C100.CourtAdminHearingsTab)
+ .exec(XuiHelper.Logout)
+ /*.feed(UserFeederPRLCourtAdmin)
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(CourtAdmin_PRL_C100.PathfinderCase)
+ .exec(CourtAdmin_PRL_C100.AddLocalAuthority)
+ .exec(XuiHelper.Logout)*/
+ }
+
+ /*===============================================================================================
+* XUI Add LA to C100 Scenario
+===============================================================================================*/
+ /*val PRLC100AddLAScenario = scenario("***** Private Law Solicitor C100 Create Case *****")
+ .exitBlockOnFail {
+ feed(UserFeederLA)
+ .feed(UserFeederPRLCourtAdmin)
+ .feed(AddLAList)
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "PRLAPPS"))
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(CourtAdmin_PRL_C100.PathfinderCase)
+ .exec(CourtAdmin_PRL_C100.AddLocalAuthority)
+ .exec(CourtAdmin_PRL_C100.writeToFile)
+ .exec(XuiHelper.Logout)
+ }*/
+
+ /*===============================================================================================
+* XUI Add LA to C100 Scenario
+===============================================================================================*/
+ /*val PRLC100LAScenario = scenario("***** Private Law Solicitor C100 Create Case *****")
+ .exitBlockOnFail {
+ feed(UserFeederLA)
+ .feed(UserFeederPRLCourtAdmin)
+ .feed(LAList)
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "PRLAPPS"))
+ //.exec(XuiHelper.Homepage)
+ //.exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ //.exec(CourtAdmin_PRL_C100.PathfinderCase)
+ //.exec(XuiHelper.Logout)
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{LAUser}", "#{LAPassword}"))
+ .exec(CourtAdmin_PRL_C100.LAOpenCase)
+ .exec(CourtAdmin_PRL_C100.clickParties)
+ .exec(CourtAdmin_PRL_C100.ManageDocsUpload)
+ .exec(CourtAdmin_PRL_C100.caseFileView)
+ .exec(XuiHelper.Logout)
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(CourtAdmin_PRL_C100.RemoveLocalAuthority)
+ .exec(XuiHelper.Logout)
+ }*/
+
+ /*===============================================================================================
+* XUI Solicitor Private Law Scenario - FL401
+ ===============================================================================================*/
+ val PRLFL401SolicitorScenario = scenario("***** Private Law Solicitor FL401 Create Case *****")
+ .exitBlockOnFail {
+ feed(UserFeederPRL)
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "PRLAPPS"))
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .feed(UserFeederPRL)
+ //Solicitor creates application
+ .exec(Solicitor_PRL_FL401.CreatePrivateLawCase)
+ .exec(Solicitor_PRL_FL401.TypeOfApplication)
+ .exec(Solicitor_PRL_FL401.WithoutNoticeOrder)
+ .exec(Solicitor_PRL_FL401.ApplicantDetails)
+ .exec(Solicitor_PRL_FL401.RespondentDetails)
+ .exec(Solicitor_PRL_FL401.ApplicantsFamily)
+ .exec(Solicitor_PRL_FL401.Relationship)
+ .exec(Solicitor_PRL_FL401.Behaviour)
+ .exec(Solicitor_PRL_FL401.TheHome)
+ .exec(Solicitor_PRL_FL401.UploadDocuments)
+ .exec(Solicitor_PRL_FL401.ViewPDF)
+ .exec(Solicitor_PRL_FL401.StatementOfTruth)
+ .exec(XuiHelper.Logout)
+ .feed(UserFeederPRLCourtAdmin)
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ //Case worker progress case
+ .exec(CourtAdmin_PRL_FL401.CourtAdminCheckApplication)
+ .exec(CourtAdmin_PRL_FL401.CourtAdminSendToGateKeeper)
+ .exec(CourtAdmin_PRL_FL401.CourtAdminManageOrders)
+ .exec(CourtAdmin_PRL_FL401.CourtAdminServiceApplication)
+ //.exec(CourtAdmin_PRL_FL401.CourtAdminListHearing)
+ //.exec(CourtAdmin_PRL_FL401.CourtAdminHearingsTab)
+ .exec(XuiHelper.Logout)
- .feed(UserFeederBailsJudge)
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .exec(Solicitor_Bails.RecordBailDecision)
- .exec(Solicitor_Bails.UploadSignedDecision)
- .exec(XuiHelper.Logout)
- }
+ }
- /*===============================================================================================
- * XUI Solicitor Probate Scenario
- ===============================================================================================*/
- val ProbateSolicitorScenario = scenario("***** Probate Create Case *****")
+ /*===============================================================================================
+* XUI Barrister Private Law C100 Scenario
+ ===============================================================================================*/
+ /*val PRLC100BarristerScenario = scenario("***** Private Law Barrister C100 Create Case *****")
.exitBlockOnFail {
- feed(UserFeederProbate)
+ feed(UserFeederPRL)
+ .feed(UserFeederPRLBarrister)
+ .exec(session =>
+ session.setAll(
+ "appOrgID" -> session("orgID").as[String],
+ "appBarristerUser" -> session("barristerUser").as[String],
+ "appBarristerPassword" -> session("barristerPassword").as[String],
+ "appBarristerFirm" -> session("barristerFirm").as[String],
+ "appBarristerFirstName" -> session("barristerFirstName").as[String],
+ "appBarristerLastName" -> session("barristerLastName").as[String],
+ )
+ )
+ .feed(UserFeederPRLBarrister)
+ .exec(session =>
+ session.setAll(
+ "defOrgID" -> session("orgID").as[String],
+ "defBarristerUser" -> session("barristerUser").as[String],
+ "defBarristerPassword" -> session("barristerPassword").as[String],
+ "defBarristerFirm" -> session("barristerFirm").as[String],
+ "defBarristerFirstName" -> session("barristerFirstName").as[String],
+ "defBarristerLastName" -> session("barristerLastName").as[String],
+ ))
+ .exec(getCaseC100(caseIdFeederC100))
.exec(_.set("env", s"${env}")
- .set("caseType", "GrantOfRepresentation"))
+ .set("caseType", "PRLAPPS"))
+ .feed(UserFeederPRLCourtAdmin)
+ .exec(_.set("currentDate", LocalDateTime.now.format(patternDate)))
+ //Add Barrister for Applicant
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .repeat(2) {
- exec(Solicitor_Probate.CreateProbateCase)
- .exec(Solicitor_Probate.AddDeceasedDetails)
- .exec(Solicitor_Probate.AddApplicationDetails)
- .exec(Solicitor_Probate.ReviewAndSubmitApplication)
- }
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(CourtAdmin_PRL_C100.AddBarristerC100Applicant)
.exec(XuiHelper.Logout)
- }
-
- /*===============================================================================================
- * XUI Solicitor IAC Scenario
- ===============================================================================================*/
- val ImmigrationAndAsylumSolicitorScenario = scenario("***** IAC Create Case *****")
- .exitBlockOnFail {
- feed(UserFeederIAC)
- .exec(_.set("env", s"${env}")
- .set("caseType", "Asylum"))
+ //Add Document
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .repeat(2) {
- exec(Solicitor_IAC.CreateIACCase)
- // .exec(Solicitor_IAC.shareacase) //Temp removed as the way to share a case is now done through the case list
- }
+ .exec(XuiHelper.Login("#{appBarristerUser}", "#{appBarristerPassword}"))
+ .exec(Barrister_PRL_C100.AddDocumentC100Applicant)
.exec(XuiHelper.Logout)
- }
-
- /*===============================================================================================
- * XUI Solicitor NFD Scenario (Sole Application)
- ===============================================================================================*/
- val NoFaultDivorceSolicitorSoleScenario = scenario("***** NFD Create Case (Sole) *****")
- .exitBlockOnFail {
- //feed two rows of data - applicant1's solicitor and applicant2's solicitor
- feed(UserFeederNFD, 2)
-
- /*
- the below code (first 4 lines) is required since Gatling 3.8, as the multi-line feeder above no longer
- generates individual session variables, but now produces arrays - see https://github.com/gatling/gatling/issues/4226
- Once set in the session as sequences, the session variables can be referenced:
- e.g. #{users(0)}, #{users(1)}, etc using the Gatling DSL
- or session("users").as[Seq[String]].apply(0) without the DSL
- */
- .exec { session =>
- session
- .set("env", s"${env}")
- .set("caseType", "NFD")
- .set("nfdCaseType", "sole")
- .set("NFDLabelsInitialised", nfdSoleLabelsInitialised) //sets the initialised labels for JSON bodies
- .set("NFDLabelsPopulated", nfdSoleLabelsPopulated) //sets the populated labels for JSON bodies
- }
-
- //Solicitor 1 - Divorce Application
+ //Add Barrister for Applicant
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
- .exec(Solicitor_NFD.CreateNFDCase)
- .exec(Solicitor_NFD.SignAndSubmitSole)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(CourtAdmin_PRL_C100.AddBarristerC100Defendent)
.exec(XuiHelper.Logout)
- //Caseworker - Issue Application
- .exec(CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-issue-application", "bodies/nfd/CWIssueApplication.json"))
- //Update the case in CCD to assign it to the second solicitor
- .exec(CCDAPI.AssignCase)
- //Solicitor 2 - Respond to Divorce Application
+ //Add Document
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(1)}", "#{password(1)}"))
- .exec(Solicitor_NFD.RespondToNFDCase)
+ .exec(XuiHelper.Login("#{defBarristerUser}", "#{defBarristerPassword}"))
+ .exec(Barrister_PRL_C100.AddDocumentC100Respondent)
.exec(XuiHelper.Logout)
- //Caseworker - Mark the Case as Awaiting Conditional Order (to bypass 20-week holding)
- .exec(CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-progress-held-case", "bodies/nfd/CWAwaitingConditionalOrder.json"))
- //Solicitor 1 - Apply for Conditional Order
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
- .exec(Solicitor_NFD.ApplyForCOSole)
- .exec(Solicitor_NFD.SubmitCO)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(CourtAdmin_PRL_C100.ServiceOfApplicationC100)
+ .exec(CourtAdmin_PRL_C100.FinalDecisionC100)
.exec(XuiHelper.Logout)
- //Legal Advisor - Grant Conditional Order
- .exec(CCDAPI.CreateEvent("Legal", "DIVORCE", "NFD", "legal-advisor-make-decision", "bodies/nfd/LAMakeDecision.json"))
- //Caseworker - Make Eligible for Final Order
- .exec(
- //link with bulk case
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-link-with-bulk-case", "bodies/nfd/CWLinkWithBulkCase.json"),
- //set case hearing and decision dates to a date in the past
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-update-case-court-hearing", "bodies/nfd/CWUpdateCaseWithCourtHearing.json"),
- //set judge details, CO granted and issued dates in the past
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-amend-case", "bodies/nfd/CWSetCODetails.json"),
- //pronounce case
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-pronounce-case", "bodies/nfd/CWPronounceCase.json"),
- //set final order eligibility dates
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-amend-case", "bodies/nfd/CWSetFOEligibilityDates.json"),
- //set case as awaiting final order
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-progress-case-awaiting-final-order", "bodies/nfd/CWAwaitingFinalOrder.json"))
- //Solicitor 1 - Apply for Final Order
+ //Remove Barrister
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
- .exec(Solicitor_NFD.ApplyForFO)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(CourtAdmin_PRL_C100.RemoveBarristerC100Applicant)
+ .exec(CourtAdmin_PRL_C100.RemoveBarristerC100Defendent)
.exec(XuiHelper.Logout)
- //Caseworker - Grant Final Order
- .exec(
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-grant-final-order", "bodies/nfd/CWGrantFinalOrder.json"))
- }
-
- /*.exec {
- session =>
- println(session)
- session
}*/
+
/*===============================================================================================
- * XUI Solicitor NFD Scenario (Joint Application)
- ===============================================================================================*/
- val NoFaultDivorceSolicitorJointScenario = scenario("***** NFD Create Case (Joint) *****")
+* XUI Barrister Private Law FL401 Scenario
+ ===============================================================================================*/
+ /*val PRLFL401BarristerScenario = scenario("***** Private Law Barrister FL401 Create Case *****")
.exitBlockOnFail {
- //feed two rows of data - applicant1's solicitor and applicant2's solicitor
- feed(UserFeederNFD, 2)
-
- /*
- the below code (first 4 lines) is required since Gatling 3.8, as the multi-line feeder above no longer
- generates individual session variables, but now produces arrays - see https://github.com/gatling/gatling/issues/4226
- Once set in the session as sequences, the session variables can be referenced:
- e.g. #{users(0)}, #{users(1)}, etc using the Gatling DSL
- or session("users").as[Seq[String]].apply(0) without the DSL
- */
- .exec { session =>
- session
- .set("env", s"${env}")
- .set("caseType", "NFD")
- .set("nfdCaseType", "joint")
- .set("NFDLabelsInitialised", nfdJointLabelsInitialised) //sets the initialised labels for JSON bodies
- .set("NFDLabelsPopulated", nfdJointLabelsPopulated) //sets the populated labels for JSON bodies
- }
-
- //Solicitor 1 - Divorce Application
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
- .exec(Solicitor_NFD.CreateNFDCase)
- .exec(Solicitor_NFD.JointInviteApplicant2)
- .exec(XuiHelper.Logout)
- //Update the case in CCD to assign it to the second solicitor
- .exec(CCDAPI.AssignCase)
- //Solicitor 2 - Confirm Divorce Application
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(1)}", "#{password(1)}"))
- .exec(Solicitor_NFD.SubmitJointApplication)
- .exec(XuiHelper.Logout)
- //Solicitor 1 - Submit Application
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
- .exec(Solicitor_NFD.SignAndSubmitJoint)
- .exec(XuiHelper.Logout)
- //Caseworker - Issue Application
- .exec(CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-issue-application", "bodies/nfd/CWIssueApplication.json"))
- //Caseworker - Mark the Case as Awaiting Conditional Order (to bypass 20-week holding)
- .exec(CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-progress-held-case", "bodies/nfd/CWAwaitingConditionalOrder.json"))
- //Solicitor 1 - Apply for Conditional Order
+ feed(UserFeederPRL)
+ .feed(UserFeederPRLBarrister)
+ .exec(session =>
+ session.setAll(
+ "appOrgID" -> session("orgID").as[String],
+ "appBarristerUser" -> session("barristerUser").as[String],
+ "appBarristerPassword" -> session("barristerPassword").as[String],
+ "appBarristerFirm" -> session("barristerFirm").as[String],
+ "appBarristerFirstName" -> session("barristerFirstName").as[String],
+ "appBarristerLastName" -> session("barristerLastName").as[String]))
+ .exec(_.set("currentDate", LocalDateTime.now.format(patternDate)))
+ .exec(getCaseFL401(caseIdFeederFL401))
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "PRLAPPS"))
+ .feed(UserFeederPRLCourtAdmin)
+ //Add Barrister
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
- .exec(Solicitor_NFD.ApplyForCOJointApplicant1)
- .exec(Solicitor_NFD.SubmitCO)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(Solicitor_PRL_FL401.AddBarristerFL401Applicant)
.exec(XuiHelper.Logout)
- //Solicitor 2 - Apply for Conditional Order
+ //Draft order
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(1)}", "#{password(1)}"))
- .exec(Solicitor_NFD.ApplyForCOJointApplicant2)
- .exec(Solicitor_NFD.SubmitCOJoint)
+ .exec(XuiHelper.Login("#{appBarristerUser}", "#{appBarristerPassword}"))
+ .exec(Barrister_PRL_FL401.DraftAnOrderFL401)
.exec(XuiHelper.Logout)
- //Legal Advisor - Grant Conditional Order
- .exec(CCDAPI.CreateEvent("Legal", "DIVORCE", "NFD", "legal-advisor-make-decision", "bodies/nfd/LAMakeDecision.json"))
- //Caseworker - Make Eligible for Final Order
- .exec(
- //link with bulk case
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-link-with-bulk-case", "bodies/nfd/CWLinkWithBulkCase.json"),
- //set case hearing and decision dates to a date in the past
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-update-case-court-hearing", "bodies/nfd/CWUpdateCaseWithCourtHearing.json"),
- //set judge details, CO granted and issued dates in the past
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-amend-case", "bodies/nfd/CWSetCODetails.json"),
- //pronounce case
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-pronounce-case", "bodies/nfd/CWPronounceCase.json"),
- //set final order eligibility dates
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-amend-case", "bodies/nfd/CWSetFOEligibilityDates.json"),
- //set case as awaiting final order
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-progress-case-awaiting-final-order", "bodies/nfd/CWAwaitingFinalOrder.json"))
- //Solicitor 1 - Apply for Final Order
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
- .exec(Solicitor_NFD.ApplyForFO)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(CourtAdmin_PRL_FL401.ServiceOfApplicationFL401)
+ .exec(CourtAdmin_PRL_FL401.FinalDecisionFL401)
.exec(XuiHelper.Logout)
- //Solicitor 2 - Apply for Final Order
+ //Remove Barrister
.exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user(1)}", "#{password(1)}"))
- .exec(Solicitor_NFD.ApplyForFOJoint)
+ .exec(XuiHelper.Login("#{userCourtAdmin}", "#{passwordCourtAdmin}"))
+ .exec(Solicitor_PRL_FL401.RemoveBarristerFL401Applicant)
.exec(XuiHelper.Logout)
- //Caseworker - Grant Final Order
- .exec(
- CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-grant-final-order", "bodies/nfd/CWGrantFinalOrder.json"))
- }
-
- /*.exec {
- session =>
- println(session)
- session
}*/
- /*===============================================================================================
- * XUI Solicitor Financial Remedy (FR) Consented Scenario
- ===============================================================================================*/
- val FinancialRemedySolicitorConsentedScenario = scenario("***** FR Create Consented Case *****")
- .exitBlockOnFail {
- feed(UserFeederFR)
- .exec(_.set("env", s"${env}")
- .set("caseType", "FinancialRemedyMVP2"))
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .repeat(2) {
- exec(Solicitor_FR_Consented.CreateFRCase)
- }
- .exec(XuiHelper.Logout)
- }
-
- /*===============================================================================================
- * XUI Solicitor Financial Remedy (FR) Contested Scenario
- ===============================================================================================*/
- val FinancialRemedySolicitorContestedScenario = scenario("***** FR Create Contested Case *****")
- .exitBlockOnFail {
- feed(UserFeederFR)
- .exec(_.set("env", s"${env}")
- .set("caseType", "FinancialRemedyContested"))
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .repeat(1) {
- exec(Solicitor_FR_Contested.CreateFRCase)
- }
- .exec(XuiHelper.Logout)
- }
-
- /*===============================================================================================
- * XUI Solicitor Family Public Law (FPL) Scenario
- ===============================================================================================*/
- val FamilyPublicLawSolicitorScenario = scenario("***** FPL Create Case *****")
- .exitBlockOnFail {
- feed(UserFeederFPL)
- .exec(_.set("env", s"${env}")
- .set("caseType", "CARE_SUPERVISION_EPO"))
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .exec(Solicitor_FPL.CreateFPLCase)
- .exec(Solicitor_FPL.fplOrdersAndDirections)
- .exec(Solicitor_FPL.fplHearingUrgency)
- .exec(Solicitor_FPL.fplGrounds)
- .exec(Solicitor_FPL.fplLocalAuthority)
- .exec(Solicitor_FPL.fplChildDetails)
- .exec(Solicitor_FPL.fplRespondentDetails)
- .exec(Solicitor_FPL.fplAllocationProposal)
- .exec(Solicitor_FPL.fplSubmitApplication)
- .exec(Solicitor_FPL.fplReturnToCase)
- //.exec(Solicitor_FPL.QueryManagement) //Temporarily removing QM until FPL is onboarded in XUI master
+ /*===============================================================================================
+ * XUI Legal Rep Bails Scenario
+ ===============================================================================================*/
+ val BailsScenario = scenario("***** Bails Create Application *****")
+ .exitBlockOnFail {
+ feed(UserFeederBails)
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "Bail"))
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .exec(Solicitor_Bails.CreateBailApplication)
+ .exec(Solicitor_Bails.SubmitBailApplication)
.exec(XuiHelper.Logout)
- //.feed(UserFeederCTSC)
- //.exec(Homepage.XUIHomePage)
- //.exec(Login.XUILogin)
- //.exec(Solicitor_FPL.RespondToQueryManagement)
- //.exec(XuiHelper.Logout)
- }
- /*===============================================================================================
- * XUI Caseworker - Search & View Case Scenario
- ===============================================================================================*/
- val CaseworkerScenario = scenario("***** Caseworker Journey ******")
- .exitBlockOnFail {
- feed(CaseworkerUserFeeder)
- //TODO: UPDATE caseType with something more dynamic
- .exec(_.set("env", s"${env}")
- .set("caseType", "NFD"))
- .exec(XuiHelper.Homepage)
- .exec(XuiHelper.Login("#{user}", "#{password}"))
- .exec(Caseworker_Navigation.ApplyFilter)
- .exec(Caseworker_Navigation.SortByLastModifiedDate)
- .exec(Caseworker_Navigation.LoadPage2)
- //Only continue with the case activities if results were returned
- .doIf(session => session("numberOfResults").as[Int] > 0) {
- exec(Caseworker_Navigation.SearchByCaseNumber)
- .exec(Caseworker_Navigation.ViewCase)
- // .exec(Caseworker_Navigation.NavigateTabs) //Removing as clicking tabs no longer initiates calls
- .exec(Caseworker_Navigation.ViewDocument)
- }
- .exec(Caseworker_Navigation.LoadCaseList)
- .exec(XuiHelper.Logout)
- }
+ .feed(UserFeederBailsAdmin)
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .exec(Solicitor_Bails.ConfirmLocation)
+ .exec(Solicitor_Bails.ListCase)
+ .exec(XuiHelper.Logout)
- /*===============================================================================================
- * Simulation Configuration
- ===============================================================================================*/
-
- def simulationProfile(simulationType: String, userPerHourRate: Double, numberOfPipelineUsers: Double): Seq[OpenInjectionStep] = {
- val userPerSecRate = userPerHourRate / 3600
- simulationType match {
- case "perftest" =>
- if (debugMode == "off") {
- Seq(
- rampUsersPerSec(0.00) to (userPerSecRate) during (rampUpDurationMins.minutes),
- constantUsersPerSec(userPerSecRate) during (testDurationMins.minutes),
- rampUsersPerSec(userPerSecRate) to (0.00) during (rampDownDurationMins.minutes)
- )
- }
- else {
- Seq(atOnceUsers(1))
- }
- case "pipeline" =>
- Seq(rampUsers(numberOfPipelineUsers.toInt) during (2.minutes))
- case _ =>
- Seq(nothingFor(0))
- }
- }
+ .feed(UserFeederBailsHO)
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .exec(Solicitor_Bails.UploadBailSummary)
+ .exec(XuiHelper.Logout)
- //defines the test assertions, based on the test type
- def assertions(simulationType: String): Seq[Assertion] = {
- simulationType match {
- case "perftest" | "pipeline" => //currently using the same assertions for a performance test and the pipeline
- if (debugMode == "off") {
- Seq(global.successfulRequests.percent.gte(95),
- details("XUI_PRL_C100_700_SubmitAndPayNow").successfulRequests.percent.gte(80),
- details("XUI_PRL_FL401_490_SOTSubmit").successfulRequests.percent.gte(80),
- details("XUI_Bails_770_Upload_Signed_Notice_Submit").successfulRequests.percent.gte(80),
- details("XUI_Probate_330_ViewCase").successfulRequests.percent.gte(80),
- details("XUI_IAC_280_005_AppealDeclarationSubmitted").successfulRequests.percent.gte(80),
- details("XUI_000_CCDEvent-system-progress-case-awaiting-final-order").successfulRequests.percent.gte(80), //NFD Sole
- details("XUI_000_CCDEvent-system-progress-held-case").successfulRequests.percent.gte(80), //NFD Joint
- details("XUI_FR_Consented_170_SubmitApplication").successfulRequests.percent.gte(80),
- details("XUI_FR_Contested_200_ReviewAndSubmitApplication").successfulRequests.percent.gte(80),
- details("XUI_FPL_330_ReturnToCase").successfulRequests.percent.gte(80),
- details("XUI_Caseworker_100_CaseList").successfulRequests.percent.gte(80))
- }
- else {
- Seq(global.successfulRequests.percent.is(100))
- }
- case _ =>
- Seq()
- }
- }
+ .feed(UserFeederBailsJudge)
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .exec(Solicitor_Bails.RecordBailDecision)
+ .exec(Solicitor_Bails.UploadSignedDecision)
+ .exec(XuiHelper.Logout)
+ }
+
+ /*===============================================================================================
+ * XUI Solicitor Probate Scenario
+ ===============================================================================================*/
+ val ProbateSolicitorScenario = scenario("***** Probate Create Case *****")
+ .exitBlockOnFail {
+ feed(UserFeederProbate)
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "GrantOfRepresentation"))
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .repeat(2) {
+ exec(Solicitor_Probate.CreateProbateCase)
+ .exec(Solicitor_Probate.AddDeceasedDetails)
+ .exec(Solicitor_Probate.AddApplicationDetails)
+ .exec(Solicitor_Probate.ReviewAndSubmitApplication)
+ }
+ .exec(XuiHelper.Logout)
+ }
+
+ /*===============================================================================================
+ * XUI Solicitor IAC Scenario
+ ===============================================================================================*/
+ val ImmigrationAndAsylumSolicitorScenario = scenario("***** IAC Create Case *****")
+ .exitBlockOnFail {
+ feed(UserFeederIAC)
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "Asylum"))
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .repeat(2) {
+ exec(Solicitor_IAC.CreateIACCase)
+ // .exec(Solicitor_IAC.shareacase) //Temp removed as the way to share a case is now done through the case list
+ }
+ .exec(XuiHelper.Logout)
+ }
+
+ /*===============================================================================================
+ * XUI Solicitor NFD Scenario (Sole Application)
+ ===============================================================================================*/
+ val NoFaultDivorceSolicitorSoleScenario = scenario("***** NFD Create Case (Sole) *****")
+ .exitBlockOnFail {
+ //feed two rows of data - applicant1's solicitor and applicant2's solicitor
+ feed(UserFeederNFD, 2)
+
+ /*
+ the below code (first 4 lines) is required since Gatling 3.8, as the multi-line feeder above no longer
+ generates individual session variables, but now produces arrays - see https://github.com/gatling/gatling/issues/4226
+ Once set in the session as sequences, the session variables can be referenced:
+ e.g. #{users(0)}, #{users(1)}, etc using the Gatling DSL
+ or session("users").as[Seq[String]].apply(0) without the DSL
+ */
+ .exec { session =>
+ session
+ .set("env", s"${env}")
+ .set("caseType", "NFD")
+ .set("nfdCaseType", "sole")
+ .set("NFDLabelsInitialised", nfdSoleLabelsInitialised) //sets the initialised labels for JSON bodies
+ .set("NFDLabelsPopulated", nfdSoleLabelsPopulated) //sets the populated labels for JSON bodies
+ }
+
+ //Solicitor 1 - Divorce Application
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
+ .exec(Solicitor_NFD.CreateNFDCase)
+ .exec(Solicitor_NFD.SignAndSubmitSole)
+ .exec(XuiHelper.Logout)
+ //Caseworker - Issue Application
+ .exec(CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-issue-application", "bodies/nfd/CWIssueApplication.json"))
+ //Update the case in CCD to assign it to the second solicitor
+ .exec(CCDAPI.AssignCase)
+ //Solicitor 2 - Respond to Divorce Application
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(1)}", "#{password(1)}"))
+ .exec(Solicitor_NFD.RespondToNFDCase)
+ .exec(XuiHelper.Logout)
+ //Caseworker - Mark the Case as Awaiting Conditional Order (to bypass 20-week holding)
+ .exec(CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-progress-held-case", "bodies/nfd/CWAwaitingConditionalOrder.json"))
+ //Solicitor 1 - Apply for Conditional Order
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
+ .exec(Solicitor_NFD.ApplyForCOSole)
+ .exec(Solicitor_NFD.SubmitCO)
+ .exec(XuiHelper.Logout)
+ //Legal Advisor - Grant Conditional Order
+ .exec(CCDAPI.CreateEvent("Legal", "DIVORCE", "NFD", "legal-advisor-make-decision", "bodies/nfd/LAMakeDecision.json"))
+ //Caseworker - Make Eligible for Final Order
+ .exec(
+ //link with bulk case
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-link-with-bulk-case", "bodies/nfd/CWLinkWithBulkCase.json"),
+ //set case hearing and decision dates to a date in the past
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-update-case-court-hearing", "bodies/nfd/CWUpdateCaseWithCourtHearing.json"),
+ //set judge details, CO granted and issued dates in the past
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-amend-case", "bodies/nfd/CWSetCODetails.json"),
+ //pronounce case
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-pronounce-case", "bodies/nfd/CWPronounceCase.json"),
+ //set final order eligibility dates
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-amend-case", "bodies/nfd/CWSetFOEligibilityDates.json"),
+ //set case as awaiting final order
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-progress-case-awaiting-final-order", "bodies/nfd/CWAwaitingFinalOrder.json"))
+ //Solicitor 1 - Apply for Final Order
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
+ .exec(Solicitor_NFD.ApplyForFO)
+ .exec(XuiHelper.Logout)
+ //Caseworker - Grant Final Order
+ .exec(
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-grant-final-order", "bodies/nfd/CWGrantFinalOrder.json"))
+ }
+
+ /*.exec {
+ session =>
+ println(session)
+ session
+ }*/
+
+ /*===============================================================================================
+ * XUI Solicitor NFD Scenario (Joint Application)
+ ===============================================================================================*/
+ val NoFaultDivorceSolicitorJointScenario = scenario("***** NFD Create Case (Joint) *****")
+ .exitBlockOnFail {
+ //feed two rows of data - applicant1's solicitor and applicant2's solicitor
+ feed(UserFeederNFD, 2)
+
+ /*
+ the below code (first 4 lines) is required since Gatling 3.8, as the multi-line feeder above no longer
+ generates individual session variables, but now produces arrays - see https://github.com/gatling/gatling/issues/4226
+ Once set in the session as sequences, the session variables can be referenced:
+ e.g. #{users(0)}, #{users(1)}, etc using the Gatling DSL
+ or session("users").as[Seq[String]].apply(0) without the DSL
+ */
+ .exec { session =>
+ session
+ .set("env", s"${env}")
+ .set("caseType", "NFD")
+ .set("nfdCaseType", "joint")
+ .set("NFDLabelsInitialised", nfdJointLabelsInitialised) //sets the initialised labels for JSON bodies
+ .set("NFDLabelsPopulated", nfdJointLabelsPopulated) //sets the populated labels for JSON bodies
+ }
+
+ //Solicitor 1 - Divorce Application
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
+ .exec(Solicitor_NFD.CreateNFDCase)
+ .exec(Solicitor_NFD.JointInviteApplicant2)
+ .exec(XuiHelper.Logout)
+ //Update the case in CCD to assign it to the second solicitor
+ .exec(CCDAPI.AssignCase)
+ //Solicitor 2 - Confirm Divorce Application
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(1)}", "#{password(1)}"))
+ .exec(Solicitor_NFD.SubmitJointApplication)
+ .exec(XuiHelper.Logout)
+ //Solicitor 1 - Submit Application
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
+ .exec(Solicitor_NFD.SignAndSubmitJoint)
+ .exec(XuiHelper.Logout)
+ //Caseworker - Issue Application
+ .exec(CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-issue-application", "bodies/nfd/CWIssueApplication.json"))
+ //Caseworker - Mark the Case as Awaiting Conditional Order (to bypass 20-week holding)
+ .exec(CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-progress-held-case", "bodies/nfd/CWAwaitingConditionalOrder.json"))
+ //Solicitor 1 - Apply for Conditional Order
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
+ .exec(Solicitor_NFD.ApplyForCOJointApplicant1)
+ .exec(Solicitor_NFD.SubmitCO)
+ .exec(XuiHelper.Logout)
+ //Solicitor 2 - Apply for Conditional Order
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(1)}", "#{password(1)}"))
+ .exec(Solicitor_NFD.ApplyForCOJointApplicant2)
+ .exec(Solicitor_NFD.SubmitCOJoint)
+ .exec(XuiHelper.Logout)
+ //Legal Advisor - Grant Conditional Order
+ .exec(CCDAPI.CreateEvent("Legal", "DIVORCE", "NFD", "legal-advisor-make-decision", "bodies/nfd/LAMakeDecision.json"))
+ //Caseworker - Make Eligible for Final Order
+ .exec(
+ //link with bulk case
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-link-with-bulk-case", "bodies/nfd/CWLinkWithBulkCase.json"),
+ //set case hearing and decision dates to a date in the past
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-update-case-court-hearing", "bodies/nfd/CWUpdateCaseWithCourtHearing.json"),
+ //set judge details, CO granted and issued dates in the past
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-amend-case", "bodies/nfd/CWSetCODetails.json"),
+ //pronounce case
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-pronounce-case", "bodies/nfd/CWPronounceCase.json"),
+ //set final order eligibility dates
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-amend-case", "bodies/nfd/CWSetFOEligibilityDates.json"),
+ //set case as awaiting final order
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "system-progress-case-awaiting-final-order", "bodies/nfd/CWAwaitingFinalOrder.json"))
+ //Solicitor 1 - Apply for Final Order
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(0)}", "#{password(0)}"))
+ .exec(Solicitor_NFD.ApplyForFO)
+ .exec(XuiHelper.Logout)
+ //Solicitor 2 - Apply for Final Order
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user(1)}", "#{password(1)}"))
+ .exec(Solicitor_NFD.ApplyForFOJoint)
+ .exec(XuiHelper.Logout)
+ //Caseworker - Grant Final Order
+ .exec(
+ CCDAPI.CreateEvent("Caseworker", "DIVORCE", "NFD", "caseworker-grant-final-order", "bodies/nfd/CWGrantFinalOrder.json"))
+ }
+
+ /*.exec {
+ session =>
+ println(session)
+ session
+ }*/
+
+ /*===============================================================================================
+ * XUI Solicitor Financial Remedy (FR) Scenario
+ ===============================================================================================*/
+ val FinancialRemedySolicitorScenario = scenario("***** FR Create Case *****")
+ .exitBlockOnFail {
+ feed(UserFeederFR)
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "FinancialRemedyMVP2"))
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .repeat(2) {
+ exec(Solicitor_FR.CreateFRCase)
+ }
+ .exec(XuiHelper.Logout)
+ }
+
+ /*===============================================================================================
+ * XUI Solicitor Family Public Law (FPL) Scenario
+ ===============================================================================================*/
+ val FamilyPublicLawSolicitorScenario = scenario("***** FPL Create Case *****")
+ .exitBlockOnFail {
+ feed(UserFeederFPL)
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "CARE_SUPERVISION_EPO"))
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .exec(Solicitor_FPL.CreateFPLCase)
+ .exec(Solicitor_FPL.fplOrdersAndDirections)
+ .exec(Solicitor_FPL.fplHearingUrgency)
+ .exec(Solicitor_FPL.fplGrounds)
+ .exec(Solicitor_FPL.fplLocalAuthority)
+ .exec(Solicitor_FPL.fplChildDetails)
+ .exec(Solicitor_FPL.fplRespondentDetails)
+ .exec(Solicitor_FPL.fplAllocationProposal)
+ .exec(Solicitor_FPL.fplSubmitApplication)
+ .exec(Solicitor_FPL.fplReturnToCase)
+ //.exec(Solicitor_FPL.QueryManagement) //Temporarily removing QM until FPL is onboarded in XUI master
+ .exec(XuiHelper.Logout)
+ //.feed(UserFeederCTSC)
+ //.exec(Homepage.XUIHomePage)
+ //.exec(Login.XUILogin)
+ //.exec(Solicitor_FPL.RespondToQueryManagement)
+ //.exec(XuiHelper.Logout)
+ }
+
+ /*===============================================================================================
+ * XUI Caseworker - Search & View Case Scenario
+ ===============================================================================================*/
+ val CaseworkerScenario = scenario("***** Caseworker Journey ******")
+ .exitBlockOnFail {
+ feed(CaseworkerUserFeeder)
+ //TODO: UPDATE caseType with something more dynamic
+ .exec(_.set("env", s"${env}")
+ .set("caseType", "NFD"))
+ .exec(XuiHelper.Homepage)
+ .exec(XuiHelper.Login("#{user}", "#{password}"))
+ .exec(Caseworker_Navigation.ApplyFilter)
+ .exec(Caseworker_Navigation.SortByLastModifiedDate)
+ .exec(Caseworker_Navigation.LoadPage2)
+ //Only continue with the case activities if results were returned
+ .doIf(session => session("numberOfResults").as[Int] > 0) {
+ exec(Caseworker_Navigation.SearchByCaseNumber)
+ .exec(Caseworker_Navigation.ViewCase)
+ // .exec(Caseworker_Navigation.NavigateTabs) //Removing as clicking tabs no longer initiates calls
+ .exec(Caseworker_Navigation.ViewDocument)
+ }
+ .exec(Caseworker_Navigation.LoadCaseList)
+ .exec(XuiHelper.Logout)
+ }
+
+ /*===============================================================================================
+ * Simulation Configuration
+ ===============================================================================================*/
+
+ def simulationProfile(simulationType: String, userPerHourRate: Double, numberOfPipelineUsers: Double): Seq[OpenInjectionStep] = {
+ val userPerSecRate = userPerHourRate / 3600
+ simulationType match {
+ case "perftest" =>
+ if (debugMode == "off") {
+ Seq(
+ rampUsersPerSec(0.00) to (userPerSecRate) during (rampUpDurationMins.minutes),
+ constantUsersPerSec(userPerSecRate) during (testDurationMins.minutes),
+ rampUsersPerSec(userPerSecRate) to (0.00) during (rampDownDurationMins.minutes)
+ )
+ }
+ else {
+ Seq(atOnceUsers(1))
+ }
+ case "pipeline" =>
+ Seq(rampUsers(numberOfPipelineUsers.toInt) during (2.minutes))
+ case _ =>
+ Seq(nothingFor(0))
+ }
+ }
+
+ //defines the test assertions, based on the test type
+ def assertions(simulationType: String): Seq[Assertion] = {
+ simulationType match {
+ case "perftest" | "pipeline" => //currently using the same assertions for a performance test and the pipeline
+ if (debugMode == "off") {
+ Seq(global.successfulRequests.percent.gte(95),
+ details("XUI_PRL_C100_700_SubmitAndPayNow").successfulRequests.percent.gte(80),
+ details("XUI_PRL_FL401_490_SOTSubmit").successfulRequests.percent.gte(80),
+ details("XUI_Bails_770_Upload_Signed_Notice_Submit").successfulRequests.percent.gte(80),
+ details("XUI_Probate_330_ViewCase").successfulRequests.percent.gte(80),
+ details("XUI_IAC_280_005_AppealDeclarationSubmitted").successfulRequests.percent.gte(80),
+ details("XUI_000_CCDEvent-system-progress-case-awaiting-final-order").successfulRequests.percent.gte(80), //NFD Sole
+ details("XUI_000_CCDEvent-system-progress-held-case").successfulRequests.percent.gte(80), //NFD Joint
+ details("XUI_FR_170_SubmitApplication").successfulRequests.percent.gte(80),
+ details("XUI_FPL_330_ReturnToCase").successfulRequests.percent.gte(80),
+ details("XUI_Caseworker_100_CaseList").successfulRequests.percent.gte(80))
+ }
+ else {
+ Seq(global.successfulRequests.percent.is(100))
+ }
+ case _ =>
+ Seq()
+ }
+ }
setUp(
- PRLC100SolicitorScenario.inject(simulationProfile(testType, prlC100TargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- PRLFL401SolicitorScenario.inject(simulationProfile(testType, prlFL401TargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- BailsScenario.inject(simulationProfile(testType, bailsTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- ProbateSolicitorScenario.inject(simulationProfile(testType, probateTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- ImmigrationAndAsylumSolicitorScenario.inject(simulationProfile(testType, iacTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- NoFaultDivorceSolicitorSoleScenario.inject(simulationProfile(testType, nfdSoleTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- NoFaultDivorceSolicitorJointScenario.inject(simulationProfile(testType, nfdJointTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- FinancialRemedySolicitorConsentedScenario.inject(simulationProfile(testType, frConsentedTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- FinancialRemedySolicitorContestedScenario.inject(simulationProfile(testType, frContestedTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- FamilyPublicLawSolicitorScenario.inject(simulationProfile(testType, fplTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
- CaseworkerScenario.inject(simulationProfile(testType, caseworkerTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ //PRLC100SolicitorScenario.inject(simulationProfile(testType, 1, 1)).pauses(pauseOption),
+ //PRLFL401SolicitorScenario.inject(simulationProfile(testType, 1, 1)).pauses(pauseOption)
+ //PRLC100LAScenario.inject(simulationProfile(testType, 1, 1)).pauses(pauseOption)
+ PRLC100SolicitorScenario.inject(simulationProfile(testType, prlC100TargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ PRLFL401SolicitorScenario.inject(simulationProfile(testType, prlFL401TargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ /*PRLC100BarristerScenario.inject(simulationProfile(testType, prlC100BarristerTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ PRLFL401BarristerScenario.inject(simulationProfile(testType, prlFL401BarristerTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ BailsScenario.inject(simulationProfile(testType, bailsTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ ProbateSolicitorScenario.inject(simulationProfile(testType, probateTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ ImmigrationAndAsylumSolicitorScenario.inject(simulationProfile(testType, iacTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ NoFaultDivorceSolicitorSoleScenario.inject(simulationProfile(testType, nfdSoleTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ NoFaultDivorceSolicitorJointScenario.inject(simulationProfile(testType, nfdJointTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ FinancialRemedySolicitorScenario.inject(simulationProfile(testType, frTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ FamilyPublicLawSolicitorScenario.inject(simulationProfile(testType, fplTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),
+ CaseworkerScenario.inject(simulationProfile(testType, caseworkerTargetPerHour, numberOfPipelineUsers)).pauses(pauseOption),*/
).protocols(httpProtocol)
.assertions(assertions(testType))
.maxDuration(75.minutes)
+
}
diff --git a/src/gatling/simulations/utils/Common.scala b/src/gatling/simulations/utils/Common.scala
index 90779db9..43321cf9 100644
--- a/src/gatling/simulations/utils/Common.scala
+++ b/src/gatling/simulations/utils/Common.scala
@@ -21,6 +21,7 @@ object Common {
val patternMonth = DateTimeFormatter.ofPattern("MM")
val patternYear = DateTimeFormatter.ofPattern("yyyy")
val patternReference = DateTimeFormatter.ofPattern("d MMM yyyy")
+ val yearMonthDay = DateTimeFormatter.ofPattern("yyyy-MM-dd")
def randomString(length: Int) = {
rnd.alphanumeric.filter(_.isLetter).take(length).mkString
@@ -37,7 +38,27 @@ object Common {
def getMonth(): String = {
(1 + rnd.nextInt(12)).toString.format(patternMonth).reverse.padTo(2, '0').reverse //pads single-digit dates with a leading zero
}
-
+
+ //CurrentDate
+ def getDate(): String = {
+ now.format(yearMonthDay)
+ }
+ //CurrentYear
+ def getCurrentYear(): String = {
+ now.format(patternYear)
+ }
+ //CurrentMonth
+ def getCurrentMonth(): String = {
+ now.format(patternMonth)
+ }
+ //CurrentDay
+ def getCurrentDay(): String = {
+ now.format(patternDay)
+ }
+ // //Date +2 Months
+ def getFutureDate(): String = {
+ now.plusMonths(2).format(yearMonthDay)
+ }
//Date of Marriage >= 30 years
def getMarriageYear(): String = {
now.minusYears(30 + rnd.nextInt(30)).format(patternYear)
@@ -91,44 +112,44 @@ object Common {
.header("accept", "application/json, text/plain, */*")
.check(substring("""{"healthState":true}""")))
- val activity =
- exec(http("XUI_Common_000_ActivityOptions")
- .options("/activity/cases/#{caseId}/activity")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*")
- .header("sec-fetch-site", "same-site")
- .check(status.in(200, 304, 403)))
-
- val caseActivityGet =
- exec(http("XUI_Common_000_ActivityOptions")
- .options("/activity/cases/#{caseId}/activity")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*")
- .header("sec-fetch-site", "same-site")
- .check(status.in(200, 304, 403)))
-
- .exec(http("XUI_Common_000_ActivityGet")
- .get("/activity/cases/#{caseId}/activity")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*")
- .header("sec-fetch-site", "same-site")
- .check(status.in(200, 304, 403)))
-
- val caseActivityPost =
- exec(http("XUI_Common_000_ActivityOptions")
- .options("/activity/cases/#{caseId}/activity")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*")
- .header("sec-fetch-site", "same-site")
- .check(status.in(200, 304, 403)))
-
- .exec(http("XUI_Common_000_ActivityPost")
- .post("/activity/cases/#{caseId}/activity")
- .headers(Headers.commonHeader)
- .header("accept", "application/json, text/plain, */*")
- .header("sec-fetch-site", "same-site")
- .body(StringBody("{\n \"activity\": \"view\"\n}"))
- .check(status.in(200, 201, 304, 403)))
+ val activity = exec {session => session}
+ //exec(http("XUI_Common_000_ActivityOptions")
+ // .options("/activity/cases/#{caseId}/activity")
+ // .headers(Headers.commonHeader)
+ // .header("accept", "application/json, text/plain, */*")
+ // .header("sec-fetch-site", "same-site")
+ // .check(status.in(200, 304, 403)))
+
+ val caseActivityGet = exec {session => session}
+ //exec(http("XUI_Common_000_ActivityOptions")
+ // .options("/activity/cases/#{caseId}/activity")
+ // .headers(Headers.commonHeader)
+ // .header("accept", "application/json, text/plain, */*")
+ // .header("sec-fetch-site", "same-site")
+ // .check(status.in(200, 304, 403)))
+
+ //.exec(http("XUI_Common_000_ActivityGet")
+ // .get("/activity/cases/#{caseId}/activity")
+ // .headers(Headers.commonHeader)
+ // .header("accept", "application/json, text/plain, */*")
+ // .header("sec-fetch-site", "same-site")
+ // .check(status.in(200, 304, 403)))
+
+ val caseActivityPost = exec {session => session}
+ //exec(http("XUI_Common_000_ActivityOptions")
+ // .options("/activity/cases/#{caseId}/activity")
+ // .headers(Headers.commonHeader)
+ // .header("accept", "application/json, text/plain, */*")
+ // .header("sec-fetch-site", "same-site")
+ // .check(status.in(200, 304, 403)))
+
+ //.exec(http("XUI_Common_000_ActivityPost")
+ // .post("/activity/cases/#{caseId}/activity")
+ // .headers(Headers.commonHeader)
+ // .header("accept", "application/json, text/plain, */*")
+ // .header("sec-fetch-site", "same-site")
+ // .body(StringBody("{\n \"activity\": \"view\"\n}"))
+ // .check(status.in(200, 201, 304, 403)))
val configurationui =
exec(http("XUI_Common_000_ConfigurationUI")
diff --git a/src/gatling/simulations/utils/Environment.scala b/src/gatling/simulations/utils/Environment.scala
index fe2e2250..f53cfac3 100644
--- a/src/gatling/simulations/utils/Environment.scala
+++ b/src/gatling/simulations/utils/Environment.scala
@@ -7,6 +7,7 @@ object Environment {
val idamAPIURL = "https://idam-api.#{env}.platform.hmcts.net"
val rpeAPIURL = "http://rpe-service-auth-provider-#{env}.service.core-compute-#{env}.internal"
val ccdAPIURL = "http://ccd-data-store-api-#{env}.service.core-compute-#{env}.internal"
+ val hmcInboundURL = "http://hmc-hmi-inbound-adapter-#{env}.service.core-compute-#{env}.internal"
val minThinkTime = 5
val maxThinkTime = 7