diff --git a/ccd-definition/AuthorisationCaseField/AuthorisationCaseField-MINTI-nonprod.json b/ccd-definition/AuthorisationCaseField/AuthorisationCaseField-MINTI-nonprod.json index 17e0035cb3..638b386b59 100644 --- a/ccd-definition/AuthorisationCaseField/AuthorisationCaseField-MINTI-nonprod.json +++ b/ccd-definition/AuthorisationCaseField/AuthorisationCaseField-MINTI-nonprod.json @@ -352,6 +352,30 @@ } ] }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseFieldID": "orderAfterHearingDate", + "AccessControl": [ + { + "UserRoles": [ + "judge-profile" + ], + "CRUD": "CRU" + } + ] + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseFieldID": "showOrderAfterHearingDatePage", + "AccessControl": [ + { + "UserRoles": [ + "judge-profile" + ], + "CRUD": "CRU" + } + ] + }, { "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "CaseFieldID": "confirmListingTickBox", diff --git a/ccd-definition/AuthorisationCaseField/AuthorisationCaseField-caseworkerEvents-nonprod.json b/ccd-definition/AuthorisationCaseField/AuthorisationCaseField-caseworkerEvents-nonprod.json index 28c022ebb9..649bf10e1e 100644 --- a/ccd-definition/AuthorisationCaseField/AuthorisationCaseField-caseworkerEvents-nonprod.json +++ b/ccd-definition/AuthorisationCaseField/AuthorisationCaseField-caseworkerEvents-nonprod.json @@ -460,6 +460,18 @@ } ] }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseFieldID": "gaEaCourtLocation", + "AccessControl": [ + { + "UserRoles": [ + "caseworker-civil-systemupdate" + ], + "CRUD": "CRU" + } + ] + }, { "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "CaseFieldID": "obligationWAFlag", diff --git a/ccd-definition/CaseEvent/Camunda/CaseEventsGASpec.json b/ccd-definition/CaseEvent/Camunda/CaseEventsGASpec.json index f7b8c43ace..048784a8cb 100644 --- a/ccd-definition/CaseEvent/Camunda/CaseEventsGASpec.json +++ b/ccd-definition/CaseEvent/Camunda/CaseEventsGASpec.json @@ -73,7 +73,8 @@ "CallBackURLAboutToSubmitEvent": "${CCD_DEF_CASE_SERVICE_BASE_URL}/cases/callbacks/about-to-submit", "ShowSummary": "N", "ShowEventNotes": "N", - "RetriesTimeoutURLAboutToSubmitEvent": 0 + "RetriesTimeoutURLAboutToSubmitEvent": 0, + "Publish": "Y" }, { "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", @@ -86,6 +87,7 @@ "CallBackURLAboutToSubmitEvent": "${CCD_DEF_CASE_SERVICE_BASE_URL}/cases/callbacks/about-to-submit", "ShowSummary": "N", "ShowEventNotes": "N", - "RetriesTimeoutURLAboutToSubmitEvent": 0 + "RetriesTimeoutURLAboutToSubmitEvent": 0, + "Publish": "Y" } ] diff --git a/ccd-definition/CaseEventToComplexTypes/FinalOrders-MINTI-nonprod.json b/ccd-definition/CaseEventToComplexTypes/FinalOrders-MINTI-nonprod.json new file mode 100644 index 0000000000..e597ded19c --- /dev/null +++ b/ccd-definition/CaseEventToComplexTypes/FinalOrders-MINTI-nonprod.json @@ -0,0 +1,43 @@ +[ + { + "ID": "OrderAfterHearingDate", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "orderAfterHearingDate", + "ListElementCode": "dateType", + "FieldDisplayOrder": 1, + "DisplayContext": "MANDATORY", + "EventElementLabel": "Enter date(s) of hearing" + }, + { + "ID": "OrderAfterHearingDate", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "orderAfterHearingDate", + "ListElementCode": "date", + "FieldDisplayOrder": 2, + "DisplayContext": "MANDATORY" + }, + { + "ID": "OrderAfterHearingDate", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "orderAfterHearingDate", + "ListElementCode": "fromDate", + "FieldDisplayOrder": 3, + "DisplayContext": "MANDATORY" + }, + { + "ID": "OrderAfterHearingDate", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "orderAfterHearingDate", + "ListElementCode": "toDate", + "FieldDisplayOrder": 4, + "DisplayContext": "MANDATORY" + }, + { + "ID": "OrderAfterHearingDate", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "orderAfterHearingDate", + "ListElementCode": "bespokeDates", + "FieldDisplayOrder": 5, + "DisplayContext": "MANDATORY" + } +] diff --git a/ccd-definition/CaseEventToFields/FinalOrders-MINTI-nonprod.json b/ccd-definition/CaseEventToFields/FinalOrders-MINTI-nonprod.json index 9b9070961e..f50aa99bad 100644 --- a/ccd-definition/CaseEventToFields/FinalOrders-MINTI-nonprod.json +++ b/ccd-definition/CaseEventToFields/FinalOrders-MINTI-nonprod.json @@ -1,4 +1,29 @@ [ + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "allocatedTrack", + "PageFieldDisplayOrder": 98, + "DisplayContext": "READONLY", + "PageID": "TrackAllocation", + "PageDisplayOrder": 1, + "FieldShowCondition": "finalOrderAllocateToTrack=\"DO_NOT_SHOW\"", + "RetainHiddenValue": "Y", + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "DisplayContext": "READONLY", + "CaseFieldID": "responseClaimTrack", + "PageFieldDisplayOrder": 99, + "DisplayContext": "READONLY", + "PageID": "TrackAllocation", + "PageDisplayOrder": 1, + "FieldShowCondition": "finalOrderAllocateToTrack=\"DO_NOT_SHOW\"", + "RetainHiddenValue": "Y", + "Publish": "Y" + }, { "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "CaseEventID": "GENERATE_DIRECTIONS_ORDER", @@ -10,6 +35,17 @@ "FieldShowCondition": "finalOrderAllocateToTrack=\"DO_NOT_SHOW\"", "ShowSummaryChangeOption": "N" }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "showOrderAfterHearingDatePage", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 1, + "DisplayContext": "MANDATORY", + "PageID": "TrackAllocation", + "FieldShowCondition": "finalOrderAllocateToTrack=\"DO_NOT_SHOW\"", + "ShowSummaryChangeOption": "N" + }, { "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "CaseEventID": "GENERATE_DIRECTIONS_ORDER", @@ -26,7 +62,7 @@ "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "CaseEventID": "GENERATE_DIRECTIONS_ORDER", "PageLabel": "Select track", - "CaseEventFieldLabel": "Are you allocating the claim to a track?", + "CaseEventFieldLabel": "Are you allocating or re-allocating the claim to a track or are you changing the complexity band?", "CaseFieldID": "finalOrderAllocateToTrack", "PageDisplayOrder": 1, "PageFieldDisplayOrder": 1, @@ -39,7 +75,7 @@ "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "CaseEventID": "GENERATE_DIRECTIONS_ORDER", "CaseFieldID": "finalOrderTrackAllocation", - "CaseEventFieldLabel": "What track are you allocating the claim to?", + "CaseEventFieldLabel": "What track are you allocating or re-allocating the claim to?", "PageDisplayOrder": 1, "PageFieldDisplayOrder": 2, "DisplayContext": "MANDATORY", @@ -57,7 +93,7 @@ "DisplayContext": "READONLY", "PageID": "IntermediateTrackComplexityBand", "ShowSummaryChangeOption": "N", - "PageShowCondition": "finalOrderTrackToggle=\"INTERMEDIATE_CLAIM\"" + "PageShowCondition": "finalOrderTrackToggle=\"INTERMEDIATE_CLAIM\" AND finalOrderAllocateToTrack=\"Yes\"" }, { "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", @@ -681,12 +717,25 @@ "ShowSummaryChangeOption": "Y", "PageShowCondition": "finalOrderTrackToggle= \"SMALL_CLAIM\" OR finalOrderTrackToggle= \"FAST_CLAIM\"" }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "orderAfterHearingDate", + "PageLabel": "Order Made", + "PageDisplayOrder": 5, + "PageFieldDisplayOrder": 1, + "DisplayContext": "COMPLEX", + "PageID": "OrderAfterHearingDate", + "ShowSummaryChangeOption": "Y", + "PageShowCondition": "showOrderAfterHearingDatePage=\"Yes\"", + "CallBackURLMidEvent": "${CCD_DEF_CASE_SERVICE_BASE_URL}/cases/callbacks/mid/hearing-date-order" + }, { "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "CaseEventID": "GENERATE_DIRECTIONS_ORDER", "CaseFieldID": "downloadTemplateLabel1", "PageLabel": "Download template", - "PageDisplayOrder": 5, + "PageDisplayOrder": 6, "PageFieldDisplayOrder": 1, "DisplayContext": "READONLY", "PageID": "DownloadTemplate", @@ -697,7 +746,7 @@ "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "CaseEventID": "GENERATE_DIRECTIONS_ORDER", "CaseFieldID": "finalOrderDownloadTemplateDocument", - "PageDisplayOrder": 5, + "PageDisplayOrder": 6, "PageFieldDisplayOrder": 2, "DisplayContext": "COMPLEX", "PageID": "DownloadTemplate", @@ -708,7 +757,7 @@ "CaseEventID": "GENERATE_DIRECTIONS_ORDER", "CaseFieldID": "downloadTemplateLabel2", "PageLabel": "Download template", - "PageDisplayOrder": 5, + "PageDisplayOrder": 6, "PageFieldDisplayOrder": 3, "DisplayContext": "READONLY", "PageID": "DownloadTemplate", @@ -719,7 +768,7 @@ "CaseEventID": "GENERATE_DIRECTIONS_ORDER", "CaseFieldID": "uploadOrderDocumentFromTemplateLabel", "PageLabel": "Upload order", - "PageDisplayOrder": 6, + "PageDisplayOrder": 7, "PageFieldDisplayOrder": 1, "DisplayContext": "READONLY", "PageID": "UploadOrder", @@ -730,7 +779,7 @@ "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "CaseEventID": "GENERATE_DIRECTIONS_ORDER", "CaseFieldID": "uploadOrderDocumentFromTemplate", - "PageDisplayOrder": 6, + "PageDisplayOrder": 7, "PageFieldDisplayOrder": 2, "DisplayContext": "MANDATORY", "PageID": "UploadOrder", diff --git a/ccd-definition/CaseEventToFields/FinalOrders-MINTI-prod.json b/ccd-definition/CaseEventToFields/FinalOrders-MINTI-prod.json index ba71d8da21..16a74f1a53 100644 --- a/ccd-definition/CaseEventToFields/FinalOrders-MINTI-prod.json +++ b/ccd-definition/CaseEventToFields/FinalOrders-MINTI-prod.json @@ -584,5 +584,25 @@ "DisplayContext": "COMPLEX", "PageID": "FinalOrderPreview", "ShowSummaryChangeOption": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "allocatedTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "responseClaimTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" } ] diff --git a/ccd-definition/CaseEventToFields/ManageStay-caseworkerEvents-nonprod.json b/ccd-definition/CaseEventToFields/ManageStay-caseworkerEvents-nonprod.json index a67e6af33d..f66029ee60 100644 --- a/ccd-definition/CaseEventToFields/ManageStay-caseworkerEvents-nonprod.json +++ b/ccd-definition/CaseEventToFields/ManageStay-caseworkerEvents-nonprod.json @@ -85,5 +85,25 @@ "PageDisplayOrder": 2, "ShowSummaryChangeOption": "N", "PageShowCondition": "manageStayOption = \"REQUEST_UPDATE\"" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "MANAGE_STAY", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "MANAGE_STAY", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" } ] diff --git a/ccd-definition/CaseEventToFields/SettleClaimPaidInFull-SettleDiscontinue-nonprod.json b/ccd-definition/CaseEventToFields/SettleClaimPaidInFull-SettleDiscontinue-nonprod.json index 7afc6f9e67..39b3214e2e 100644 --- a/ccd-definition/CaseEventToFields/SettleClaimPaidInFull-SettleDiscontinue-nonprod.json +++ b/ccd-definition/CaseEventToFields/SettleClaimPaidInFull-SettleDiscontinue-nonprod.json @@ -86,5 +86,85 @@ "ShowSummaryChangeOption": "N", "FieldShowCondition": "markPaidForAllClaimants=\"DO NOT SHOW IN UI\"", "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "SETTLE_CLAIM_MARK_PAID_FULL", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "SETTLE_CLAIM_MARK_PAID_FULL", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "SETTLE_CLAIM_MARK_PAID_FULL", + "CaseFieldID": "allocatedTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "SETTLE_CLAIM_MARK_PAID_FULL", + "CaseFieldID": "responseClaimTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "SETTLE_CLAIM", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "SETTLE_CLAIM", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "SETTLE_CLAIM", + "CaseFieldID": "allocatedTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "SETTLE_CLAIM", + "CaseFieldID": "responseClaimTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" } ] diff --git a/ccd-definition/CaseEventToFields/TriggerAndUpdateLocation-GA-nonprod.json b/ccd-definition/CaseEventToFields/TriggerAndUpdateLocation-GA-nonprod.json new file mode 100644 index 0000000000..e35ab71081 --- /dev/null +++ b/ccd-definition/CaseEventToFields/TriggerAndUpdateLocation-GA-nonprod.json @@ -0,0 +1,24 @@ +[ + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "TRIGGER_UPDATE_GA_LOCATION", + "CaseFieldID": "gaEaCourtLocation", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageShowCondition": "settlementSummary=\"DO NOT SHOW IN UI\"", + "ShowSummaryChangeOption": "N", + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "TRIGGER_UPDATE_GA_LOCATION", + "CaseFieldID": "settlementSummary", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "ShowSummaryChangeOption": "N" + } +] diff --git a/ccd-definition/CaseEventToFields/TriggerTaskReconfig-GA-nonprod.json b/ccd-definition/CaseEventToFields/TriggerTaskReconfig-GA-nonprod.json new file mode 100644 index 0000000000..f5572d8993 --- /dev/null +++ b/ccd-definition/CaseEventToFields/TriggerTaskReconfig-GA-nonprod.json @@ -0,0 +1,24 @@ +[ + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "TRIGGER_TASK_RECONFIG_GA", + "CaseFieldID": "gaEaCourtLocation", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageShowCondition": "settlementSummary=\"DO NOT SHOW IN UI\"", + "ShowSummaryChangeOption": "N", + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "TRIGGER_TASK_RECONFIG_GA", + "CaseFieldID": "settlementSummary", + "PageDisplayOrder": 1, + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "ShowSummaryChangeOption": "N" + } +] diff --git a/ccd-definition/CaseEventToFields/ValidateDiscontinue-SettleDiscontinue-nonprod.json b/ccd-definition/CaseEventToFields/ValidateDiscontinue-SettleDiscontinue-nonprod.json index 91aa08883a..8eddf851d3 100644 --- a/ccd-definition/CaseEventToFields/ValidateDiscontinue-SettleDiscontinue-nonprod.json +++ b/ccd-definition/CaseEventToFields/ValidateDiscontinue-SettleDiscontinue-nonprod.json @@ -129,5 +129,75 @@ "ShowSummaryChangeOption": "N", "FieldShowCondition":"confirmOrderGivesPermission=\"DO NOT SHOW ON UI\"", "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "DISCONTINUE_CLAIM_CLAIMANT", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 1, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "DISCONTINUE_CLAIM_CLAIMANT", + "CaseFieldID": "allocatedTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "DISCONTINUE_CLAIM_CLAIMANT", + "CaseFieldID": "responseClaimTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "VALIDATE_DISCONTINUE_CLAIM_CLAIMANT", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 1, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "VALIDATE_DISCONTINUE_CLAIM_CLAIMANT", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 1, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "VALIDATE_DISCONTINUE_CLAIM_CLAIMANT", + "CaseFieldID": "allocatedTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "VALIDATE_DISCONTINUE_CLAIM_CLAIMANT", + "CaseFieldID": "responseClaimTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" } ] diff --git a/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-HMC-NRO-nonprod.json b/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-HMC-NRO-nonprod.json deleted file mode 100644 index 0a35729685..0000000000 --- a/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-HMC-NRO-nonprod.json +++ /dev/null @@ -1,357 +0,0 @@ -[ - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "CREATE_SDO", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "CREATE_SDO", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "COURT_OFFICER_ORDER", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "COURT_OFFICER_ORDER", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "GENERATE_DIRECTIONS_ORDER", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "GENERATE_DIRECTIONS_ORDER", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "GENERATE_DIRECTIONS_ORDER", - "CaseFieldID": "allocatedTrack", - "PageFieldDisplayOrder": 98, - "DisplayContext": "READONLY", - "PageID": "TrackAllocation", - "PageDisplayOrder": 1, - "FieldShowCondition": "finalOrderAllocateToTrack=\"DO_NOT_SHOW\"", - "RetainHiddenValue": "Y", - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "GENERATE_DIRECTIONS_ORDER", - "DisplayContext": "READONLY", - "CaseFieldID": "responseClaimTrack", - "PageFieldDisplayOrder": 99, - "DisplayContext": "READONLY", - "PageID": "TrackAllocation", - "PageDisplayOrder": 1, - "FieldShowCondition": "finalOrderAllocateToTrack=\"DO_NOT_SHOW\"", - "RetainHiddenValue": "Y", - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "GENERATE_DIRECTIONS_ORDER", - "CaseFieldID": "orderType", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "GENERATE_DIRECTIONS_ORDER", - "CaseFieldID": "caseManagementOrderSelection", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "HEARING_SCHEDULED_RETRIGGER", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "HEARING_SCHEDULED_RETRIGGER", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "STANDARD_DIRECTION_ORDER_DJ", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "STANDARD_DIRECTION_ORDER_DJ", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "DISCONTINUE_CLAIM_CLAIMANT", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 1, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "DISCONTINUE_CLAIM_CLAIMANT", - "CaseFieldID": "allocatedTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "DISCONTINUE_CLAIM_CLAIMANT", - "CaseFieldID": "responseClaimTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "VALIDATE_DISCONTINUE_CLAIM_CLAIMANT", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 1, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "VALIDATE_DISCONTINUE_CLAIM_CLAIMANT", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 1, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "VALIDATE_DISCONTINUE_CLAIM_CLAIMANT", - "CaseFieldID": "allocatedTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "VALIDATE_DISCONTINUE_CLAIM_CLAIMANT", - "CaseFieldID": "responseClaimTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "SETTLE_CLAIM_MARK_PAID_FULL", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "SETTLE_CLAIM_MARK_PAID_FULL", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "SETTLE_CLAIM_MARK_PAID_FULL", - "CaseFieldID": "allocatedTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "SETTLE_CLAIM_MARK_PAID_FULL", - "CaseFieldID": "responseClaimTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "SETTLE_CLAIM", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "SETTLE_CLAIM", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "SETTLE_CLAIM", - "CaseFieldID": "allocatedTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "SETTLE_CLAIM", - "CaseFieldID": "responseClaimTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "HEARING_FEE_UNPAID", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "HEARING_FEE_UNPAID", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocation", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "HEARING_FEE_UNPAID", - "CaseFieldID": "allocatedTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "HEARING_FEE_UNPAID", - "CaseFieldID": "responseClaimTrack", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "MANAGE_STAY", - "CaseFieldID": "applicant1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - }, - { - "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", - "CaseEventID": "MANAGE_STAY", - "CaseFieldID": "respondent1Represented", - "PageFieldDisplayOrder": 1, - "DisplayContext": "READONLY", - "PageID": "WorkAllocationIntegrationFields", - "PageDisplayOrder": 99, - "Publish": "Y" - } -] diff --git a/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-HMC-NRO.json b/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-HMC-NRO.json new file mode 100644 index 0000000000..596a09b3b3 --- /dev/null +++ b/ccd-definition/CaseEventToFields/WorkAllocationIntegrationFields-HMC-NRO.json @@ -0,0 +1,162 @@ +[ + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "CREATE_SDO", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "CREATE_SDO", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "COURT_OFFICER_ORDER", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "COURT_OFFICER_ORDER", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "orderType", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "GENERATE_DIRECTIONS_ORDER", + "CaseFieldID": "caseManagementOrderSelection", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "HEARING_SCHEDULED_RETRIGGER", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "HEARING_SCHEDULED_RETRIGGER", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "STANDARD_DIRECTION_ORDER_DJ", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "STANDARD_DIRECTION_ORDER_DJ", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "HEARING_FEE_UNPAID", + "CaseFieldID": "applicant1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "HEARING_FEE_UNPAID", + "CaseFieldID": "respondent1Represented", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocation", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "HEARING_FEE_UNPAID", + "CaseFieldID": "allocatedTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "CaseEventID": "HEARING_FEE_UNPAID", + "CaseFieldID": "responseClaimTrack", + "PageFieldDisplayOrder": 1, + "DisplayContext": "READONLY", + "PageID": "WorkAllocationIntegrationFields", + "PageDisplayOrder": 99, + "Publish": "Y" + } +] diff --git a/ccd-definition/CaseField/CaseField-MINTI-nonprod.json b/ccd-definition/CaseField/CaseField-MINTI-nonprod.json index 49fdb56c22..d6adf82498 100644 --- a/ccd-definition/CaseField/CaseField-MINTI-nonprod.json +++ b/ccd-definition/CaseField/CaseField-MINTI-nonprod.json @@ -163,7 +163,7 @@ { "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", "ID": "uploadOrderDocumentFromTemplateLabel", - "Label": "**** \n ## Add document \n Make sure your file is named either directions or order, the party names and the date. Upload your completed order in DOC/DOCX (Word) format.", + "Label": "**** \n ## Add document \n Upload your completed order in DOC/DOCX (Word) format.", "FieldType": "Label", "SecurityClassification": "Public", "Searchable": "N" @@ -209,5 +209,21 @@ "FieldType": "TaskManagementLocationTab", "SecurityClassification": "Public", "Searchable": "Y" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "ID": "orderAfterHearingDate", + "Label": " ", + "FieldType": "OrderAfterHearingDate", + "SecurityClassification": "Public", + "Searchable": "N" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "ID": "showOrderAfterHearingDatePage", + "Label": " ", + "FieldType": "YesOrNo", + "SecurityClassification": "Public", + "Searchable": "N" } ] diff --git a/ccd-definition/CaseField/CaseField-caseworkerEvents-nonprod.json b/ccd-definition/CaseField/CaseField-caseworkerEvents-nonprod.json index 4836af38cb..000bc58133 100644 --- a/ccd-definition/CaseField/CaseField-caseworkerEvents-nonprod.json +++ b/ccd-definition/CaseField/CaseField-caseworkerEvents-nonprod.json @@ -278,5 +278,14 @@ "FieldType": "ObligationWAFlag", "SecurityClassification": "Public", "Searchable": "N" + }, + { + "CaseTypeID": "CIVIL${CCD_DEF_VERSION}", + "ID": "gaEaCourtLocation", + "Label": " ", + "FieldType": "YesOrNo", + "SecurityClassification": "Public", + "Searchable": "N", + "Publish": "Y" } ] diff --git a/ccd-definition/ComplexTypes/DQ/1_OrderAfterHearing_HearingDate-MINTI-nonprod.json b/ccd-definition/ComplexTypes/DQ/1_OrderAfterHearing_HearingDate-MINTI-nonprod.json new file mode 100644 index 0000000000..7e0f154ae3 --- /dev/null +++ b/ccd-definition/ComplexTypes/DQ/1_OrderAfterHearing_HearingDate-MINTI-nonprod.json @@ -0,0 +1,53 @@ +[ + { + "ID": "OrderAfterHearingDate", + "ListElementCode": "dateType", + "FieldType": "FixedRadioList", + "FieldTypeParameter": "OrderAfterHearingDateType", + "ElementLabel": "Enter date(s) of hearing", + "SecurityClassification": "Public", + "Searchable": "N" + }, + { + "ID": "OrderAfterHearingDate", + "ListElementCode": "date", + "FieldType": "Date", + "ElementLabel": "Date", + "SecurityClassification": "Public", + "HintText": "For example 16 4 2021", + "FieldShowCondition": "dateType = \"SINGLE_DATE\"", + "Searchable": "N" + }, + { + "ID": "OrderAfterHearingDate", + "ListElementCode": "fromDate", + "FieldType": "Date", + "ElementLabel": "Date from", + "SecurityClassification": "Public", + "HintText": "For example 16 4 2021", + "FieldShowCondition": "dateType = \"DATE_RANGE\"", + "Searchable": "N" + }, + { + "ID": "OrderAfterHearingDate", + "ListElementCode": "toDate", + "FieldType": "Date", + "ElementLabel": "Date to", + "SecurityClassification": "Public", + "FieldShowCondition": "dateType = \"DATE_RANGE\"", + "HintText": "For example 16 4 2021", + "Searchable": "N" + }, + { + "ID": "OrderAfterHearingDate", + "ListElementCode": "bespokeDates", + "FieldType": "TextArea", + "ElementLabel": "Enter a bespoke range of dates for hearing", + "HintText": "For example, 16 4 2021, 19-20 4 2021 and 11-12 5 2021", + "SecurityClassification": "Public", + "FieldShowCondition": "dateType = \"BESPOKE_RANGE\"", + "Searchable": "N" + } +] + + diff --git a/ccd-definition/FixedLists/OrderAfterHearingDateTypes-MINTI-nonprod.json b/ccd-definition/FixedLists/OrderAfterHearingDateTypes-MINTI-nonprod.json new file mode 100644 index 0000000000..10870a2c7c --- /dev/null +++ b/ccd-definition/FixedLists/OrderAfterHearingDateTypes-MINTI-nonprod.json @@ -0,0 +1,20 @@ +[ + { + "ID": "OrderAfterHearingDateType", + "ListElementCode": "SINGLE_DATE", + "ListElement": "Single date", + "DisplayOrder": 1 + }, + { + "ID": "OrderAfterHearingDateType", + "ListElementCode": "DATE_RANGE", + "ListElement": "Date range", + "DisplayOrder": 2 + }, + { + "ID": "OrderAfterHearingDateType", + "ListElementCode": "BESPOKE_RANGE", + "ListElement": "Bespoke range", + "DisplayOrder": 3 + } +] diff --git a/charts/civil-ccd/values.enableWA.preview.template.yaml b/charts/civil-ccd/values.enableWA.preview.template.yaml index bf4a326871..cddb2cdd93 100644 --- a/charts/civil-ccd/values.enableWA.preview.template.yaml +++ b/charts/civil-ccd/values.enableWA.preview.template.yaml @@ -97,6 +97,7 @@ wa: disabled: true camunda-bpm: java: + image: hmctsprivatetemp.azurecr.io/camunda/bpm:latest environment: CAMUNDA_DB_USER_NAME: "hmcts" CAMUNDA_DB_PASSWORD: ${POSTGRES_PASSWORD} diff --git a/charts/civil-ccd/values.preview.template.yaml b/charts/civil-ccd/values.preview.template.yaml index 99b55c4333..7ab8210ffc 100644 --- a/charts/civil-ccd/values.preview.template.yaml +++ b/charts/civil-ccd/values.preview.template.yaml @@ -86,17 +86,21 @@ civil-service: extraEnvVars: - name: POSTGRESQL_WAL_LEVEL value: "logical" + - name: POSTGRESQL_MAX_CONNECTIONS + value: "400" + extendedConfiguration: | + max_connections = 400 + shared_buffers = 512MB resources: requests: - cpu: 25m + cpu: 500m + memory: 2048Mi podAnnotations: cluster-autoscaler.kubernetes.io/safe-to-evict: "false" initdb: user: postgres password: ${POSTGRES_PASSWORD} scripts: - 00_grant_superuser_role.sql: | - ALTER ROLE hmcts WITH SUPERUSER; 01_init_civil.sql: | CREATE DATABASE cmc WITH OWNER = hmcts ENCODING = 'UTF-8' CONNECTION LIMIT = -1; CREATE DATABASE "data-store" WITH OWNER = hmcts ENCODING = 'UTF-8' CONNECTION LIMIT = -1; diff --git a/charts/civil-ccd/values.template.yaml b/charts/civil-ccd/values.template.yaml index bbd04ddc5d..ac07750d33 100644 --- a/charts/civil-ccd/values.template.yaml +++ b/charts/civil-ccd/values.template.yaml @@ -6,7 +6,7 @@ civil-translation: am-org-role-mapping-service: enabled: false - + civil-general-applications: java: image: 'hmctspublic.azurecr.io/civil/general-applications:latest' @@ -345,6 +345,7 @@ camunda-bpm: enabled: true java: imagePullPolicy: Always + image: hmctsprivatetemp.azurecr.io/camunda/bpm:latest ingressHost: camunda-${SERVICE_FQDN} disableKeyVaults: true releaseNameOverride: ${SERVICE_NAME}-camunda diff --git a/e2e/api/steps.js b/e2e/api/steps.js index 1b5ff7035c..8ef8a76dc6 100644 --- a/e2e/api/steps.js +++ b/e2e/api/steps.js @@ -1534,7 +1534,12 @@ const assertValidData = async (data, pageId, solicitor) => { } if(eventName === 'GENERATE_DIRECTIONS_ORDER') { responseBody = clearFinalOrderLocationData(responseBody); - if(pageId === 'TrackAllocation') { + // After second minti release this is not needed. Track fields for GENERATE_DIRECTIONS_ORDER are currently linked + // to a hidden wa page and do not appear in mid event handlers, which is fine as they are not currently used. + // After minti release the fields are linked to a page and hidden via field show conditions and get returned correctly. + responseBody.data.allocatedTrack = caseData.allocatedTrack; + + if(pageId === 'TrackAllocation' || pageId === 'FinalOrderSelect') { responseBody.data.respondent1Represented = caseData.respondent1Represented; } } @@ -1551,6 +1556,7 @@ const assertValidData = async (data, pageId, solicitor) => { delete responseBody.data['sdoR2FastTrackWitnessOfFact']; delete responseBody.data['sdoR2FastTrackCreditHire']; delete responseBody.data['sdoDJR2TrialCreditHire']; + delete responseBody.data['gaEaCourtLocation']; } assert.equal(response.status, 200); diff --git a/e2e/fixtures/events/finalOrder.js b/e2e/fixtures/events/finalOrder.js index 5b567469ab..0959286587 100644 --- a/e2e/fixtures/events/finalOrder.js +++ b/e2e/fixtures/events/finalOrder.js @@ -99,7 +99,8 @@ const createIntermediateDownloadOrder = () => { TrackAllocation: { finalOrderTrackToggle: 'INTERMEDIATE_CLAIM', finalOrderAllocateToTrack: 'Yes', - finalOrderTrackAllocation: 'INTERMEDIATE_CLAIM' + finalOrderTrackAllocation: 'INTERMEDIATE_CLAIM', + showOrderAfterHearingDatePage: 'No' }, IntermediateTrackComplexityBand: { finalOrderIntermediateTrackComplexityBand: { @@ -133,7 +134,8 @@ const createMultiDownloadOrder = () => { TrackAllocation: { finalOrderTrackToggle: 'MULTI_CLAIM', finalOrderAllocateToTrack: 'Yes', - finalOrderTrackAllocation: 'MULTI_CLAIM' + finalOrderTrackAllocation: 'MULTI_CLAIM', + showOrderAfterHearingDatePage: 'No' }, SelectTemplate: { finalOrderDownloadTemplateOptions: { diff --git a/e2e/pages/directionsOrder/orderTrackAllocation.page.js b/e2e/pages/directionsOrder/orderTrackAllocation.page.js index 621b4c2da2..1a87a4ca8c 100644 --- a/e2e/pages/directionsOrder/orderTrackAllocation.page.js +++ b/e2e/pages/directionsOrder/orderTrackAllocation.page.js @@ -17,7 +17,7 @@ module.exports = { } }, labels: { - allocateQuestion: 'What track are you allocating the claim to?' + allocateQuestion: 'What track are you allocating or re-allocating the claim to?' } }, diff --git a/e2e/pages/directionsOrder/uploadOrder.page.js b/e2e/pages/directionsOrder/uploadOrder.page.js index 37c1446d05..b97e5851db 100644 --- a/e2e/pages/directionsOrder/uploadOrder.page.js +++ b/e2e/pages/directionsOrder/uploadOrder.page.js @@ -12,8 +12,7 @@ module.exports = { I.see('Add document', this.fields.label1); I.seeElement(this.fields.label2); - I.see('Make sure your file is named either directions or order, the party names and the date. ' + - 'Upload your completed order in DOC/DOCX (Word) format.', this.fields.label2); + I.see('Upload your completed order in DOC/DOCX (Word) format.', this.fields.label2); I.attachFile(this.fields.uploadInput, filePath); I.wait(5); diff --git a/e2e/tests/api_tests/mediation/api_1v1_spec_small_mediation_documents_upload_test.js b/e2e/tests/api_tests/mediation/api_1v1_spec_small_mediation_documents_upload_test.js index 69c39e5d9f..aeda5cb099 100644 --- a/e2e/tests/api_tests/mediation/api_1v1_spec_small_mediation_documents_upload_test.js +++ b/e2e/tests/api_tests/mediation/api_1v1_spec_small_mediation_documents_upload_test.js @@ -55,7 +55,7 @@ Scenario('1v1 claimant and defendant upload mediation documents - CARM enabled', await api_spec_small.mediationUnsuccessful(mediationAdminRegion4, true); await api_spec_small.uploadMediationDocuments(config.applicantSolicitorUser); await api_spec_small.uploadMediationDocuments(config.defendantSolicitorUser); - await api_spec_small.createSDO(config.judgeUser2WithRegionId4, 'CREATE_SMALL', true); + // await api_spec_small.createSDO(config.judgeUser2WithRegionId4, 'CREATE_SMALL', true); }).tag('@api-prod @api-nonprod'); Scenario('1v2 same solicitor claimant and defendant upload mediation documents - CARM enabled', async ({api_spec}) => { diff --git a/playwright-e2e/base/base-api-steps.ts b/playwright-e2e/base/base-api-steps.ts index d8e19df3d4..a0d3be2c27 100644 --- a/playwright-e2e/base/base-api-steps.ts +++ b/playwright-e2e/base/base-api-steps.ts @@ -4,11 +4,8 @@ import User from '../models/user'; import { bankHolidays } from '../config/data'; import { CCDEvent } from '../models/ccd/ccd-events'; import ObjectHelper from '../helpers/object-helper'; -import { AllMethodsStep } from '../decorators/test-steps'; import TestData from '../models/test-data'; -import { civilAdminUser, claimantSolicitorUser } from '../config/users/exui-users'; -@AllMethodsStep() export default abstract class BaseApiSteps extends BaseSteps { private _requestsFactory: RequestsFactory; diff --git a/playwright-e2e/base/base-exui-steps.ts b/playwright-e2e/base/base-exui-steps.ts index 7af11302d7..0f890cc060 100644 --- a/playwright-e2e/base/base-exui-steps.ts +++ b/playwright-e2e/base/base-exui-steps.ts @@ -6,6 +6,8 @@ import User from '../models/user'; import ExuiDashboardPageFactory from '../pages/exui/exui-dashboard/exui-dashboard-page-factory'; import RequestsFactory from '../requests/requests-factory'; import BaseApiSteps from './base-api-steps'; +import { civilAdminUser } from '../config/users/exui-users'; +import UserAssignedCasesHelper from '../helpers/user-assigned-cases-helper'; export default abstract class BaseExuiSteps extends BaseApiSteps { private exuiDashboardPageFactory: ExuiDashboardPageFactory; @@ -19,7 +21,7 @@ export default abstract class BaseExuiSteps extends BaseApiSteps { this.exuiDashboardPageFactory = exuiDashboardPageFactory; } - async retryExuiEvent( + protected async retryExuiEvent( steps: () => Promise, ccdEvent: CCDEvent, user: User, @@ -29,6 +31,8 @@ export default abstract class BaseExuiSteps extends BaseApiSteps { while (retries >= 0) { try { if (ccdEvent === ccdEvents.CREATE_CLAIM || ccdEvent === ccdEvents.CREATE_CLAIM_SPEC) { + const { caseListPage } = this.exuiDashboardPageFactory; + await caseListPage.openCaseList(); const { navBar } = this.exuiDashboardPageFactory; await navBar.clickCreateCase(); } else { @@ -46,8 +50,14 @@ export default abstract class BaseExuiSteps extends BaseApiSteps { caseDetailsPage.clearCCDEvent(); } } + if (ccdEvent === ccdEvents.CREATE_CLAIM || ccdEvent === ccdEvents.CREATE_CLAIM_SPEC) { + const caseId = await caseDetailsPage.grabCaseNumber(); + super.setCCDCaseData = { id: caseId }; + UserAssignedCasesHelper.addAssignedCaseToUser(user, this.ccdCaseData.id); + } if (verifySuccessEvent) await caseDetailsPage.verifySuccessEvent(this.ccdCaseData.id, ccdEvent); caseDetailsPage.clearCCDEvent(); if (camundaProcess) await this.waitForFinishedBusinessProcess(user, this.ccdCaseData.id); + await this.fetchAndSetCCDCaseData(civilAdminUser, this.ccdCaseData.id); } } diff --git a/playwright-e2e/base/base-page.ts b/playwright-e2e/base/base-page.ts index f8603235b5..b90449ca14 100644 --- a/playwright-e2e/base/base-page.ts +++ b/playwright-e2e/base/base-page.ts @@ -278,7 +278,7 @@ export default abstract class BasePage { runAxe?: boolean; axeExclusions?: string[]; useAxeCache?: boolean; - axePageInsertName?: string; + axePageInsertName?: string | number; } = {}, ) { if (expects) { @@ -317,7 +317,7 @@ export default abstract class BasePage { private async expectAxeToPass( axeExclusions: string[], useAxeCache: boolean, - axePageInsertName?: string, + axePageInsertName?: string | number, ) { const axeBuilder = new AxeBuilder({ page: this.page }) .withTags(['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa', 'wcag22a', 'wcag22aa']) @@ -498,7 +498,7 @@ export default abstract class BasePage { locator = this.getNewLocator(locator, options.containerSelector, options.index, options.first); try { - await locator.waitFor({ state: 'visible', timeout: 500 }); + await locator.waitFor({ state: 'visible', timeout: 20 }); // eslint-disable-next-line no-empty } catch (err) {} if (options.all) { @@ -605,7 +605,7 @@ export default abstract class BasePage { message?: string; exact?: boolean; timeout?: number; - } = { exact: false }, + } = { exact: true }, ) { if (options.ignoreDuplicates && options.count !== undefined) { throw new ExpectError("Cannot use 'ignoreDuplicates' and 'count' options at the same time"); @@ -651,7 +651,7 @@ export default abstract class BasePage { message?: string; exact?: boolean; timeout?: number; - } = { exact: false }, + } = { exact: true }, ) { if (options.ignoreDuplicates && options.count !== undefined) { throw new ExpectError("Cannot use 'ignoreDuplicates' and 'count' options at the same time"); @@ -688,7 +688,7 @@ export default abstract class BasePage { @BoxedDetailedStep(classKey, 'name') protected async expectTab( name: string, - options: { message?: string; exact?: boolean; timeout?: number } = { exact: false }, + options: { message?: string; exact?: boolean; timeout?: number } = { exact: true }, ) { await pageExpect(this.page.getByRole('tab', { name, exact: options.exact }), { message: options.message, @@ -700,7 +700,7 @@ export default abstract class BasePage { @BoxedDetailedStep(classKey, 'name') protected async expectNoTab( name: string, - options: { message?: string; exact?: boolean; timeout?: number } = { exact: false }, + options: { message?: string; exact?: boolean; timeout?: number } = { exact: true }, ) { await pageExpect(this.page.getByRole('tab', { name, exact: options.exact }), { message: options.message, @@ -712,7 +712,7 @@ export default abstract class BasePage { @BoxedDetailedStep(classKey, 'name') protected async expectButton( name: string, - options: { message?: string; exact?: boolean; timeout?: number } = { exact: false }, + options: { message?: string; exact?: boolean; timeout?: number } = { exact: true }, ) { await pageExpect(this.page.getByRole('button', { name, exact: options.exact }), { message: options.message, @@ -724,7 +724,7 @@ export default abstract class BasePage { @BoxedDetailedStep(classKey, 'name') protected async expectNoButton( name: string, - options: { message?: string; exact?: boolean; timeout?: number } = { exact: false }, + options: { message?: string; exact?: boolean; timeout?: number } = { exact: true }, ) { await pageExpect(this.page.getByRole('button', { name, exact: options.exact }), { message: options.message, diff --git a/playwright-e2e/helpers/case-data-helper.ts b/playwright-e2e/helpers/case-data-helper.ts index b4cbdd1c07..ce9e625d94 100644 --- a/playwright-e2e/helpers/case-data-helper.ts +++ b/playwright-e2e/helpers/case-data-helper.ts @@ -11,12 +11,6 @@ export default class CaseDataHelper { return '00' + Math.random().toString(36).slice(-6); } - static formatCaseId(caseId: number) { - const groups = caseId.toString().match(/.{1,4}/g); - const formattedString = '#' + groups.join('-'); - return formattedString; - } - static setCodeToData(data: any) { return { code: uuidv4(), @@ -113,6 +107,8 @@ export default class CaseDataHelper { return 'CF10 1EP'; case partys.CLAIMANT_2_LITIGATION_FRIEND: return 'LS1 4AP'; + case partys.CLAIMANT_SOLICITOR_1: + return 'SW1A 1AA'; case partys.DEFENDANT_1: return 'M1 1AE'; case partys.DEFENDANT_2: @@ -121,6 +117,10 @@ export default class CaseDataHelper { return 'SO15 2JY'; case partys.DEFENDANT_2_LITIGATION_FRIEND: return 'EX1 1JG'; + case partys.DEFENDANT_SOLICITOR_1: + return 'B1 1AA'; + case partys.DEFENDANT_SOLICITOR_2: + return 'M4 5DL'; } } @@ -144,11 +144,11 @@ export default class CaseDataHelper { static buildAddressData(party: Party) { return { AddressLine1: `Flat 12 - ${party.key}`, - AddressLine2: `${party.key} House 15 - 17`, - AddressLine3: `${party.key} Street`, - PostTown: `${party.key} Town`, - County: `${party.key} County`, - Country: `${party.key} Country`, + AddressLine2: `House 15 - 17 - ${party.key}`, + AddressLine3: `Street - ${party.key} `, + PostTown: `Town - ${party.key}`, + County: `County - ${party.key}`, + Country: `Country - ${party.key}`, PostCode: this.getPartyPostCode(party), }; } @@ -214,8 +214,8 @@ export default class CaseDataHelper { lastName: 'Expert', emailAddress: `${party.key}@experts.com`, phoneNumber: this.getPartyPhoneNumber(party), - fieldOfExpertise: `Field of expertise ${party.key}`, - whyRequired: `Required for ${party.key}`, + fieldOfExpertise: `Field of expertise - ${party.key}`, + whyRequired: `Reason required - ${party.key}`, estimatedCost: this.getExpertEstimatedCost(party), }; } @@ -235,7 +235,7 @@ export default class CaseDataHelper { lastName: 'Witness', phoneNumber: this.getPartyPhoneNumber(party), emailAddress: `${party.key}@witnesses.com`, - reasonForWitness: `Reason for witness ${party.key}`, + reasonForWitness: `Reason for witness - ${party.key}`, }; } diff --git a/playwright-e2e/helpers/string-helper.ts b/playwright-e2e/helpers/string-helper.ts index 84c73fede6..449da96538 100644 --- a/playwright-e2e/helpers/string-helper.ts +++ b/playwright-e2e/helpers/string-helper.ts @@ -1,7 +1,7 @@ export default class StringHelper { static capitalise(str: string) { const firstChar = str.charAt(0).toUpperCase(); - const restOfStr = str.substring(1).toLowerCase(); + const restOfStr = str.substring(1); return `${firstChar}${restOfStr}`; } diff --git a/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-content.ts b/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-content.ts index 4d217550be..64f4dee5a1 100644 --- a/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-content.ts +++ b/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-content.ts @@ -1,4 +1,3 @@ -import CaseDataHelper from '../../../../helpers/case-data-helper'; import { CCDEvent } from '../../../../models/ccd/ccd-events'; export const tabs = { @@ -58,5 +57,5 @@ export const containers = { }, }; -export const getSuccessBannerText = (caseId: number, ccdEvent: CCDEvent) => - `Case ${CaseDataHelper.formatCaseId(caseId)} has been updated with event: ${ccdEvent.name}`; +export const successBannerText = (formattedCaseId: string, ccdEvent: CCDEvent) => + `Case ${formattedCaseId} has been updated with event: ${ccdEvent.name}`; diff --git a/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-page.ts b/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-page.ts index aa46055a1a..5645884768 100644 --- a/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-page.ts +++ b/playwright-e2e/pages/exui/exui-dashboard/case-details/case-details-page.ts @@ -4,8 +4,9 @@ import { AllMethodsStep } from '../../../../decorators/test-steps'; import { TruthyParams } from '../../../../decorators/truthy-params'; import CCDCaseData from '../../../../models/ccd/ccd-case-data'; import { CCDEvent } from '../../../../models/ccd/ccd-events'; +import { getFormattedCaseId, getUnformattedCaseId, headings } from '../../exui-page/exui-content'; import ExuiPage from '../../exui-page/exui-page'; -import { buttons, containers, dropdowns, getSuccessBannerText, tabs } from './case-details-content'; +import { buttons, containers, dropdowns, successBannerText, tabs } from './case-details-content'; const classKey = 'CaseDetailsPage'; @@ -65,6 +66,10 @@ export default class CaseDetailsPage extends ExuiPage(BasePage) { await super.runVerifications([], { useAxeCache: false }); } + async grabCaseNumber() { + return getUnformattedCaseId(await super.getText(headings.caseNumber.selector)); + } + @TruthyParams(classKey, 'caseId') async goToCaseDetails(caseId: number) { console.log(`Navigating to case with ccd case id: ${caseId}`); @@ -96,7 +101,7 @@ export default class CaseDetailsPage extends ExuiPage(BasePage) { console.log(`Verifying success banner and event history: ${ccdEvent.name}`); await super.runVerifications( [ - super.expectText(getSuccessBannerText(caseId, ccdEvent)), + super.expectText(successBannerText(getFormattedCaseId(caseId), ccdEvent)), super.clickByText(tabs.history.title, { exact: true }), super.expectTableRowValue(ccdEvent.name, containers.eventHistory.selector, { rowNum: 1, diff --git a/playwright-e2e/pages/exui/exui-page/exui-content.ts b/playwright-e2e/pages/exui/exui-page/exui-content.ts index c98c958172..b5182ffbd6 100644 --- a/playwright-e2e/pages/exui/exui-page/exui-content.ts +++ b/playwright-e2e/pages/exui/exui-page/exui-content.ts @@ -1,5 +1,7 @@ import CCDCaseData from '../../../models/ccd/ccd-case-data'; +export const headings = { caseNumber: { selector: 'ccd-markdown >> h1' } }; + export const buttons = { submit: { title: 'Submit', @@ -30,3 +32,13 @@ export const getDQDocName = (ccdCaseData: CCDCaseData) => export const getResponseSealedFormDocName = (ccdCaseData: CCDCaseData) => `${ccdCaseData.legacyCaseReference}_response_sealed_form.pdf`; + +export const getFormattedCaseId = (caseId: number) => { + const groups = caseId.toString().match(/.{1,4}/g); + const formattedString = '#' + groups.join('-'); + return formattedString; +}; + +export const getUnformattedCaseId = (caseId: string) => { + return +caseId.split(' ')[0].split('-').join('').substring(1); +}; diff --git a/playwright-e2e/pages/exui/exui-page/exui-page.ts b/playwright-e2e/pages/exui/exui-page/exui-page.ts index 2803ec1536..6288b46ae5 100644 --- a/playwright-e2e/pages/exui/exui-page/exui-page.ts +++ b/playwright-e2e/pages/exui/exui-page/exui-page.ts @@ -4,7 +4,7 @@ import ccdEvents from '../../../constants/ccd-events'; import CaseDataHelper from '../../../helpers/case-data-helper'; import CCDCaseData from '../../../models/ccd/ccd-case-data'; import { CCDEvent } from '../../../models/ccd/ccd-events'; -import { buttons, components } from './exui-content'; +import { buttons, components, getFormattedCaseId } from './exui-content'; let ccdEventstate: CCDEvent; @@ -23,13 +23,13 @@ export default function ExuiPage expects = super.expectHeading(ccdEventstate.name); } else if (ccdEventstate === undefined) { expects = [ - super.expectHeading(CaseDataHelper.formatCaseId(ccdCaseData.id)), + super.expectHeading(getFormattedCaseId(ccdCaseData.id)), super.expectHeading(ccdCaseData.caseNamePublic), ]; } else { expects = [ super.expectHeading(ccdEventstate.name), - super.expectHeading(CaseDataHelper.formatCaseId(ccdCaseData.id)), + super.expectHeading(getFormattedCaseId(ccdCaseData.id)), super.expectHeading(ccdCaseData.caseNamePublic), ]; } diff --git a/playwright-e2e/pages/exui/fragments/address/address-content.ts b/playwright-e2e/pages/exui/fragments/address/address-content.ts index 78e0994d83..d6d404bac5 100644 --- a/playwright-e2e/pages/exui/fragments/address/address-content.ts +++ b/playwright-e2e/pages/exui/fragments/address/address-content.ts @@ -3,42 +3,42 @@ import { Party } from '../../../../models/partys'; export const inputs = { postCodeInput: { label: 'Enter a UK postcode', - selector: (party: Party) => `#${party.oldKey}_primaryaddress_primaryaddress_postcodeInput`, + selector: (party: Party) => `#${party.oldKey}_primaryAddress_primaryAddress_postcodeInput`, }, addressLine1: { label: 'Building and Street', - selector: (party: Party) => `#${party.oldKey}_primaryaddress__addressLine1`, + selector: (party: Party) => `#${party.oldKey}_primaryAddress__detailAddressLine1`, }, addressLine2: { - label: 'address Line 2 (Optional)', - selector: (party: Party) => `#${party.oldKey}_primaryaddress__addressLine2`, + label: 'Address Line 2 (Optional)', + selector: (party: Party) => `#${party.oldKey}_primaryAddress__detailAddressLine2`, }, addressLine3: { - label: 'address Line 3 (Optional)', - selector: (party: Party) => `#${party.oldKey}_primaryaddress__addressLine3`, + label: 'Address Line 3 (Optional)', + selector: (party: Party) => `#${party.oldKey}_primaryAddress__detailAddressLine3`, }, postTown: { label: 'Town or City (Optional)', - selector: (party: Party) => `#${party.oldKey}_primaryaddress__PostTown`, + selector: (party: Party) => `#${party.oldKey}_primaryAddress__detailPostTown`, }, county: { label: 'County (Optional)', - selector: (party: Party) => `#${party.oldKey}_primaryaddress__County`, + selector: (party: Party) => `#${party.oldKey}_primaryAddress__detailCounty`, }, country: { label: 'Country (Optional)', - selector: (party: Party) => `#${party.oldKey}_primaryaddress__Country`, + selector: (party: Party) => `#${party.oldKey}_primaryAddress__detailCountry`, }, postCode: { label: 'Postcode/Zipcode', - selector: (party: Party) => `#${party.oldKey}_primaryaddress__PostCode`, + selector: (party: Party) => `#${party.oldKey}_primaryAddress__detailPostCode`, }, }; export const dropdowns = { addressList: { label: 'Select an address', - selector: (party: Party) => `#${party.oldKey}_primaryaddress_primaryaddress_addressList`, + selector: (party: Party) => `#${party.oldKey}_primaryAddress_primaryAddress_addressList`, options: [], }, }; diff --git a/playwright-e2e/pages/exui/fragments/certificate-of-service-submit/certificate-of-service-submit-content.ts b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details-submit/certificate-of-service-notify-claim-details-submit-content.ts similarity index 100% rename from playwright-e2e/pages/exui/fragments/certificate-of-service-submit/certificate-of-service-submit-content.ts rename to playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details-submit/certificate-of-service-notify-claim-details-submit-content.ts diff --git a/playwright-e2e/pages/exui/fragments/certificate-of-service-submit/certificate-of-service-submit-fragment.ts b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details-submit/certificate-of-service-notify-claim-details-submit-fragment.ts similarity index 87% rename from playwright-e2e/pages/exui/fragments/certificate-of-service-submit/certificate-of-service-submit-fragment.ts rename to playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details-submit/certificate-of-service-notify-claim-details-submit-fragment.ts index 52855102d9..0b2b563899 100644 --- a/playwright-e2e/pages/exui/fragments/certificate-of-service-submit/certificate-of-service-submit-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details-submit/certificate-of-service-notify-claim-details-submit-fragment.ts @@ -2,10 +2,16 @@ import BasePage from '../../../../base/base-page'; import { AllMethodsStep } from '../../../../decorators/test-steps'; import DateHelper from '../../../../helpers/date-helper'; import ExuiPage from '../../exui-page/exui-page'; -import { getDefendantHeading, subheading, table } from './certificate-of-service-submit-content'; +import { + getDefendantHeading, + subheading, + table, +} from './certificate-of-service-notify-claim-details-submit-content'; @AllMethodsStep() -export default class CertificateOfServiceSubmitFragment extends ExuiPage(BasePage) { +export default class CertificateOfServiceNotifyClaimDetailsSubmitFragment extends ExuiPage( + BasePage, +) { async verifyContent() { await super.runVerifications( [ @@ -37,9 +43,11 @@ export default class CertificateOfServiceSubmitFragment extends ExuiPage(BasePag [ super.expectText( DateHelper.formatDateToString(dateDeemedServed, { outputFormat: 'DD Mon YYYY' }), + { first: true }, ), super.expectText( DateHelper.formatDateToString(dateOfService, { outputFormat: 'DD Mon YYYY' }), + { first: true }, ), super.expectText(table.documentsServed.defendant1Answer), super.expectText(table.documentsServedLocation.defendant1Answer), @@ -54,9 +62,9 @@ export default class CertificateOfServiceSubmitFragment extends ExuiPage(BasePag } async verifyDefendant2Answers() { - const dateDeemedServed = DateHelper.subtractFromToday({ days: 14 }); - const dateOfService = DateHelper.subtractFromToday({ - days: 14, + const dateDeemedServed = DateHelper.getToday(); + const dateOfService = DateHelper.addToToday({ + days: 2, workingDay: true, addDayAfter4pm: true, }); @@ -64,11 +72,11 @@ export default class CertificateOfServiceSubmitFragment extends ExuiPage(BasePag [ super.expectText( DateHelper.formatDateToString(dateDeemedServed, { outputFormat: 'DD Mon YYYY' }), - { count: null }, + { index: 1 }, ), super.expectText( DateHelper.formatDateToString(dateOfService, { outputFormat: 'DD Mon YYYY' }), - { count: null }, + { index: 1 }, ), super.expectText(table.documentsServed.defendant2Answer), super.expectText(table.documentsServedLocation.defendant2Answer), diff --git a/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details/certificate-of-service-notify-claim-details-content.ts b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details/certificate-of-service-notify-claim-details-content.ts new file mode 100644 index 0000000000..e969ce27fa --- /dev/null +++ b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details/certificate-of-service-notify-claim-details-content.ts @@ -0,0 +1,119 @@ +import { Party } from '../../../../models/partys'; +import StringHelper from '../../../../helpers/string-helper'; + +export const heading = (defendantParty: Party) => `Certificate of Service [${defendantParty.key}]`; + +export const inputs = { + dateOfService: { + label: 'On what day did you serve?', + }, + dateDeemedServed: { + label: 'The date of service is', + }, + documentsServed: { + label: 'What documents did you serve?', + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosServedDocumentFiles`, + }, + documentsServedLocation: { + label: 'Where did you serve the documunts', + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosRecipientServeLocation`, + }, + notifyClaimRecipient: { + label: 'Who did you serve the claim to?', + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosRecipient`, + }, + statementOfTruth: { + name: { + label: 'Your name', + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosSender`, + }, + firm: { + label: 'Your firm', + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosSenderFirm`, + }, + }, + evidenceDocument: { + label: 'Supporting evidence', + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosEvidenceDocument_value`, + }, +}; + +export const dropdowns = { + serveType: { + label: 'How did you serve the documents?', + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosRecipientServeType`, + options: [ + 'Personally handed it to or left it with', + 'Delivered to or left at permitted place', + 'Sent by first class post or another service which delivers on the next business day', + 'Other means permitted by the court', + ], + }, + locationType: { + label: 'Select the type of location where you served the documents', + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosRecipientServeLocationType`, + options: [ + 'Usual Residence', + 'Last known residence', + 'Place of business of the partnership/company/corporation within the jurisdiction with a connection to the claim', + 'Principal office of the company', + 'Principal office of the coropration', + 'Principal office of the partnership', + 'Last known principal place of business', + 'Principal place of business', + 'Place of business', + 'Email', + 'Other', + ], + }, +}; + +export const radioButtons = { + docsServed: { + label: 'The location where you served the documents was the:', + litigationFriend: { + label: "litigation friend's", + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosRecipientServeLocationOwnerType-FRIEND`, + }, + solicitor: { + label: "solicitor's", + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosRecipientServeLocationOwnerType-SOLICITOR`, + }, + defendant: { + label: "defendant's", + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosRecipientServeLocationOwnerType-DEFENDANT`, + }, + claimant: { + label: "claimant's", + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosRecipientServeLocationOwnerType-CLAIMANT`, + }, + }, +}; + +export const checkboxes = { + signedTrue: { + label: 'I believe that the facts stated in the certificate are true', + selector: (defendantParty: Party) => + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosUISenderStatementOfTruthLabel-CERTIFIED`, + }, +}; + +export const buttons = { + addNewSupportingEvidence: { + title: 'Add new', + selector: (defendantParty: Party) => + `div[id='cosNotifyClaimDetails${defendantParty.number}_cosEvidenceDocument'] button[class='button write-collection-add-item__top']`, + }, +}; diff --git a/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details/certificate-of-service-notify-claim-details-fragment.ts b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details/certificate-of-service-notify-claim-details-fragment.ts new file mode 100644 index 0000000000..36d913fe88 --- /dev/null +++ b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim-details/certificate-of-service-notify-claim-details-fragment.ts @@ -0,0 +1,108 @@ +import { Page } from 'playwright-core'; +import BasePage from '../../../../base/base-page'; +import filePaths from '../../../../config/file-paths'; +import { AllMethodsStep } from '../../../../decorators/test-steps'; +import DateHelper from '../../../../helpers/date-helper'; +import ExuiPage from '../../exui-page/exui-page'; +import { + heading, + inputs, + buttons, + checkboxes, + dropdowns, + radioButtons, +} from './certificate-of-service-notify-claim-details-content'; +import { Party } from '../../../../models/partys'; +import DateFragment from '../date/date-fragment'; + +@AllMethodsStep() +export default class CertificateOfServiceNotifyClaimDetailsFragment extends ExuiPage(BasePage) { + private dateFragment: DateFragment; + private defendantParty: Party; + + constructor(page: Page, defendantParty: Party) { + super(page); + this.dateFragment = new DateFragment(page); + this.defendantParty = defendantParty; + } + + async verifyContent() { + await super.runVerifications( + [ + super.expectHeading(heading(this.defendantParty)), + super.expectText(inputs.dateDeemedServed.label), + super.expectText(inputs.dateDeemedServed.label), + super.expectLabel(inputs.statementOfTruth.firm.label), + super.expectLabel(inputs.documentsServed.label), + super.expectLabel(inputs.statementOfTruth.name.label), + super.expectLabel(inputs.notifyClaimRecipient.label), + super.expectLabel(dropdowns.locationType.label), + super.expectLabel(dropdowns.serveType.label), + super.expectLabel(radioButtons.docsServed.litigationFriend.label), + super.expectLabel(radioButtons.docsServed.defendant.label), + super.expectLabel(radioButtons.docsServed.litigationFriend.label), + super.expectLabel(radioButtons.docsServed.solicitor.label), + super.expectText(checkboxes.signedTrue.label, { first: true }), + ], + { runAxe: false }, + ); + } + + async fillCertificateOfService() { + const dateDeemedServed = DateHelper.getToday(); + const dateOfService = DateHelper.addToToday({ + days: 2, + workingDay: true, + addDayAfter4pm: true, + }); + + await this.dateFragment.enterDate(dateDeemedServed, 'cosDateOfServiceForDefendant'); + await this.dateFragment.enterDate(dateOfService, 'cosDateDeemedServedForDefendant'); + + await super.inputText( + `Test Documents ${this.defendantParty.number}`, + inputs.documentsServed.selector(this.defendantParty), + ); + await super.inputText( + `Defendant ${this.defendantParty.number}`, + inputs.notifyClaimRecipient.selector(this.defendantParty), + ); + await super.selectFromDropdown( + dropdowns.locationType.options[this.defendantParty.number - 1], + dropdowns.locationType.selector(this.defendantParty), + ); + await super.inputText( + `Test Address ${this.defendantParty.number}`, + inputs.documentsServedLocation.selector(this.defendantParty), + ); + await super.clickBySelector(radioButtons.docsServed.claimant.selector(this.defendantParty)); + await super.selectFromDropdown( + dropdowns.serveType.options[this.defendantParty.number - 1], + dropdowns.serveType.selector(this.defendantParty), + ); + } + + async uploadSupportingEvidence() { + await super.clickBySelector(buttons.addNewSupportingEvidence.selector(this.defendantParty)); + await super.retryUploadFile( + filePaths.testPdfFile, + inputs.evidenceDocument.selector(this.defendantParty), + ); + } + + async fillStatementOfTruth() { + await super.inputText( + `Name ${this.defendantParty.number}`, + inputs.statementOfTruth.name.selector(this.defendantParty), + ); + await super.inputText( + `Law firm ${this.defendantParty.number}`, + inputs.statementOfTruth.firm.selector(this.defendantParty), + ); + await super.clickBySelector(checkboxes.signedTrue.selector(this.defendantParty)); + } + + async submit() { + throw new Error('Method not implemented.'); + } +} diff --git a/playwright-e2e/pages/exui/fragments/certificate-of-service/certificate-of-service-content.ts b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim/certificate-of-service-notify-claim-content.ts similarity index 98% rename from playwright-e2e/pages/exui/fragments/certificate-of-service/certificate-of-service-content.ts rename to playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim/certificate-of-service-notify-claim-content.ts index 6c250da034..bf70addb77 100644 --- a/playwright-e2e/pages/exui/fragments/certificate-of-service/certificate-of-service-content.ts +++ b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim/certificate-of-service-notify-claim-content.ts @@ -40,7 +40,7 @@ export const inputs = { evidenceDocument: { label: 'Supporting evidence', selector: (defendantParty: Party) => - `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.key)}_cosEvidenceDocument_value`, + `#cosNotifyClaimDetails${StringHelper.capitalise(defendantParty.number.toString())}_cosEvidenceDocument_value`, }, }; diff --git a/playwright-e2e/pages/exui/fragments/certificate-of-service/certificate-of-service-fragment.ts b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim/certificate-of-service-notify-claim-fragment.ts similarity index 96% rename from playwright-e2e/pages/exui/fragments/certificate-of-service/certificate-of-service-fragment.ts rename to playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim/certificate-of-service-notify-claim-fragment.ts index ac627e91c8..117208a89a 100644 --- a/playwright-e2e/pages/exui/fragments/certificate-of-service/certificate-of-service-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/certificate-of-service-notify-claim/certificate-of-service-notify-claim-fragment.ts @@ -11,12 +11,12 @@ import { checkboxes, dropdowns, radioButtons, -} from './certificate-of-service-content'; +} from './certificate-of-service-notify-claim-content'; import { Party } from '../../../../models/partys'; import DateFragment from '../date/date-fragment'; @AllMethodsStep() -export default class CertificateOfServiceFragment extends ExuiPage(BasePage) { +export default class CertificateOfServiceFragmentNotifyClaim extends ExuiPage(BasePage) { private dateFragment: DateFragment; private defendantParty: Party; diff --git a/playwright-e2e/pages/exui/fragments/choose-party-type/choose-party-type-content.ts b/playwright-e2e/pages/exui/fragments/choose-party-type/choose-party-type-content.ts index 9f897535a8..46fe8dfa14 100644 --- a/playwright-e2e/pages/exui/fragments/choose-party-type/choose-party-type-content.ts +++ b/playwright-e2e/pages/exui/fragments/choose-party-type/choose-party-type-content.ts @@ -1,6 +1,6 @@ import { Party } from '../../../../models/partys'; -export const buttons = { +export const radioButtons = { individual: { label: 'Individual', selector: (claimantDefendantParty: Party) => @@ -10,8 +10,8 @@ export const buttons = { label: 'Company', selector: (claimantDefendantParty: Party) => `#${claimantDefendantParty.oldKey}_type-COMPANY`, }, - organisaiton: { - label: 'Organisaiton', + organisation: { + label: 'Organisation', selector: (claimantDefendantParty: Party) => `#${claimantDefendantParty.oldKey}_type-ORGANISATION`, }, diff --git a/playwright-e2e/pages/exui/fragments/choose-party-type/choose-party-type-fragment.ts b/playwright-e2e/pages/exui/fragments/choose-party-type/choose-party-type-fragment.ts index aa08766713..e4cbb5409a 100644 --- a/playwright-e2e/pages/exui/fragments/choose-party-type/choose-party-type-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/choose-party-type/choose-party-type-fragment.ts @@ -2,7 +2,7 @@ import { Page } from 'playwright-core'; import BasePage from '../../../../base/base-page'; import { AllMethodsStep } from '../../../../decorators/test-steps'; import ExuiPage from '../../exui-page/exui-page'; -import { buttons } from './choose-party-type-content'; +import { radioButtons } from './choose-party-type-content'; import { Party } from '../../../../models/partys'; @AllMethodsStep() @@ -17,10 +17,10 @@ export default class ChoosePartyTypeFragment extends ExuiPage(BasePage) { async verifyContent() { await super.runVerifications( [ - super.expectLabel(buttons.individual.label), - super.expectLabel(buttons.company.label), - super.expectLabel(buttons.organisaiton.label), - super.expectLabel(buttons.soleTrader.label), + super.expectLabel(radioButtons.individual.label), + super.expectLabel(radioButtons.company.label), + super.expectLabel(radioButtons.organisation.label), + super.expectLabel(radioButtons.soleTrader.label), ], { runAxe: false, @@ -29,19 +29,19 @@ export default class ChoosePartyTypeFragment extends ExuiPage(BasePage) { } async selectIndivdual() { - await super.clickBySelector(buttons.individual.selector(this.claimantDefendantParty)); + await super.clickBySelector(radioButtons.individual.selector(this.claimantDefendantParty)); } async selectCompany() { - await super.clickBySelector(buttons.individual.selector(this.claimantDefendantParty)); + await super.clickBySelector(radioButtons.company.selector(this.claimantDefendantParty)); } async selectOrganisation() { - await super.clickBySelector(buttons.individual.selector(this.claimantDefendantParty)); + await super.clickBySelector(radioButtons.organisation.selector(this.claimantDefendantParty)); } async selectSoleTrader() { - await super.clickBySelector(buttons.individual.selector(this.claimantDefendantParty)); + await super.clickBySelector(radioButtons.soleTrader.selector(this.claimantDefendantParty)); } async submit() { diff --git a/playwright-e2e/pages/exui/fragments/litigation-friend/litigation-friend-content.ts b/playwright-e2e/pages/exui/fragments/litigation-friend/litigation-friend-content.ts index db4e4f745a..3801646639 100644 --- a/playwright-e2e/pages/exui/fragments/litigation-friend/litigation-friend-content.ts +++ b/playwright-e2e/pages/exui/fragments/litigation-friend/litigation-friend-content.ts @@ -28,42 +28,42 @@ export const inputs = { postCodeInput: { label: 'Enter a UK postcode', selector: (litigationFriendParty: Party) => - `#${litigationFriendParty.oldKey}_primaryaddress_primaryaddress_postcodeInput`, + `#${litigationFriendParty.oldKey}_primaryAddress_primaryAddress_postcodeInput`, }, addressLine1: { label: 'Building and Street', selector: (litigationFriendParty: Party) => - `#${litigationFriendParty.oldKey}_primaryaddress__detailAddressLine1`, + `#${litigationFriendParty.oldKey}_primaryAddress__detailAddressLine1`, }, addressLine2: { label: 'Address Line 2', selector: (litigationFriendParty: Party) => - `#${litigationFriendParty.oldKey}_primaryaddress__detailAddressLine2`, + `#${litigationFriendParty.oldKey}_primaryAddress__detailAddressLine2`, }, addressLine3: { label: 'Address Line 3', selector: (litigationFriendParty: Party) => - `#${litigationFriendParty.oldKey}_primaryaddress__detailAddressLine3`, + `#${litigationFriendParty.oldKey}_primaryAddress__detailAddressLine3`, }, postTown: { label: 'Town or City', selector: (litigationFriendParty: Party) => - `#${litigationFriendParty.oldKey}_primaryaddress__detailPostTown`, + `#${litigationFriendParty.oldKey}_primaryAddress__detailPostTown`, }, county: { label: 'County', selector: (litigationFriendParty: Party) => - `#${litigationFriendParty.oldKey}_primaryaddress__detailCounty`, + `#${litigationFriendParty.oldKey}_primaryAddress__detailCounty`, }, country: { label: 'Country', selector: (litigationFriendParty: Party) => - `#${litigationFriendParty.oldKey}_primaryaddress__detailCountry`, + `#${litigationFriendParty.oldKey}_primaryAddress__detailCountry`, }, postCode: { label: 'Postcode/Zipcode', selector: (litigationFriendParty: Party) => - `#${litigationFriendParty.oldKey}_primaryaddress__detailPostCode`, + `#${litigationFriendParty.oldKey}_primaryAddress__detailPostCode`, }, }, certificateOfSuitability: { diff --git a/playwright-e2e/pages/exui/fragments/litigation-friend/litigation-friend-fragment.ts b/playwright-e2e/pages/exui/fragments/litigation-friend/litigation-friend-fragment.ts index be04d69770..a4379d9b1f 100644 --- a/playwright-e2e/pages/exui/fragments/litigation-friend/litigation-friend-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/litigation-friend/litigation-friend-fragment.ts @@ -7,6 +7,7 @@ import { radioButtons, buttons, inputs, subheadings, links } from './litigation- import filePaths from '../../../../config/file-paths'; import AddressFragment from '../address/address-fragment'; import CaseDataHelper from '../../../../helpers/case-data-helper'; +import partys from '../../../../constants/partys'; @AllMethodsStep() export default class LitigationFriendFragment extends ExuiPage(BasePage) { @@ -61,7 +62,8 @@ export default class LitigationFriendFragment extends ExuiPage(BasePage) { async chooseNoSameAddress() { const addressData = CaseDataHelper.buildAddressData(this.litigationFriendParty); await super.clickBySelector(radioButtons.address.no.selector(this.litigationFriendParty)); - await super.clickLink(links.cannotFindAddress.title); + if (this.litigationFriendParty !== partys.CLAIMANT_2_LITIGATION_FRIEND) + await super.clickLink(links.cannotFindAddress.title); await super.inputText( addressData.AddressLine1, inputs.address.addressLine1.selector(this.litigationFriendParty), @@ -78,10 +80,11 @@ export default class LitigationFriendFragment extends ExuiPage(BasePage) { addressData.PostTown, inputs.address.postTown.selector(this.litigationFriendParty), ); - await super.inputText( - addressData.County, - inputs.address.county.selector(this.litigationFriendParty), - ); + if (this.litigationFriendParty !== partys.CLAIMANT_2_LITIGATION_FRIEND) + await super.inputText( + addressData.County, + inputs.address.county.selector(this.litigationFriendParty), + ); await super.inputText( addressData.Country, inputs.address.country.selector(this.litigationFriendParty), @@ -94,7 +97,10 @@ export default class LitigationFriendFragment extends ExuiPage(BasePage) { async uploadCertificateOfSuitability() { await super.clickBySelector(buttons.addNewCertificate.selector(this.litigationFriendParty)); - await super.expectLabel(inputs.certificateOfSuitability.uploadDoc.label); + await super.expectLabel(inputs.certificateOfSuitability.uploadDoc.label, { + exact: true, + index: 0, + }); await super.retryUploadFile( filePaths.testPdfFile, inputs.certificateOfSuitability.uploadDoc.selector(this.litigationFriendParty), diff --git a/playwright-e2e/pages/exui/fragments/particulars-of-claim/particulars-of-claim-content.ts b/playwright-e2e/pages/exui/fragments/particulars-of-claim/particulars-of-claim-content.ts index 2a27c83f49..62f8f191b0 100644 --- a/playwright-e2e/pages/exui/fragments/particulars-of-claim/particulars-of-claim-content.ts +++ b/playwright-e2e/pages/exui/fragments/particulars-of-claim/particulars-of-claim-content.ts @@ -1,26 +1,25 @@ export const subheadings = { uploadDocuments: 'Upload documents', partiularsOfClaim: 'Particulars of claim (Optional)', - medicalReports: 'Medical reports', scheduleOfLoss: 'Schedule of loss', certificateOfSuitability: 'Certificate of suitability', }; export const inputs = { uploadPartiularsOfClaim: { - title: 'Choose file', + title: 'Document (Optional)', selector: '#servedDocumentFiles_particularsOfClaimDocument_value', }, uploadMedicalReports: { - title: 'Choose file', + title: 'Document (Optional)', selector: '#servedDocumentFiles_medicalReport_0_document', }, uploadScheduleOfLoss: { - title: 'Choose file', + title: 'Document (Optional)', selector: '#servedDocumentFiles_scheduleOfLoss_0_document', }, uploadCertificateOfSuitability: { - title: 'Choose file', + title: 'Document (Optional)', selector: '#servedDocumentFiles_certificateOfSuitability_0_document', }, }; diff --git a/playwright-e2e/pages/exui/fragments/particulars-of-claim/particulars-of-claim-fragment.ts b/playwright-e2e/pages/exui/fragments/particulars-of-claim/particulars-of-claim-fragment.ts index 8b8c057855..0b663503a9 100644 --- a/playwright-e2e/pages/exui/fragments/particulars-of-claim/particulars-of-claim-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/particulars-of-claim/particulars-of-claim-fragment.ts @@ -12,7 +12,6 @@ export default class ParticularsOfClaimFragment extends ExuiPage(BasePage) { [ super.expectSubheading(subheadings.uploadDocuments), super.expectSubheading(subheadings.partiularsOfClaim), - super.expectText(subheadings.medicalReports, { exact: true }), super.expectSubheading(subheadings.scheduleOfLoss), super.expectSubheading(subheadings.certificateOfSuitability), ], @@ -22,7 +21,7 @@ export default class ParticularsOfClaimFragment extends ExuiPage(BasePage) { async uploadDocuments() { await super.clickBySelector(buttons.addPartiularsOfClaim.selector); - // await super.retryUploadFile(filePaths.testPdfFile, inputs.uploadPartiularsOfClaim.selector); + await super.retryUploadFile(filePaths.testPdfFile, inputs.uploadPartiularsOfClaim.selector); await super.clickBySelector(buttons.addMedicalReports.selector); await super.retryUploadFile(filePaths.testPdfFile, inputs.uploadMedicalReports.selector); await super.clickBySelector(buttons.addScheduleOfLoss.selector); diff --git a/playwright-e2e/pages/exui/fragments/party-type/party-type-company-fragment.ts b/playwright-e2e/pages/exui/fragments/party-type/party-type-company-fragment.ts index cb4d136925..da36da9ff2 100644 --- a/playwright-e2e/pages/exui/fragments/party-type/party-type-company-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/party-type/party-type-company-fragment.ts @@ -18,7 +18,10 @@ export default class PartyTypeCompanyFragment extends ExuiPage(BasePage) { async verifyContent() { await super.runVerifications( - [super.expectLabel(inputs.name.label), super.expectLabel(inputs.email.label)], + [ + // super.expectLabel(inputs.name.label, { exact: true, index: 0 }), + super.expectLabel(inputs.email.label), + ], { runAxe: false, }, diff --git a/playwright-e2e/pages/exui/fragments/party-type/party-type-individual-fragment.ts b/playwright-e2e/pages/exui/fragments/party-type/party-type-individual-fragment.ts index 5fed6d62bd..5ad7114e61 100644 --- a/playwright-e2e/pages/exui/fragments/party-type/party-type-individual-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/party-type/party-type-individual-fragment.ts @@ -3,10 +3,11 @@ import BasePage from '../../../../base/base-page'; import { AllMethodsStep } from '../../../../decorators/test-steps'; import { Party } from '../../../../models/partys'; import ExuiPage from '../../exui-page/exui-page'; -import { inputs } from '../party-type/party-type-content'; +import { inputs } from './party-type-content'; import DateFragment from '../date/date-fragment'; import claimantDefendantPartyTypes from '../../../../constants/claimant-defendant-party-types'; import CaseDataHelper from '../../../../helpers/case-data-helper'; +import PartyType from '../../../../enums/party-types'; @AllMethodsStep() export default class PartyTypeIndividualFragment extends ExuiPage(BasePage) { @@ -23,10 +24,10 @@ export default class PartyTypeIndividualFragment extends ExuiPage(BasePage) { async verifyContent() { await super.runVerifications( [ - super.expectLabel(inputs.firstName.label), - super.expectLabel(inputs.lastName.label), - super.expectLabel(inputs.dateOfBirth.label, { index: 0 }), - this.dateFragment.verifyContent(), + // super.expectLabel(inputs.title.label, { index: 0 }), + // super.expectLabel(inputs.firstName.label, { index: 0 }), + // super.expectLabel(inputs.lastName.label, { index: 0 }), + // super.expectText(inputs.dateOfBirth.label, { index: 0 }), super.expectLabel(inputs.email.label), super.expectLabel(inputs.phone.label), ], @@ -36,7 +37,7 @@ export default class PartyTypeIndividualFragment extends ExuiPage(BasePage) { ); } - async enterIndividualDetails(dateOfBirth?: Date, phoneNumber?: string) { + async enterIndividualDetails() { const individualData = CaseDataHelper.buildClaimantAndDefendantData( this.claimantDefendantParty, this.partyType, @@ -53,7 +54,8 @@ export default class PartyTypeIndividualFragment extends ExuiPage(BasePage) { individualData.individualLastName, inputs.lastName.selector(this.claimantDefendantParty, this.partyType), ); - await this.dateFragment.enterDateOfBirth(this.claimantDefendantParty, this.partyType); + if (this.claimantDefendantParty.partyType === PartyType.CLAIMANT) + await this.dateFragment.enterDateOfBirth(this.claimantDefendantParty, this.partyType); await super.inputText( individualData.partyEmail, inputs.email.selector(this.claimantDefendantParty), diff --git a/playwright-e2e/pages/exui/fragments/party-type/party-type-organisation-fragment.ts b/playwright-e2e/pages/exui/fragments/party-type/party-type-organisation-fragment.ts index 7be2ed19ec..34730d47de 100644 --- a/playwright-e2e/pages/exui/fragments/party-type/party-type-organisation-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/party-type/party-type-organisation-fragment.ts @@ -19,7 +19,10 @@ export default class PartyTypeOrganisationFragment extends ExuiPage(BasePage) { async verifyContent() { await super.runVerifications( - [super.expectLabel(inputs.name.label), super.expectLabel(inputs.email.label)], + [ + // super.expectLabel(inputs.name.label, { exact: true, index: 1 }), + super.expectLabel(inputs.email.label), + ], { runAxe: false, }, diff --git a/playwright-e2e/pages/exui/fragments/party-type/party-type-sole-trader-fragment.ts b/playwright-e2e/pages/exui/fragments/party-type/party-type-sole-trader-fragment.ts index d9999a7527..de88b35937 100644 --- a/playwright-e2e/pages/exui/fragments/party-type/party-type-sole-trader-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/party-type/party-type-sole-trader-fragment.ts @@ -8,11 +8,12 @@ import DateHelper from '../../../../helpers/date-helper'; import DateFragment from '../date/date-fragment'; import claimantDefendantPartyTypes from '../../../../constants/claimant-defendant-party-types'; import CaseDataHelper from '../../../../helpers/case-data-helper'; +import PartyType from '../../../../enums/party-types'; @AllMethodsStep() export default class PartyTypeSoleTraderFragment extends ExuiPage(BasePage) { private dateFragment: DateFragment; - private partyType = claimantDefendantPartyTypes.INDIVIDUAL; + private partyType = claimantDefendantPartyTypes.SOLE_TRADER; private claimantDefendantParty: Party; constructor(page: Page, claimantDefendantParty: Party) { @@ -24,10 +25,11 @@ export default class PartyTypeSoleTraderFragment extends ExuiPage(BasePage) { async verifyContent() { await super.runVerifications( [ - super.expectLabel(inputs.firstName.label), - super.expectLabel(inputs.lastName.label), - super.expectLabel(inputs.dateOfBirth.label, { index: 1 }), - this.dateFragment.verifyContent(), + // super.expectLabel(inputs.firstName.label, { index: 1 }), + // super.expectLabel(inputs.lastName.label, { index: 1 }), + // super.expectText(inputs.dateOfBirth.label, { index: 1 }), + // this.dateFragment.verifyContent(), + super.expectLabel(inputs.tradingAs.label), super.expectLabel(inputs.email.label), super.expectLabel(inputs.phone.label), ], @@ -58,7 +60,8 @@ export default class PartyTypeSoleTraderFragment extends ExuiPage(BasePage) { soleTraderData.soleTraderTradingAs, inputs.tradingAs.selector(this.claimantDefendantParty, this.partyType), ); - await this.dateFragment.enterDateOfBirth(this.claimantDefendantParty, this.partyType); + if (this.claimantDefendantParty.partyType === PartyType.CLAIMANT) + await this.dateFragment.enterDateOfBirth(this.claimantDefendantParty, this.partyType); await super.inputText( soleTraderData.partyEmail, inputs.email.selector(this.claimantDefendantParty), diff --git a/playwright-e2e/pages/exui/fragments/remote-hearing-spec/remote-hearing-spec-fragment.ts b/playwright-e2e/pages/exui/fragments/remote-hearing-spec/remote-hearing-spec-fragment.ts index 5efd8aa0d0..43080000c2 100644 --- a/playwright-e2e/pages/exui/fragments/remote-hearing-spec/remote-hearing-spec-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/remote-hearing-spec/remote-hearing-spec-fragment.ts @@ -20,8 +20,6 @@ export default class RemoteHearingSpecFragment extends ExuiPage(BasePage) { super.expectSubheading(subheadings.remoteHearing), super.expectText(radioButtons.remoteHearing.label), super.expectText(radioButtons.remoteHearing.hintText), - super.expectLabel(radioButtons.remoteHearing.yes.label), - super.expectLabel(radioButtons.remoteHearing.no.label), ], { runAxe: false, diff --git a/playwright-e2e/pages/exui/fragments/remote-hearing/remote-hearing-fragment.ts b/playwright-e2e/pages/exui/fragments/remote-hearing/remote-hearing-fragment.ts index bb9f5d534b..aa92e85a6d 100644 --- a/playwright-e2e/pages/exui/fragments/remote-hearing/remote-hearing-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/remote-hearing/remote-hearing-fragment.ts @@ -19,8 +19,6 @@ export default class RemoteHearingFragment extends ExuiPage(BasePage) { [ super.expectText(radioButtons.remoteHearing.label), super.expectText(radioButtons.remoteHearing.hintText), - super.expectLabel(radioButtons.remoteHearing.yes.label), - super.expectLabel(radioButtons.remoteHearing.no.label), ], { runAxe: false, diff --git a/playwright-e2e/pages/exui/fragments/service-address/service-address-content.ts b/playwright-e2e/pages/exui/fragments/service-address/service-address-content.ts index 72a3510158..9a547ddcfa 100644 --- a/playwright-e2e/pages/exui/fragments/service-address/service-address-content.ts +++ b/playwright-e2e/pages/exui/fragments/service-address/service-address-content.ts @@ -1,3 +1,4 @@ +import PartyType from '../../../../enums/party-types'; import StringHelper from '../../../../helpers/string-helper'; import { Party } from '../../../../models/partys'; @@ -8,11 +9,11 @@ export const subheadings = { export const radioButtons = { addressRequired: { label: (claimantDefendantParty: Party) => - `Postal correspondence for the ${StringHelper.capitalise(claimantDefendantParty.oldPartyType)}'s legal representative will be sent to the address registered with MyHMCTS.` + - 'You can, if you wish, change the address to which postal correspondence is sent (eg if you work out of a different office from the address registered with MyHMCTS).' + + `Postal correspondence for the ${StringHelper.capitalise(claimantDefendantParty.partyType === PartyType.CLAIMANT ? claimantDefendantParty.partyType : claimantDefendantParty.oldPartyType)}’s legal representative will be sent to the address registered with MyHMCTS. ` + + 'You can, if you wish, change the address to which postal correspondence is sent (eg if you work out of a different office from the address registered with MyHMCTS). ' + 'Do you wish to enter a different address?', hintText: (claimantDefendantParty: Party) => - `This is the address to which postal correspondence for the ${StringHelper.capitalise(claimantDefendantParty.oldPartyType)}'s legal representative will be sent.`, + `This is the address to which postal correspondence for the ${StringHelper.capitalise(claimantDefendantParty.partyType === PartyType.CLAIMANT ? claimantDefendantParty.partyType : claimantDefendantParty.oldPartyType)}’s legal representative will be sent.`, yes: { label: 'Yes', selector: (solicitorParty: Party) => `#${solicitorParty.oldKey}ServiceAddressRequired_Yes`, diff --git a/playwright-e2e/pages/exui/fragments/solicitor-reference/solicitor-reference-content.ts b/playwright-e2e/pages/exui/fragments/solicitor-reference/solicitor-reference-content.ts index 54f1081e17..300bb71bdd 100644 --- a/playwright-e2e/pages/exui/fragments/solicitor-reference/solicitor-reference-content.ts +++ b/playwright-e2e/pages/exui/fragments/solicitor-reference/solicitor-reference-content.ts @@ -1,9 +1,10 @@ +import StringHelper from '../../../../helpers/string-helper'; import { Party } from '../../../../models/partys'; export const inputs = { reference: { label: (claimantDefendantParty: Party) => - `${claimantDefendantParty.partyType}'s legal representative's reference (Optional)`, + `${StringHelper.capitalise(claimantDefendantParty.partyType)}'s legal representative's reference (Optional)`, selector: (solicitorParty: Party) => `#${solicitorParty.number === 2 ? '' : 'solicitorReferences_'}${solicitorParty.oldKey}Reference`, }, diff --git a/playwright-e2e/pages/exui/fragments/solicitor-reference/solicitor-reference-fragment.ts b/playwright-e2e/pages/exui/fragments/solicitor-reference/solicitor-reference-fragment.ts index 348632feab..02a4fe423f 100644 --- a/playwright-e2e/pages/exui/fragments/solicitor-reference/solicitor-reference-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/solicitor-reference/solicitor-reference-fragment.ts @@ -18,7 +18,11 @@ export default class SolicitorReferenceFragment extends ExuiPage(BasePage) { async verifyContent() { await super.runVerifications( - [super.expectLabel(inputs.reference.label(this.claimantDefendantParty))], + [ + // super.expectLabel(inputs.reference.label(this.claimantDefendantParty), { + // index: this.claimantDefendantParty.number - 1, + // }), + ], { runAxe: false, }, diff --git a/playwright-e2e/pages/exui/fragments/statement-of-truth/statement-of-truth-fragment.ts b/playwright-e2e/pages/exui/fragments/statement-of-truth/statement-of-truth-fragment.ts index 4d2119e28e..88cf63d548 100644 --- a/playwright-e2e/pages/exui/fragments/statement-of-truth/statement-of-truth-fragment.ts +++ b/playwright-e2e/pages/exui/fragments/statement-of-truth/statement-of-truth-fragment.ts @@ -3,6 +3,7 @@ import BasePage from '../../../../base/base-page'; import { Party } from '../../../../models/partys'; import ExuiPage from '../../exui-page/exui-page'; import { inputs, subheadings } from './statement-of-truth-content'; +import StringHelper from '../../../../helpers/string-helper'; export default class StatementOfTruthFragment extends ExuiPage(BasePage) { private solicitorParty: Party; @@ -13,7 +14,7 @@ export default class StatementOfTruthFragment extends ExuiPage(BasePage) { } async verifyContent() { - super.runVerifications( + await super.runVerifications( [ super.expectSubheading(subheadings.statementOfTruth), super.expectLabel(inputs.name.label), @@ -24,8 +25,11 @@ export default class StatementOfTruthFragment extends ExuiPage(BasePage) { } async enterDetails() { - await super.inputText(this.solicitorParty.key, inputs.name.selector); - await super.inputText(this.solicitorParty.partyType, inputs.role.selector); + await super.inputText(StringHelper.capitalise(this.solicitorParty.key), inputs.name.selector); + await super.inputText( + StringHelper.capitalise(this.solicitorParty.partyType), + inputs.role.selector, + ); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/acknowledge-claim-page-factory.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/acknowledge-claim-page-factory.ts new file mode 100644 index 0000000000..68fdc2244c --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/acknowledge-claim-page-factory.ts @@ -0,0 +1,68 @@ +import BasePageFactory from '../../../../base/base-page-factory'; +import partys from '../../../../constants/partys'; +import DateFragment from '../../fragments/date/date-fragment'; +import SolicitorReferenceFragment from '../../fragments/solicitor-reference/solicitor-reference-fragment'; +import ConfirmAcknowledgeClaimPage from './unspec/confirm-acknowledge-claim/confirm-acknowledge-claim-page'; +import ConfirmNameAndAddressPage from './unspec/confirm-name-and-address/confirm-name-and-address-page'; +import ResponseIntention1v2SSPage from './unspec/response-intention/response-intention-1v2SS-page'; +import ResponseIntention2v1Page from './unspec/response-intention/response-intention-2v1-page'; +import ResponseIntentionPage from './unspec/response-intention/response-intention-page'; +import SolicitorReferencesAcknowledgeClaimPage from './unspec/solicitor-references-acknowledge-claim/solicitor-references-acknowledge-claim-page'; +import SubmitAcknowledgeClaimPage from './unspec/submit-acknowledge-claim/submit-acknowledge-claim-page'; + +export default class AcknowledgeClaimPageFactory extends BasePageFactory { + get confirmNameAndAddressPage() { + const dateFragment = new DateFragment(this.page); + return new ConfirmNameAndAddressPage(this.page, dateFragment); + } + + get responseIntensionDefendant1Page() { + return new ResponseIntentionPage(this.page, partys.DEFENDANT_1); + } + + get responseIntensionDefendant2Page() { + return new ResponseIntentionPage(this.page, partys.DEFENDANT_2); + } + + get responseIntention2v1Page() { + return new ResponseIntention2v1Page(this.page); + } + + get responseIntention1v2SSPage() { + return new ResponseIntention1v2SSPage(this.page); + } + + get solicitorReferencesAcknowledgeClaimDefendant1Page() { + const solicitorReferenceFragment = new SolicitorReferenceFragment( + this.page, + partys.DEFENDANT_1, + partys.DEFENDANT_SOLICITOR_1, + ); + return new SolicitorReferencesAcknowledgeClaimPage( + this.page, + solicitorReferenceFragment, + partys.DEFENDANT_1, + ); + } + + get solicitorReferencesAcknowledgeClaimDefendant2Page() { + const solicitorReferenceFragment = new SolicitorReferenceFragment( + this.page, + partys.DEFENDANT_2, + partys.DEFENDANT_SOLICITOR_2, + ); + return new SolicitorReferencesAcknowledgeClaimPage( + this.page, + solicitorReferenceFragment, + partys.DEFENDANT_2, + ); + } + + get submitAcknowledgeClaimPage() { + return new SubmitAcknowledgeClaimPage(this.page); + } + + get confirmAcknowledgeClaimPage() { + return new ConfirmAcknowledgeClaimPage(this.page); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-acknowledge-claim/confirm-acknowledge-claim-content.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-acknowledge-claim/confirm-acknowledge-claim-content.ts new file mode 100644 index 0000000000..030d304efc --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-acknowledge-claim/confirm-acknowledge-claim-content.ts @@ -0,0 +1 @@ +export const confirmationHeading = 'You have acknowledged the claim'; diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-acknowledge-claim/confirm-acknowledge-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-acknowledge-claim/confirm-acknowledge-claim-page.ts new file mode 100644 index 0000000000..641036fa1f --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-acknowledge-claim/confirm-acknowledge-claim-page.ts @@ -0,0 +1,27 @@ +import BasePage from '../../../../../../base/base-page.ts'; +import ExuiPage from '../../../../exui-page/exui-page.ts'; +import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; +import { confirmationHeading } from './confirm-acknowledge-claim-content.ts'; +import DateHelper from '../../../../../../helpers/date-helper.ts'; + +@AllMethodsStep() +export default class ConfirmAcknowledgeClaimPage extends ExuiPage(BasePage) { + async verifyContent(ccdCaseData: CCDCaseData) { + const responseDeadline = DateHelper.addToDate(ccdCaseData.respondent1ResponseDeadline, { + days: 14, + addDayAfter4pm: true, + workingDay: true, + }); + await super.runVerifications([ + super.verifyHeadings(ccdCaseData), + super.expectHeading(confirmationHeading), + super.expectSubheading(ccdCaseData.legacyCaseReference), + super.expectText(DateHelper.formatDateToString(responseDeadline)), + ]); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-name-and-address/confirm-name-and-address-1v2-page.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-name-and-address/confirm-name-and-address-1v2-page.ts new file mode 100644 index 0000000000..e3dd5568bb --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-name-and-address/confirm-name-and-address-1v2-page.ts @@ -0,0 +1,41 @@ +import BasePage from '../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; +import ExuiPage from '../../../../exui-page/exui-page.ts'; +import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; +import DateFragment from '../../../../fragments/date/date-fragment.ts'; +import { Page } from 'playwright-core'; +import { ClaimantDefendantPartyType } from '../../../../../../models/claimant-defendant-party-types.ts'; +import partys from '../../../../../../constants/partys.ts'; +import { inputs, heading } from './confirm-name-and-address-content.ts'; + +@AllMethodsStep() +export default class ConfirmNameAndAddress1v2Page extends ExuiPage(BasePage) { + private dateFragment: DateFragment; + + constructor(page: Page, dateFragment: DateFragment) { + super(page); + this.dateFragment = dateFragment; + } + + async verifyContent(ccdCaseData: CCDCaseData) { + super.runVerifications([ + super.expectHeading(heading), + super.expectHeading(ccdCaseData.id), + super.expectHeading(ccdCaseData.caseNamePublic), + this.dateFragment.verifyContent(), + super.expectText(inputs.dateOfBirth.label, { count: 2 }), + ]); + } + + async enterDefendant1DateOfBirth(partyType: ClaimantDefendantPartyType) { + await this.dateFragment.enterDateOfBirth(partys.DEFENDANT_1, partyType, 0); + } + + async enterDefendant2DateOfBirth(partyType: ClaimantDefendantPartyType) { + await this.dateFragment.enterDateOfBirth(partys.DEFENDANT_2, partyType, 1); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-name-and-address/confirm-name-and-address-content.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-name-and-address/confirm-name-and-address-content.ts new file mode 100644 index 0000000000..4f0d0e7f02 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-name-and-address/confirm-name-and-address-content.ts @@ -0,0 +1,7 @@ +export const heading = 'Confirm defendant details'; + +export const inputs = { + dateOfBirth: { + label: 'Date of birth (Optional)', + }, +}; diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-name-and-address/confirm-name-and-address-page.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-name-and-address/confirm-name-and-address-page.ts new file mode 100644 index 0000000000..16afcfbb07 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/confirm-name-and-address/confirm-name-and-address-page.ts @@ -0,0 +1,37 @@ +import BasePage from '../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; +import ExuiPage from '../../../../exui-page/exui-page.ts'; +import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; +import DateFragment from '../../../../fragments/date/date-fragment.ts'; +import { Page } from 'playwright-core'; +import { ClaimantDefendantPartyType } from '../../../../../../models/claimant-defendant-party-types.ts'; +import partys from '../../../../../../constants/partys.ts'; +import { inputs, heading } from './confirm-name-and-address-content.ts'; + +@AllMethodsStep() +export default class ConfirmNameAndAddressPage extends ExuiPage(BasePage) { + private dateFragment: DateFragment; + + constructor(page: Page, dateFragment: DateFragment) { + super(page); + this.dateFragment = dateFragment; + } + + async verifyContent(ccdCaseData: CCDCaseData) { + super.runVerifications([ + super.expectHeading(heading), + super.expectHeading(ccdCaseData.id), + super.expectHeading(ccdCaseData.caseNamePublic), + super.expectText(inputs.dateOfBirth.label, { index: 0 }), + ]); + } + + //Need to decide how I am going to pass partyType Data, could be pass by ccdCaseData or store a reference in test data. + async enterDefendantDateOfBirth(partyType: ClaimantDefendantPartyType) { + await this.dateFragment.enterDateOfBirth(partys.DEFENDANT_1, partyType); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-1v2SS-page.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-1v2SS-page.ts new file mode 100644 index 0000000000..1200fa84ae --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-1v2SS-page.ts @@ -0,0 +1,31 @@ +import BasePage from '../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; +import ExuiPage from '../../../../exui-page/exui-page.ts'; +import { radioButtons } from './response-intention-content.ts'; +import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; +import partys from '../../../../../../constants/partys.ts'; + +@AllMethodsStep() +export default class ResponseIntention1v2SSPage extends ExuiPage(BasePage) { + async verifyContent(ccdCaseData: CCDCaseData) { + super.runVerifications([ + super.verifyHeadings(ccdCaseData), + super.expectLabel(radioButtons.fullDefence.label, { count: 2 }), + super.expectLabel(radioButtons.partAdmit.label, { count: 2 }), + super.expectLabel(radioButtons.contestJurisdiction.label, { count: 2 }), + ]); + } + + async selectRejectAll() { + await super.clickBySelector( + radioButtons.fullDefence.selector(partys.DEFENDANT_1, partys.CLAIMANT_1), + ); + await super.clickBySelector( + radioButtons.fullDefence.selector(partys.DEFENDANT_2, partys.CLAIMANT_1), + ); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-2v1-page.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-2v1-page.ts new file mode 100644 index 0000000000..a334dd8ea7 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-2v1-page.ts @@ -0,0 +1,31 @@ +import BasePage from '../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; +import ExuiPage from '../../../../exui-page/exui-page.ts'; +import { radioButtons } from './response-intention-content.ts'; +import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; +import partys from '../../../../../../constants/partys.ts'; + +@AllMethodsStep() +export default class ResponseIntention2v1Page extends ExuiPage(BasePage) { + async verifyContent(ccdCaseData: CCDCaseData) { + super.runVerifications([ + super.verifyHeadings(ccdCaseData), + super.expectLabel(radioButtons.fullDefence.label, { count: 2 }), + super.expectLabel(radioButtons.partAdmit.label, { count: 2 }), + super.expectLabel(radioButtons.contestJurisdiction.label, { count: 2 }), + ]); + } + + async selectRejectAll() { + await super.clickBySelector( + radioButtons.fullDefence.selector(partys.DEFENDANT_1, partys.CLAIMANT_1), + ); + await super.clickBySelector( + radioButtons.fullDefence.selector(partys.DEFENDANT_1, partys.CLAIMANT_2), + ); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-content.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-content.ts new file mode 100644 index 0000000000..c1ba48c45c --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-content.ts @@ -0,0 +1,19 @@ +import { Party } from '../../../../../../models/partys'; + +export const radioButtons = { + fullDefence: { + label: 'Defend all of the claim', + selector: (defendantParty: Party, claimantParty: Party) => + `#${defendantParty.oldKey}ClaimResponseIntentionType${claimantParty.number === 2 ? 'ToApplicant2' : ''}-FULL_DEFENCE`, + }, + partAdmit: { + label: 'Defend part of the claim', + selector: (defendantParty: Party, claimantParty: Party) => + `#${defendantParty.oldKey}ClaimResponseIntentionType${claimantParty.number === 2 ? 'ToApplicant2' : ''}-PART_DEFENCE`, + }, + contestJurisdiction: { + label: 'Contest jurisdiction', + selector: (defendantParty: Party, claimantParty: Party) => + `#${defendantParty.oldKey}ClaimResponseIntentionType${claimantParty.number === 2 ? 'ToApplicant2' : ''}-CONTEST_JURISDICTION`, + }, +}; diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-page.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-page.ts new file mode 100644 index 0000000000..3b034242d5 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/response-intention/response-intention-page.ts @@ -0,0 +1,41 @@ +import BasePage from '../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; +import ExuiPage from '../../../../exui-page/exui-page.ts'; +import { radioButtons } from './response-intention-content.ts'; +import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; +import { Party } from '../../../../../../models/partys.ts'; +import { Page } from 'playwright-core'; +import partys from '../../../../../../constants/partys.ts'; +import StringHelper from '../../../../../../helpers/string-helper.ts'; + +@AllMethodsStep() +export default class ResponseIntentionPage extends ExuiPage(BasePage) { + private defendantParty: Party; + + constructor(page: Page, defendantParty: Party) { + super(page); + this.defendantParty = defendantParty; + } + + async verifyContent(ccdCaseData: CCDCaseData) { + super.runVerifications( + [ + super.verifyHeadings(ccdCaseData), + super.expectLabel(radioButtons.fullDefence.label), + super.expectLabel(radioButtons.partAdmit.label), + super.expectLabel(radioButtons.contestJurisdiction.label), + ], + { axePageInsertName: StringHelper.capitalise(this.defendantParty.key) }, + ); + } + + async selectRejectAll() { + await super.clickBySelector( + radioButtons.fullDefence.selector(this.defendantParty, partys.CLAIMANT_1), + ); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/solicitor-references-acknowledge-claim/solicitor-references-acknowledge-claim-content.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/solicitor-references-acknowledge-claim/solicitor-references-acknowledge-claim-content.ts new file mode 100644 index 0000000000..c817d61e4d --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/solicitor-references-acknowledge-claim/solicitor-references-acknowledge-claim-content.ts @@ -0,0 +1,3 @@ +export const subheadings = { + yourFileReference: 'Your File Reference', +}; diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/solicitor-references-acknowledge-claim/solicitor-references-acknowledge-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/solicitor-references-acknowledge-claim/solicitor-references-acknowledge-claim-page.ts new file mode 100644 index 0000000000..eaad1dbfa8 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/solicitor-references-acknowledge-claim/solicitor-references-acknowledge-claim-page.ts @@ -0,0 +1,43 @@ +import BasePage from '../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; +import { subheadings } from './solicitor-references-acknowledge-claim-content.ts'; +import ExuiPage from '../../../../exui-page/exui-page.ts'; +import SolicitorReferenceFragment from '../../../../fragments/solicitor-reference/solicitor-reference-fragment.ts'; +import { Page } from 'playwright-core'; +import { Party } from '../../../../../../models/partys.ts'; +import StringHelper from '../../../../../../helpers/string-helper.ts'; + +@AllMethodsStep() +export default class SolicitorReferencesAcknowledgeClaimPage extends ExuiPage(BasePage) { + private defendantParty: Party; + private defendantSolicitorReferenceFragment: SolicitorReferenceFragment; + + constructor( + page: Page, + defendantSolicitorReferenceFragment: SolicitorReferenceFragment, + defendantParty: Party, + ) { + super(page); + this.defendantParty = defendantParty; + this.defendantSolicitorReferenceFragment = defendantSolicitorReferenceFragment; + } + + async verifyContent() { + await super.runVerifications( + [ + super.verifyHeadings(), + super.expectSubheading(subheadings.yourFileReference), + this.defendantSolicitorReferenceFragment.verifyContent(), + ], + { axePageInsertName: StringHelper.capitalise(this.defendantParty.key) }, + ); + } + + async enterReference() { + await this.defendantSolicitorReferenceFragment.enterReference(); + } + + async submit() { + await super.clickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/submit-acknowledge-claim/submit-acknowledge-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/submit-acknowledge-claim/submit-acknowledge-claim-page.ts new file mode 100644 index 0000000000..ecfdbc4d5d --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/acknowledge-claim/unspec/submit-acknowledge-claim/submit-acknowledge-claim-page.ts @@ -0,0 +1,15 @@ +import BasePage from '../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; +import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; +import ExuiPage from '../../../../exui-page/exui-page.ts'; + +@AllMethodsStep() +export default class SubmitAcknowledgeClaimPage extends ExuiPage(BasePage) { + async verifyContent(ccdCaseData: CCDCaseData) { + await super.runVerifications([super.verifyHeadings(ccdCaseData)]); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/add-defendant-litigation-friend-page-factory.ts b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/add-defendant-litigation-friend-page-factory.ts new file mode 100644 index 0000000000..cd6fdb8812 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/add-defendant-litigation-friend-page-factory.ts @@ -0,0 +1,33 @@ +import BasePageFactory from '../../../../base/base-page-factory'; +import partys from '../../../../constants/partys'; +import LitigationFriendFragment from '../../fragments/litigation-friend/litigation-friend-fragment'; +import ConfirmAddDefendantLitigationFriendPage from './unspec/confirm-add-defendant-litigation-friend/confirm-add-defendant-litigation-friend-page'; +import Defendant2LitigationFriendPage from './unspec/defendant-2-litigation-friend/defendant-2-litigation-friend-page'; +import LitigationFriendPage from './unspec/litigation-friend/litigation-friend-page'; +import SubmitAddDefendantLitigationFriendPage from './unspec/submit-add-defendant-litigation-friend/submit-add-defendant-litigation-friend-page'; + +export default class AddDefendantLitigationFriendPageFactory extends BasePageFactory { + get litigationFriendPage() { + const litigationFriendFragment = new LitigationFriendFragment( + this.page, + partys.DEFENDANT_1_LITIGATION_FRIEND, + ); + return new LitigationFriendPage(this.page, litigationFriendFragment); + } + + get defendant2LitigationFriendPage() { + const litigationFriendFragment = new LitigationFriendFragment( + this.page, + partys.DEFENDANT_2_LITIGATION_FRIEND, + ); + return new Defendant2LitigationFriendPage(this.page, litigationFriendFragment); + } + + get submitAddDefendantLitigationFriend() { + return new SubmitAddDefendantLitigationFriendPage(this.page); + } + + get confirmAddDefendantLitigationFriend() { + return new ConfirmAddDefendantLitigationFriendPage(this.page); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/confirm-add-defendant-litigation-friend/confirm-add-defendant-litigation-friend-content.ts b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/confirm-add-defendant-litigation-friend/confirm-add-defendant-litigation-friend-content.ts new file mode 100644 index 0000000000..74a036fb21 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/confirm-add-defendant-litigation-friend/confirm-add-defendant-litigation-friend-content.ts @@ -0,0 +1 @@ +export const confirmationHeading = 'You have added litigation friend details'; diff --git a/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/confirm-add-defendant-litigation-friend/confirm-add-defendant-litigation-friend-page.ts b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/confirm-add-defendant-litigation-friend/confirm-add-defendant-litigation-friend-page.ts new file mode 100644 index 0000000000..a034df7dca --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/confirm-add-defendant-litigation-friend/confirm-add-defendant-litigation-friend-page.ts @@ -0,0 +1,17 @@ +import BasePage from '../../../../../../base/base-page'; +import CCDCaseData from '../../../../../../models/ccd/ccd-case-data'; +import ExuiPage from '../../../../exui-page/exui-page'; +import { confirmationHeading } from './confirm-add-defendant-litigation-friend-content'; + +export default class ConfirmAddDefendantLitigationFriendPage extends ExuiPage(BasePage) { + async verifyContent(ccdCaseData: CCDCaseData) { + await super.runVerifications([ + super.verifyHeadings(ccdCaseData), + super.expectHeading(confirmationHeading), + ]); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/defendant-2-litigation-friend/defendant-2-litigation-friend-content.ts b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/defendant-2-litigation-friend/defendant-2-litigation-friend-content.ts new file mode 100644 index 0000000000..3b2fbcde50 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/defendant-2-litigation-friend/defendant-2-litigation-friend-content.ts @@ -0,0 +1,12 @@ +import { Party } from '../../../../../../models/partys'; + +export const subheadings = { + litigationDetails: 'Defendant 2 litigation details', +}; + +export const radioButtons = { + address: { + label: + "Is the address of the Defendant's litigation friend the same as the address of the Defendant?", + }, +}; diff --git a/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/defendant-2-litigation-friend/defendant-2-litigation-friend-page.ts b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/defendant-2-litigation-friend/defendant-2-litigation-friend-page.ts new file mode 100644 index 0000000000..c1fde2fc18 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/defendant-2-litigation-friend/defendant-2-litigation-friend-page.ts @@ -0,0 +1,35 @@ +import { Page } from 'playwright-core'; +import BasePage from '../../../../../../base/base-page'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps'; +import ExuiPage from '../../../../exui-page/exui-page'; +import LitigationFriendFragment from '../../../../fragments/litigation-friend/litigation-friend-fragment'; +import { radioButtons, subheadings } from './defendant-2-litigation-friend-content'; + +@AllMethodsStep() +export default class Defendant2LitigationFriendPage extends ExuiPage(BasePage) { + private litigationFriendFragment: LitigationFriendFragment; + + constructor(page: Page, litigationFriendFragment: LitigationFriendFragment) { + super(page); + this.litigationFriendFragment = litigationFriendFragment; + } + + async verifyContent() { + await super.runVerifications([ + super.verifyHeadings(), + this.litigationFriendFragment.verifyContent(), + super.expectSubheading(subheadings.litigationDetails), + super.expectText(radioButtons.address.label), + ]); + } + + async enterLitigationFriendDetails() { + await this.litigationFriendFragment.enterLitigationFriendDetails(); + await this.litigationFriendFragment.chooseNoSameAddress(); + await this.litigationFriendFragment.uploadCertificateOfSuitability(); + } + + async submit() { + await super.clickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/litigation-friend/litigation-friend-content.ts b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/litigation-friend/litigation-friend-content.ts new file mode 100644 index 0000000000..d5b00bc46f --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/litigation-friend/litigation-friend-content.ts @@ -0,0 +1,12 @@ +import { Party } from '../../../../../../models/partys'; + +export const subheadings = { + litigationDetails: 'Defendant litigation details', +}; + +export const radioButtons = { + address: { + label: + "Is the address of the Defendant's litigation friend the same as the address of the Defendant?", + }, +}; diff --git a/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/litigation-friend/litigation-friend-page.ts b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/litigation-friend/litigation-friend-page.ts new file mode 100644 index 0000000000..fc4e5add48 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/litigation-friend/litigation-friend-page.ts @@ -0,0 +1,35 @@ +import { Page } from 'playwright-core'; +import BasePage from '../../../../../../base/base-page'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps'; +import ExuiPage from '../../../../exui-page/exui-page'; +import LitigationFriendFragment from '../../../../fragments/litigation-friend/litigation-friend-fragment'; +import { radioButtons, subheadings } from './litigation-friend-content'; + +@AllMethodsStep() +export default class LitigationFriendPage extends ExuiPage(BasePage) { + private litigationFriendFragment: LitigationFriendFragment; + + constructor(page: Page, litigationFriendFragment: LitigationFriendFragment) { + super(page); + this.litigationFriendFragment = litigationFriendFragment; + } + + async verifyContent() { + await super.runVerifications([ + super.verifyHeadings(), + super.expectSubheading(subheadings.litigationDetails), + this.litigationFriendFragment.verifyContent(), + super.expectText(radioButtons.address.label), + ]); + } + + async enterLitigationFriendDetails() { + await this.litigationFriendFragment.enterLitigationFriendDetails(); + await this.litigationFriendFragment.chooseNoSameAddress(); + await this.litigationFriendFragment.uploadCertificateOfSuitability(); + } + + async submit() { + await super.clickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/submit-add-defendant-litigation-friend/submit-add-defendant-litigation-friend-page.ts b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/submit-add-defendant-litigation-friend/submit-add-defendant-litigation-friend-page.ts new file mode 100644 index 0000000000..44c1c3e981 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/add-defendant-litigation-friend/unspec/submit-add-defendant-litigation-friend/submit-add-defendant-litigation-friend-page.ts @@ -0,0 +1,15 @@ +import ExuiPage from '../../../../exui-page/exui-page.ts'; +import BasePage from '../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; +import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; + +@AllMethodsStep() +export default class SubmitAddDefendantLitigationFriendPage extends ExuiPage(BasePage) { + async verifyContent(ccdCaseData: CCDCaseData) { + await super.runVerifications([super.verifyHeadings(ccdCaseData)]); + } + + async submit() { + await super.clickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/add-another-claimant/add-another-claimant-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/add-another-claimant/add-another-claimant-page.ts index 231451ebd4..8e0ff30115 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/add-another-claimant/add-another-claimant-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/add-another-claimant/add-another-claimant-page.ts @@ -21,6 +21,6 @@ export default class AddAnotherClaimantPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/add-another-defendant/add-another-defendant-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/add-another-defendant/add-another-defendant-page.ts index e2c47da79a..bb57296ddb 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/add-another-defendant/add-another-defendant-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/add-another-defendant/add-another-defendant-page.ts @@ -18,6 +18,6 @@ export default class AddAnotherDefendantPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/case-filter/case-filter-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/case-filter/case-filter-content.ts index fa21585656..48288a4e14 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/case-filter/case-filter-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/case-filter/case-filter-content.ts @@ -9,7 +9,7 @@ export const dropdowns = { }, }, caseType: { - label: 'Case Type', + label: 'Case type', selector: '#cc-case-type', options: { civil: 'Civil', diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/case-filter/case-filter-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/case-filter/case-filter-page.ts index ca4bfee250..b63998e121 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/case-filter/case-filter-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/case-filter/case-filter-page.ts @@ -1,6 +1,7 @@ import BasePage from '../../../../../../base/base-page'; import ccdEvents from '../../../../../../constants/ccd-events'; import { AllMethodsStep } from '../../../../../../decorators/test-steps'; +import { buttons } from '../../../../exui-page/exui-content'; import ExuiPage from '../../../../exui-page/exui-page'; import { dropdowns } from './case-filter-content'; @@ -33,6 +34,14 @@ export default class CaseFilterPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickBySelector( + buttons.submit.selector, + () => + super.expectNoTab(dropdowns.jurisdiction.label, { + timeout: 5_000, + exact: true, + }), + { retries: 3 }, + ); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/claimant-solicitor-organisation/claimant-solicitor-organisation-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/claimant-solicitor-organisation/claimant-solicitor-organisation-page.ts index 9824e95274..c0ab30b902 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/claimant-solicitor-organisation/claimant-solicitor-organisation-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/claimant-solicitor-organisation/claimant-solicitor-organisation-page.ts @@ -24,10 +24,9 @@ export default class ClaimantSolicitorOrganisationPage extends ExuiPage(BasePage async selectOrganisation() { await this.organisationFragment.enterReference(); - await this.organisationFragment.searchForOrganisation('Civil - Organisation 1'); } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/claimant/claimant-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/claimant/claimant-page.ts index 357c4394c7..d291f55cf4 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/claimant/claimant-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/claimant/claimant-page.ts @@ -68,6 +68,6 @@ export default class ClaimantPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/defendant/defendant-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/defendant/defendant-page.ts index f139d7532a..c1917e9271 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/defendant/defendant-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/defendant/defendant-page.ts @@ -71,6 +71,6 @@ export default class DefendantPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/notifications/notifcations-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/notifications/notifcations-page.ts index dd9cee45f7..9c0740e822 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/notifications/notifcations-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/notifications/notifcations-page.ts @@ -27,6 +27,6 @@ export default class NotificationsPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/pba-number/pba-number-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/pba-number/pba-number-page.ts index 4fe202ee30..e0debea4e4 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/pba-number/pba-number-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/pba-number/pba-number-page.ts @@ -13,6 +13,6 @@ export default class PbaNumberPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/references/references-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/references/references-page.ts index 4cee6e4211..d9a5911ad1 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/references/references-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/references/references-page.ts @@ -24,7 +24,7 @@ export default class ReferencesPage extends ExuiPage(BasePage) { await super.runVerifications([ super.verifyHeadings(), super.expectSubheading(subheadings.yourFileReference), - this.claimantSolicitorReferenceFragment.verifyContent(), + // this.claimantSolicitorReferenceFragment.verifyContent(), this.defendantSolicitorReferenceFragment.verifyContent(), ]); } @@ -35,6 +35,6 @@ export default class ReferencesPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/same-legal-representative/same-legal-representative-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/same-legal-representative/same-legal-representative-page.ts index fe0e50c15a..a7ad4fd32f 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/same-legal-representative/same-legal-representative-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/same-legal-representative/same-legal-representative-page.ts @@ -16,11 +16,11 @@ export default class SameLegalRepresentativePage extends ExuiPage(BasePage) { await super.clickBySelector(radioButtons.sameSolicitor.yes.selector); } - async clickNo() { + async selectNo() { await super.clickBySelector(radioButtons.sameSolicitor.no.selector); } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-claimant/second-claimant-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-claimant/second-claimant-content.ts index 34043c94ba..dff424792b 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-claimant/second-claimant-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-claimant/second-claimant-content.ts @@ -1,4 +1,4 @@ export const subheadings = { - claimantDetails: "Claimant's details", + claimantDetails: "Second claimant's details", address: 'Address', }; diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-claimant/second-claimant-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-claimant/second-claimant-page.ts index c014608a02..96ec902989 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-claimant/second-claimant-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-claimant/second-claimant-page.ts @@ -22,12 +22,12 @@ export default class SecondClaimantPage extends ExuiPage(BasePage) { constructor(page: Page) { super(page); - this.choosePartyTypeFragment = new ChoosePartyTypeFragment(page, partys.CLAIMANT_1); - this.partyTypeIndividualFragment = new PartyTypeIndividualFragment(page, partys.CLAIMANT_1); - this.partyTypeCompanyFragment = new PartyTypeCompanyFragment(page, partys.CLAIMANT_1); - this.partyTypeOrganisationFragment = new PartyTypeOrganisationFragment(page, partys.CLAIMANT_1); - this.partyTypeSoleTraderFragment = new PartyTypeSoleTraderFragment(page, partys.CLAIMANT_1); - this.addressFragment = new AddressFragment(page, partys.CLAIMANT_1); + this.choosePartyTypeFragment = new ChoosePartyTypeFragment(page, partys.CLAIMANT_2); + this.partyTypeIndividualFragment = new PartyTypeIndividualFragment(page, partys.CLAIMANT_2); + this.partyTypeCompanyFragment = new PartyTypeCompanyFragment(page, partys.CLAIMANT_2); + this.partyTypeOrganisationFragment = new PartyTypeOrganisationFragment(page, partys.CLAIMANT_2); + this.partyTypeSoleTraderFragment = new PartyTypeSoleTraderFragment(page, partys.CLAIMANT_2); + this.addressFragment = new AddressFragment(page, partys.CLAIMANT_2); } async verifyContent() { @@ -68,6 +68,6 @@ export default class SecondClaimantPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-defendant/second-defendant-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-defendant/second-defendant-page.ts index ccd2183409..f5880d7404 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-defendant/second-defendant-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/second-defendant/second-defendant-page.ts @@ -22,12 +22,15 @@ export default class SecondDefendantPage extends ExuiPage(BasePage) { constructor(page: Page) { super(page); - this.choosePartyTypeFragment = new ChoosePartyTypeFragment(page, partys.CLAIMANT_1); - this.partyTypeIndividualFragment = new PartyTypeIndividualFragment(page, partys.CLAIMANT_1); - this.partyTypeCompanyFragment = new PartyTypeCompanyFragment(page, partys.CLAIMANT_1); - this.partyTypeOrganisationFragment = new PartyTypeOrganisationFragment(page, partys.CLAIMANT_1); - this.partyTypeSoleTraderFragment = new PartyTypeSoleTraderFragment(page, partys.CLAIMANT_1); - this.addressFragment = new AddressFragment(page, partys.CLAIMANT_1); + this.choosePartyTypeFragment = new ChoosePartyTypeFragment(page, partys.DEFENDANT_2); + this.partyTypeIndividualFragment = new PartyTypeIndividualFragment(page, partys.DEFENDANT_2); + this.partyTypeCompanyFragment = new PartyTypeCompanyFragment(page, partys.DEFENDANT_2); + this.partyTypeOrganisationFragment = new PartyTypeOrganisationFragment( + page, + partys.DEFENDANT_2, + ); + this.partyTypeSoleTraderFragment = new PartyTypeSoleTraderFragment(page, partys.DEFENDANT_2); + this.addressFragment = new AddressFragment(page, partys.DEFENDANT_2); } async verifyContent() { @@ -68,6 +71,6 @@ export default class SecondDefendantPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/statement-of-truth-create-claim/statement-of-truth-create-claim-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/statement-of-truth-create-claim/statement-of-truth-create-claim-content.ts index 5bae5b34e7..ea92bc2570 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/statement-of-truth-create-claim/statement-of-truth-create-claim-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/statement-of-truth-create-claim/statement-of-truth-create-claim-content.ts @@ -1,9 +1 @@ -export const paragraphs = { - descriptiveText1: - 'The claimant(s) believes that the facts stated in the brief details of claim are true.', - descriptiveText2: 'I am duly authorised by the claimant(s) to sign this statement.', - descriptiveText3: - 'The claimant(s) understands that proceedings for contempt of court may be brought against anyone who makes, or causes to be made, a false statement in a document verified by a statement of truth without an honest belief in its truth.', - descriptiveText4: - 'In order to verify the claim by a statement of truth please click "submit" on the next screen. Doing so will be taken as verifying the claim by the above statement of truth. Alternatively, you will have the opportunity, on the next screen, to change any of the answers before clicking the "submit" button.', -}; +export const heading = 'Statement of truth'; diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/statement-of-truth-create-claim/statement-of-truth-create-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/statement-of-truth-create-claim/statement-of-truth-create-claim-page.ts index fb2a13291e..928b8780a4 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/statement-of-truth-create-claim/statement-of-truth-create-claim-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/statement-of-truth-create-claim/statement-of-truth-create-claim-page.ts @@ -3,7 +3,7 @@ import BasePage from '../../../../../../base/base-page.ts'; import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; import ExuiPage from '../../../../exui-page/exui-page.ts'; import StatementOfTruthFragment from '../../../../fragments/statement-of-truth/statement-of-truth-fragment.ts'; -import { paragraphs } from './statement-of-truth-create-claim-content.ts'; +import { heading } from './statement-of-truth-create-claim-content.ts'; @AllMethodsStep() export default class StatementOfTruthCreateClaimPage extends ExuiPage(BasePage) { @@ -15,13 +15,7 @@ export default class StatementOfTruthCreateClaimPage extends ExuiPage(BasePage) } async verifyContent() { - await super.runVerifications([ - super.expectText(paragraphs.descriptiveText1), - super.expectText(paragraphs.descriptiveText2), - super.expectText(paragraphs.descriptiveText3), - super.expectText(paragraphs.descriptiveText4), - this.statementOfTruthFragment.verifyContent(), - ]); + await super.runVerifications([super.expectHeading(heading)]); } async enterDetails() { @@ -29,6 +23,6 @@ export default class StatementOfTruthCreateClaimPage extends ExuiPage(BasePage) } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/submit-create-claim/submit-create-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/submit-create-claim/submit-create-claim-page.ts index 0def48b89b..49934f3c51 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/common/submit-create-claim/submit-create-claim-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/common/submit-create-claim/submit-create-claim-page.ts @@ -5,8 +5,8 @@ import ExuiPage from '../../../../exui-page/exui-page.ts'; @AllMethodsStep() export default class SubmitCreateClaimPage extends ExuiPage(BasePage) { - async verifyContent(ccdCaseData: CCDCaseData) { - await super.runVerifications([super.verifyHeadings(ccdCaseData)]); + async verifyContent() { + await super.runVerifications([super.verifyHeadings()]); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/create-claim-page-factory.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/create-claim-page-factory.ts index fc92eb15e5..9d66dd4e71 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/create-claim-page-factory.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/create-claim-page-factory.ts @@ -20,7 +20,7 @@ import DefendantPage from './common/defendant/defendant-page.ts'; import OrganisationFragment from '../../fragments/organisation/organisation-fragment.ts'; import LegalRepresentationSpecPage from './lr-spec/legal-representation-spec/legal-representation-spec-page.ts'; import LegalRepresentationPage from './unspec/legal-representation/legal-representation-page.ts'; -import DefendantSolicitorOrganisationPage from './unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-spec-page.ts'; +import DefendantSolicitorOrganisationPage from './unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-page.ts'; import DefendantSolicitorOrganisationSpecPage from './lr-spec/defendant-solicitor-organisation-spec/defendant-solicitor-organisation-spec-page.ts'; import OrganisationRegisteredFragment from '../../fragments/organisation-registered/organisation-registered-fragment.ts'; import DefendantSolicitorServiceAddressPage from './unspec/defendant-solicitor-service-address/defendant-solicitor-service-address-page.ts'; @@ -59,6 +59,12 @@ import StatementOfTruthFragment from '../../fragments/statement-of-truth/stateme import SubmitCreateClaimPage from './common/submit-create-claim/submit-create-claim-page.ts'; import ConfirmCreateClaimSpecPage from './lr-spec/confirm-create-claim-spec/confirm-create-claim-spec-page.ts'; import ConfirmCreateClaimPage from './unspec/confirm-create-claim/confirm-create-claim-page.ts'; +import RemoteHearingFragment from '../../fragments/remote-hearing/remote-hearing-fragment.ts'; +import AddAnotherDefendantPage from './common/add-another-defendant/add-another-defendant-page.ts'; +import UploadParticularsOfClaimPage from './unspec/upload-particulars-of-claim/upload-particulars-of-claim-page.ts'; +import SecondClaimantLitigationFriendPage from './unspec/second-claimant-litigation-friend/second-claimant-litigation-friend-page.ts'; +import SecondDefendantSolicitorOrganisationPage from './unspec/second-defendant-solicitor-organisation/second-defendant-solicitor-organisation-page.ts'; +import LitigationFriendFragment from '../../fragments/litigation-friend/litigation-friend-fragment.ts'; export default class CreateClaimPageFactory extends BasePageFactory { get caseFilterPage() { @@ -96,7 +102,8 @@ export default class CreateClaimPageFactory extends BasePageFactory { } get courtPage() { - return new CourtPage(this.page); + const remoteHearingFragment = new RemoteHearingFragment(this.page, partys.CLAIMANT_1); + return new CourtPage(this.page, remoteHearingFragment); } get notificationsPage() { @@ -115,8 +122,16 @@ export default class CreateClaimPageFactory extends BasePageFactory { return new SecondClaimantPage(this.page); } + get secondClaimantLitigationFriendPage() { + return new SecondClaimantLitigationFriendPage(this.page); + } + get claimantLitigationFriendPage() { - return new ClaimantLitigationFriendPage(this.page); + const litigationFriendFragment = new LitigationFriendFragment( + this.page, + partys.CLAIMANT_1_LITIGATION_FRIEND, + ); + return new ClaimantLitigationFriendPage(this.page, litigationFriendFragment); } get claimantSolicitorOrganisationPage() { @@ -153,12 +168,12 @@ export default class CreateClaimPageFactory extends BasePageFactory { return new LegalRepresentationSpecPage(this.page); } - get defendantSolicitorOrganisation() { + get defendantSolicitorOrganisationPage() { const organisationFragment = new OrganisationFragment(this.page, partys.DEFENDANT_1); return new DefendantSolicitorOrganisationPage(this.page, organisationFragment); } - get defendantSolicitorOrganisationSpec() { + get defendantSolicitorOrganisationSpecPage() { const organisationRegisteredFragment = new OrganisationRegisteredFragment( this.page, partys.DEFENDANT_1, @@ -180,7 +195,7 @@ export default class CreateClaimPageFactory extends BasePageFactory { return new DefendantSolicitorServiceAddressPage(this.page, serviceAddressFragment); } - get specRespondentCorrespondenceAddress() { + get specRespondentCorrespondenceAddressPage() { const correspondenceAddressFragment = new CorrespondenceAddressFragment( this.page, partys.DEFENDANT_SOLICITOR_1, @@ -188,14 +203,18 @@ export default class CreateClaimPageFactory extends BasePageFactory { return new SpecRespondentCorrespondenceAddressPage(this.page, correspondenceAddressFragment); } - get defendantSolicitorEmail() { + get defendantSolicitorEmailPage() { return new DefendantSolicitorEmailPage(this.page); } - get defendantSolicitorEmailSpec() { + get defendantSolicitorEmailSpecPage() { return new DefendantSolicitorEmailSpecPage(this.page); } + get addAnotherDefendantPage() { + return new AddAnotherDefendantPage(this.page); + } + get secondDefendantPage() { return new SecondDefendantPage(this.page); } @@ -212,12 +231,12 @@ export default class CreateClaimPageFactory extends BasePageFactory { return new SameLegalRepresentativePage(this.page); } - get secondDefendantSolicitorOrganisation() { + get secondDefendantSolicitorOrganisationPage() { const organisationFragment = new OrganisationFragment(this.page, partys.DEFENDANT_2); - return new DefendantSolicitorOrganisationPage(this.page, organisationFragment); + return new SecondDefendantSolicitorOrganisationPage(this.page, organisationFragment); } - get secondDefendantSolicitorOrganisationSpec() { + get secondDefendantSolicitorOrganisationSpecPage() { const organisationRegisteredFragment = new OrganisationRegisteredFragment( this.page, partys.DEFENDANT_2, @@ -230,7 +249,7 @@ export default class CreateClaimPageFactory extends BasePageFactory { ); } - get secondDefendantSolicitorServiceAddress() { + get secondDefendantSolicitorServiceAddressPage() { const serviceAddressFragment = new ServiceAddressFragment( this.page, partys.DEFENDANT_2, @@ -239,7 +258,7 @@ export default class CreateClaimPageFactory extends BasePageFactory { return new SecondDefendantSolicitorServiceAddressPage(this.page, serviceAddressFragment); } - get specRespondent2CorrespondenceAddress() { + get specRespondent2CorrespondenceAddressPage() { const correspondenceAddressFragment = new CorrespondenceAddressFragment( this.page, partys.DEFENDANT_SOLICITOR_1, @@ -259,11 +278,11 @@ export default class CreateClaimPageFactory extends BasePageFactory { ); } - get secondDefendantSolicitorEmail() { + get secondDefendantSolicitorEmailPage() { return new SecondDefendantSolicitorEmailPage(this.page); } - get secondDefendantSolicitorEmailSpec() { + get secondDefendantSolicitorEmailSpecPage() { return new SecondDefendantSolicitorEmailSpecPage(this.page); } @@ -287,6 +306,10 @@ export default class CreateClaimPageFactory extends BasePageFactory { return new DetailsSpecPage(this.page); } + get uploadParticularsOfClaimPage() { + return new UploadParticularsOfClaimPage(this.page); + } + get uploadCreateClaimPage() { const particularsOfClaimFragment = new ParticularsOfClaimFragment(this.page); return new UploadCreateClaimPage(this.page, particularsOfClaimFragment); diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/check-list/checklist-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/check-list/checklist-page.ts index 7c2dad5acf..bb393c2020 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/check-list/checklist-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/check-list/checklist-page.ts @@ -15,6 +15,6 @@ export default class ChecklistPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-amount-details/claim-amount-details-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-amount-details/claim-amount-details-page.ts index ac3559e6e7..29c34f6555 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-amount-details/claim-amount-details-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-amount-details/claim-amount-details-page.ts @@ -25,6 +25,6 @@ export default class ClaimAmountDetailsPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-amount/claim-amount-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-amount/claim-amount-page.ts index a5ff6faa42..095292a337 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-amount/claim-amount-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-amount/claim-amount-page.ts @@ -38,6 +38,6 @@ export default class ClaimAmountPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-interest/claim-interest-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-interest/claim-interest-page.ts index 8b3e5be88b..3070dcd0b5 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-interest/claim-interest-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-interest/claim-interest-page.ts @@ -21,6 +21,6 @@ export default class ClaimInterestPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-timeline-upload/claim-timeline-upload-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-timeline-upload/claim-timeline-upload-page.ts index ef17875196..17c3f6b112 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-timeline-upload/claim-timeline-upload-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-timeline-upload/claim-timeline-upload-page.ts @@ -19,6 +19,6 @@ export default class ClaimTimelineUploadPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-timeline/claim-timeline-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-timeline/claim-timeline-page.ts index bd45edb09f..60e66b0359 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-timeline/claim-timeline-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/claim-timeline/claim-timeline-page.ts @@ -38,6 +38,6 @@ export default class ClaimTimelinePage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/correspondence-address-defendant-legal-representative-spec/correspondence-address-defendant-legal-representative-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/correspondence-address-defendant-legal-representative-spec/correspondence-address-defendant-legal-representative-content.ts deleted file mode 100644 index 35f7fc4ab5..0000000000 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/correspondence-address-defendant-legal-representative-spec/correspondence-address-defendant-legal-representative-content.ts +++ /dev/null @@ -1,19 +0,0 @@ -export const heading = { - postalAddressForClaimantSolicitor: "Postal address for claimant's legal representative", -}; - -export const paragraphs = { - postalCorrespondenceInfo: - 'Postal correspondence will be sent to the address registered with MyHMCTS.' + - ' You can change this address if, for example, you work in a different office from the address registered with MyHMCTS.', -}; - -export const labels = { - enterDifferentAddress: 'Do you want to enter a different address?', -}; - -export const formFields = { - specApplicantCorrespondenceAddressRequired_Yes: - '#specRespondentCorrespondenceAddressRequired_Yes', - specApplicantCorrespondenceAddressRequired_No: '#specRespondentCorrespondenceAddressRequired_No', -}; diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/correspondence-address-defendant-legal-representative-spec/correspondence-address-defendant-legal-representative-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/correspondence-address-defendant-legal-representative-spec/correspondence-address-defendant-legal-representative-spec-page.ts deleted file mode 100644 index 72da2770c8..0000000000 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/correspondence-address-defendant-legal-representative-spec/correspondence-address-defendant-legal-representative-spec-page.ts +++ /dev/null @@ -1,34 +0,0 @@ -import BasePage from '../../../../../../base/base-page'; -import { AllMethodsStep } from '../../../../../../decorators/test-steps'; -import ExuiPage from '../../../../exui-page/exui-page'; -import { - formFields, - labels, - paragraphs, -} from './correspondence-address-defendant-legal-representative-content.ts'; - -@AllMethodsStep() -export default class CorrespondenceAddressDefendantLegalRepresentativeSpecPage extends ExuiPage( - BasePage, -) { - async verifyContent() { - await super.runVerifications([ - super.expectText(paragraphs.postalCorrespondenceInfo), - super.expectText(labels.enterDifferentAddress), - super.expectSelector(formFields.specApplicantCorrespondenceAddressRequired_Yes), - super.expectSelector(formFields.specApplicantCorrespondenceAddressRequired_No), - ]); - } - - async clickYesForDifferentAddress() { - await super.clickBySelector(formFields.specApplicantCorrespondenceAddressRequired_Yes); - } - - async clickNoForDifferentAddress() { - await super.clickBySelector(formFields.specApplicantCorrespondenceAddressRequired_No); - } - - async submit() { - await super.clickSubmit(); - } -} diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-same-legal-representative-spec/defendant-same-legal-representative-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-same-legal-representative-spec/defendant-same-legal-representative-page.ts index d80f1b593c..3f67a62823 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-same-legal-representative-spec/defendant-same-legal-representative-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-same-legal-representative-spec/defendant-same-legal-representative-page.ts @@ -23,6 +23,6 @@ export default class DefendantSameLegalRepresentativePage extends ExuiPage(BaseP } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-solicitor-email-spec/defendant-solicitor-email-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-solicitor-email-spec/defendant-solicitor-email-spec-page.ts index 39ccd303c0..c3163926b4 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-solicitor-email-spec/defendant-solicitor-email-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-solicitor-email-spec/defendant-solicitor-email-spec-page.ts @@ -21,6 +21,6 @@ export default class DefendantSolicitorEmailSpecPage extends ExuiPage(BasePage) } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-solicitor-organisation-spec/defendant-solicitor-organisation-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-solicitor-organisation-spec/defendant-solicitor-organisation-spec-page.ts index 2290d83506..5d0b5a44bd 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-solicitor-organisation-spec/defendant-solicitor-organisation-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/defendant-solicitor-organisation-spec/defendant-solicitor-organisation-spec-page.ts @@ -37,6 +37,6 @@ export default class DefendantSolicitorOrganisationSpecPage extends ExuiPage(Bas } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/details-spec/details-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/details-spec/details-spec-page.ts index 3bddbf2c9b..a4f5d0953a 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/details-spec/details-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/details-spec/details-spec-page.ts @@ -23,6 +23,6 @@ export default class DetailsSpecPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/eligibilty-spec/eligibility-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/eligibilty-spec/eligibility-spec-page.ts index adc8197e80..38b6d5524b 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/eligibilty-spec/eligibility-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/eligibilty-spec/eligibility-spec-page.ts @@ -25,6 +25,6 @@ export default class EligibilitySpecPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/flight-delay-claim/flight-delay-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/flight-delay-claim/flight-delay-claim-page.ts index 3d5228d886..4e5569fe9f 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/flight-delay-claim/flight-delay-claim-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/flight-delay-claim/flight-delay-claim-page.ts @@ -18,6 +18,6 @@ export default class FlightDelayClaimPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/interest-summary/interest-summary-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/interest-summary/interest-summary-page.ts index ff0782be11..bf6fb9797d 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/interest-summary/interest-summary-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/interest-summary/interest-summary-page.ts @@ -26,6 +26,6 @@ export default class InterestSummaryPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/legal-representation-respondent-2/legal-representation-respondent-2-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/legal-representation-respondent-2/legal-representation-respondent-2-page.ts index fde28765f3..413c84b614 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/legal-representation-respondent-2/legal-representation-respondent-2-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/legal-representation-respondent-2/legal-representation-respondent-2-page.ts @@ -21,6 +21,6 @@ export default class LegalRepresentationRespondent2Page extends ExuiPage(BasePag } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/legal-representation-spec/legal-representation-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/legal-representation-spec/legal-representation-spec-page.ts index 0f5db2af87..7bd01d6492 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/legal-representation-spec/legal-representation-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/legal-representation-spec/legal-representation-spec-page.ts @@ -21,6 +21,6 @@ export default class LegalRepresentationSpecPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/respondent-2-correspondence-address-spec/respondent-2-correspondence-address-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/respondent-2-correspondence-address-spec/respondent-2-correspondence-address-page.ts index 162bc34785..4725e593be 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/respondent-2-correspondence-address-spec/respondent-2-correspondence-address-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/respondent-2-correspondence-address-spec/respondent-2-correspondence-address-page.ts @@ -31,6 +31,6 @@ export default class SpecRespondent2CorrespondenceAddressPage extends ExuiPage(B } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/second-defendant-solicitor-email-spec/second-defendant-solicitor-email-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/second-defendant-solicitor-email-spec/second-defendant-solicitor-email-spec-page.ts index afecc5fd0a..b81e9ef0f4 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/second-defendant-solicitor-email-spec/second-defendant-solicitor-email-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/second-defendant-solicitor-email-spec/second-defendant-solicitor-email-spec-page.ts @@ -25,6 +25,6 @@ export default class SecondDefendantSolicitorEmailSpecPage extends ExuiPage(Base } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/second-defendant-solicitor-organisation-spec/second-defendant-solicitor-organisation-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/second-defendant-solicitor-organisation-spec/second-defendant-solicitor-organisation-spec-page.ts index b7732bcc00..ad7ba3a952 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/second-defendant-solicitor-organisation-spec/second-defendant-solicitor-organisation-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/second-defendant-solicitor-organisation-spec/second-defendant-solicitor-organisation-spec-page.ts @@ -37,6 +37,6 @@ export default class SecondDefendantSolicitorOrganisationSpecPage extends ExuiPa } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/spec-correspondence-address/spec-correspondence-address-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/spec-correspondence-address/spec-correspondence-address-page.ts index 553cac4831..34a1378693 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/spec-correspondence-address/spec-correspondence-address-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/spec-correspondence-address/spec-correspondence-address-page.ts @@ -31,6 +31,6 @@ export default class SpecCorrespondenceAddressPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/spec-respondent-correspondence-address/spec-respondent-correspondence-address-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/spec-respondent-correspondence-address/spec-respondent-correspondence-address-page.ts index bfc33c3001..22fff9e29d 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/spec-respondent-correspondence-address/spec-respondent-correspondence-address-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/spec-respondent-correspondence-address/spec-respondent-correspondence-address-page.ts @@ -31,6 +31,6 @@ export default class SpecRespondentCorrespondenceAddressPage extends ExuiPage(Ba } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/upload-claim-document/upload-claim-document-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/upload-claim-document/upload-claim-document-page.ts index 86a4649ed0..cdecf8f591 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/upload-claim-document/upload-claim-document-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/lr-spec/upload-claim-document/upload-claim-document-page.ts @@ -22,6 +22,6 @@ export default class UploadClaimDocumentPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claim-type/claim-type-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claim-type/claim-type-page.ts index 845aee2157..0049b0278a 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claim-type/claim-type-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claim-type/claim-type-page.ts @@ -24,6 +24,6 @@ export default class ClaimTypePage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claim-value/claim-value-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claim-value/claim-value-page.ts index 8642a3a9b4..f80854d3da 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claim-value/claim-value-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claim-value/claim-value-page.ts @@ -1,5 +1,4 @@ import BasePage from '../../../../../../base/base-page'; -import partys from '../../../../../../constants/partys'; import { AllMethodsStep } from '../../../../../../decorators/test-steps'; import ClaimTrack from '../../../../../../enums/claim-track'; import CaseDataHelper from '../../../../../../helpers/case-data-helper'; @@ -19,17 +18,15 @@ export default class ClaimValuePage extends ExuiPage(BasePage) { async enterClaimDetailsSmallTrack() { const claimAmount = CaseDataHelper.getClaimValue(ClaimTrack.SMALL_CLAIM); - await super.inputText(`Roof damage - ${partys.CLAIMANT_1.key}`, inputs.amount.selector); await super.inputText(claimAmount, inputs.amount.selector); } async enterClaimDetailsFastTrack() { const claimAmount = CaseDataHelper.getClaimValue(ClaimTrack.FAST_CLAIM); - await super.inputText(`Roof damage - ${partys.CLAIMANT_1.key}`, inputs.amount.selector); await super.inputText(claimAmount, inputs.amount.selector); } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claimant-litigation-friend/claimant-litigation-friend-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claimant-litigation-friend/claimant-litigation-friend-page.ts index 09ea6caa89..abdf61bdf4 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claimant-litigation-friend/claimant-litigation-friend-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claimant-litigation-friend/claimant-litigation-friend-page.ts @@ -10,18 +10,15 @@ import partys from '../../../../../../constants/partys'; export default class ClaimantLitigationFriendPage extends ExuiPage(BasePage) { private litigationFriendFragment: LitigationFriendFragment; - constructor(page: Page) { + constructor(page: Page, litigationFriendFragment: LitigationFriendFragment) { super(page); - this.litigationFriendFragment = new LitigationFriendFragment( - page, - partys.CLAIMANT_1_LITIGATION_FRIEND, - ); + this.litigationFriendFragment = litigationFriendFragment; } async verifyContent() { await super.runVerifications([ super.verifyHeadings(), - super.expectLabel(radioButtons.litigationFriendRequired.label), + super.expectText(radioButtons.litigationFriendRequired.label), ]); } @@ -40,6 +37,6 @@ export default class ClaimantLitigationFriendPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claimant-solicitor-service-address/claimant-solicitor-service-address-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claimant-solicitor-service-address/claimant-solicitor-service-address-page.ts index d1ba225584..90bb3ddf5c 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claimant-solicitor-service-address/claimant-solicitor-service-address-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/claimant-solicitor-service-address/claimant-solicitor-service-address-page.ts @@ -22,15 +22,15 @@ export default class ClaimantSolicitorServiceAddressPage extends ExuiPage(BasePa } async selectYesAndEnterAddress() { - this.serviceAddressFragment.selectYes(); - this.serviceAddressFragment.enterAddressManual(); + await this.serviceAddressFragment.selectYes(); + await this.serviceAddressFragment.enterAddressManual(); } async selectNo() { - this.serviceAddressFragment.selectNo(); + await this.serviceAddressFragment.selectNo(); } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/confirm-create-claim/confirm-create-claim-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/confirm-create-claim/confirm-create-claim-content.ts index ad88c7d583..8b4189a778 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/confirm-create-claim/confirm-create-claim-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/confirm-create-claim/confirm-create-claim-content.ts @@ -1,7 +1,10 @@ -export const confirmationHeading = 'Please now pay your claim fee using the link below'; +export const confirmationHeading = { + part1: 'Please now pay your claim fee', + part2: 'using the link below', +}; export const paragraphs = { descriptionText: 'Your claim will not be issued until payment is confirmed. Once payment is confirmed you will receive an email.' + - 'The email will also include the date when you need to notify the Defendant legal representative of the claim.', + ' The email will also include the date when you need to notify the Defendant legal representative of the claim.', }; diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/confirm-create-claim/confirm-create-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/confirm-create-claim/confirm-create-claim-page.ts index 160e73f399..f1f763f879 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/confirm-create-claim/confirm-create-claim-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/confirm-create-claim/confirm-create-claim-page.ts @@ -1,15 +1,14 @@ import BasePage from '../../../../../../base/base-page.ts'; import ExuiPage from '../../../../exui-page/exui-page.ts'; -import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; import { confirmationHeading, paragraphs } from './confirm-create-claim-content.ts'; @AllMethodsStep() export default class ConfirmCreateClaimPage extends ExuiPage(BasePage) { - async verifyContent(ccdCaseData: CCDCaseData) { + async verifyContent() { await super.runVerifications([ - super.verifyHeadings(ccdCaseData), - super.expectHeading(confirmationHeading), + super.expectHeading(confirmationHeading.part1), + super.expectHeading(confirmationHeading.part2), super.expectText(paragraphs.descriptionText), ]); } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/court/court-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/court/court-page.ts index 6cada77e17..585cbc260b 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/court/court-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/court/court-page.ts @@ -1,3 +1,4 @@ +import { Page } from 'playwright-core'; import BasePage from '../../../../../../base/base-page'; import { AllMethodsStep } from '../../../../../../decorators/test-steps'; import ExuiPage from '../../../../exui-page/exui-page'; @@ -8,12 +9,18 @@ import { dropdowns, subheadings, inputs } from './court-content'; export default class CourtPage extends ExuiPage(BasePage) { private remoteHearingFragment: RemoteHearingFragment; + constructor(page: Page, remoteHearingFragment: RemoteHearingFragment) { + super(page); + this.remoteHearingFragment = remoteHearingFragment; + } + async verifyContent() { await super.runVerifications([ super.verifyHeadings(), super.expectSubheading(subheadings.courtLocationCode), super.expectLabel(dropdowns.courtLocation.label), - super.expectLabel(inputs.courtReason.label), + super.expectLabel(inputs.courtReason.label, { index: 0 }), + this.remoteHearingFragment.verifyContent(), ]); } @@ -29,7 +36,11 @@ export default class CourtPage extends ExuiPage(BasePage) { await this.remoteHearingFragment.selectNo(); } + async selectYesForRemoteHearing() { + await this.remoteHearingFragment.selectYes(); + } + async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-email/defendant-solicitor-email-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-email/defendant-solicitor-email-page.ts index d926eb6188..4d768064bf 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-email/defendant-solicitor-email-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-email/defendant-solicitor-email-page.ts @@ -15,6 +15,6 @@ export default class DefendantSolicitorEmailPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-spec-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-content.ts similarity index 100% rename from playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-spec-content.ts rename to playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-content.ts diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-page.ts similarity index 95% rename from playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-spec-page.ts rename to playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-page.ts index 26be962457..75c8f9c53d 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-organisation/defendant-solicitor-organisation-page.ts @@ -3,7 +3,7 @@ import BasePage from '../../../../../../base/base-page'; import { AllMethodsStep } from '../../../../../../decorators/test-steps'; import ExuiPage from '../../../../exui-page/exui-page'; import OrganisationFragment from '../../../../fragments/organisation/organisation-fragment'; -import { heading, subheadings } from './defendant-solicitor-organisation-spec-content'; +import { heading, subheadings } from './defendant-solicitor-organisation-content'; @AllMethodsStep() export default class DefendantSolicitorOrganisationPage extends ExuiPage(BasePage) { @@ -28,6 +28,6 @@ export default class DefendantSolicitorOrganisationPage extends ExuiPage(BasePag } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-service-address/defendant-solicitor-service-address-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-service-address/defendant-solicitor-service-address-content.ts index 40bc0fcd88..b83867e81f 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-service-address/defendant-solicitor-service-address-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-service-address/defendant-solicitor-service-address-content.ts @@ -1 +1 @@ -export const heading = "Respondent representative's service address"; +export const heading = 'Respondent representative’s service address'; diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-service-address/defendant-solicitor-service-address-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-service-address/defendant-solicitor-service-address-page.ts index 36e96a5eeb..b295516ed2 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-service-address/defendant-solicitor-service-address-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/defendant-solicitor-service-address/defendant-solicitor-service-address-page.ts @@ -22,15 +22,15 @@ export default class DefendantSolicitorServiceAddressPage extends ExuiPage(BaseP } async selectYesAndEnterAddress() { - this.serviceAddressFragment.selectYes(); - this.serviceAddressFragment.enterAddressManual(); + await this.serviceAddressFragment.selectYes(); + await this.serviceAddressFragment.enterAddressManual(); } async selectNo() { - this.serviceAddressFragment.selectNo(); + await this.serviceAddressFragment.selectNo(); } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/details/details-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/details/details-page.ts index 6764dd8b2d..c70cce1e3a 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/details/details-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/details/details-page.ts @@ -20,6 +20,6 @@ export default class DetailsPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/eligibility/eligibility-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/eligibility/eligibility-page.ts index 7a93af7324..028233120f 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/eligibility/eligibility-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/eligibility/eligibility-page.ts @@ -28,6 +28,6 @@ export default class EligibilityPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/legal-representation/legal-representation-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/legal-representation/legal-representation-page.ts index a1fc624246..1cd285e4da 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/legal-representation/legal-representation-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/legal-representation/legal-representation-page.ts @@ -15,14 +15,14 @@ export default class LegalRepresentationPage extends ExuiPage(BasePage) { } async selectYes() { - super.clickBySelector(radioButtons.defendantRepresented.yes.selector); + await super.clickBySelector(radioButtons.defendantRepresented.yes.selector); } async selectNo() { - super.clickBySelector(radioButtons.defendantRepresented.no.selector); + await super.clickBySelector(radioButtons.defendantRepresented.no.selector); } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/personal-injury-type/personal-injury-type-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/personal-injury-type/personal-injury-type-content.ts index a614e7af31..75c684c240 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/personal-injury-type/personal-injury-type-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/personal-injury-type/personal-injury-type-content.ts @@ -2,7 +2,7 @@ export const radioButtons = { personalInjuryType: { label: 'What type of personal injury is this?', roadAccident: { - label: 'Road Accident', + label: 'Road accident', selector: '#personalInjuryType-ROAD_ACCIDENT', }, workAccident: { diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/personal-injury-type/personal-injury-type-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/personal-injury-type/personal-injury-type-page.ts index 32d508cdfa..892eb699fe 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/personal-injury-type/personal-injury-type-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/personal-injury-type/personal-injury-type-page.ts @@ -25,6 +25,6 @@ export default class PersonalInjuryTypePage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-claimant-litigation-friend/second-claimant-litigation-friend-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-claimant-litigation-friend/second-claimant-litigation-friend-page.ts index f86bc5a539..737045a375 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-claimant-litigation-friend/second-claimant-litigation-friend-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-claimant-litigation-friend/second-claimant-litigation-friend-page.ts @@ -21,7 +21,7 @@ export default class SecondClaimantLitigationFriendPage extends ExuiPage(BasePag async verifyContent() { await super.runVerifications([ super.verifyHeadings(), - super.expectLabel(radioButtons.litigationFriendRequired.label), + super.expectText(radioButtons.litigationFriendRequired.label), ]); } @@ -40,6 +40,6 @@ export default class SecondClaimantLitigationFriendPage extends ExuiPage(BasePag } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-legal-representation/second-defendant-legal-representation-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-legal-representation/second-defendant-legal-representation-page.ts index 1f198f6fc9..64093dc07b 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-legal-representation/second-defendant-legal-representation-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-legal-representation/second-defendant-legal-representation-page.ts @@ -21,6 +21,6 @@ export default class SecondDefendantLegalRepresentationPage extends ExuiPage(Bas } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-email/second-defendant-solicitor-email-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-email/second-defendant-solicitor-email-content.ts index f568488e79..430de39f43 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-email/second-defendant-solicitor-email-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-email/second-defendant-solicitor-email-content.ts @@ -6,7 +6,7 @@ export const inputs = { 'Enter the second defendant legal representatives email address to be used for notifications', hintText: "This should be the email address that the defendant's legal representative provided." + - 'You can still issue the claim without their email address but the claim will then continue on paper (offline).', + ' You can still issue the claim without their email address but the claim will then continue on paper (offline).', selector: '#respondentSolicitor2EmailAddress', }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-email/second-defendant-solicitor-email-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-email/second-defendant-solicitor-email-page.ts index 3ab20eec15..0280007e40 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-email/second-defendant-solicitor-email-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-email/second-defendant-solicitor-email-page.ts @@ -19,6 +19,6 @@ export default class SecondDefendantSolicitorEmailPage extends ExuiPage(BasePage } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-organisation/second-defendant-solicitor-organisation-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-organisation/second-defendant-solicitor-organisation-page.ts index b1c9ff2235..674a450eb3 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-organisation/second-defendant-solicitor-organisation-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-organisation/second-defendant-solicitor-organisation-page.ts @@ -24,10 +24,10 @@ export default class SecondDefendantSolicitorOrganisationPage extends ExuiPage(B async selectOrganisation() { await this.organisationFragment.enterReference(); - await this.organisationFragment.searchForOrganisation('Civil - Organisation 2'); + await this.organisationFragment.searchForOrganisation('Civil - Organisation 3'); } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-reference/second-defendant-solicitor-reference-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-reference/second-defendant-solicitor-reference-content.ts deleted file mode 100644 index 63fdc1692b..0000000000 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-reference/second-defendant-solicitor-reference-content.ts +++ /dev/null @@ -1,3 +0,0 @@ -export const subheadings = { - yourFileReference: 'Your File Reference (Optional)', -}; diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-reference/second-defendant-solicitor-reference-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-reference/second-defendant-solicitor-reference-page.ts index 9a04f7028b..410517737b 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-reference/second-defendant-solicitor-reference-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-reference/second-defendant-solicitor-reference-page.ts @@ -1,6 +1,5 @@ import BasePage from '../../../../../../base/base-page.ts'; import { AllMethodsStep } from '../../../../../../decorators/test-steps.ts'; -import { subheadings } from './second-defendant-solicitor-reference-content.ts'; import ExuiPage from '../../../../exui-page/exui-page.ts'; import SolicitorReferenceFragment from '../../../../fragments/solicitor-reference/solicitor-reference-fragment.ts'; import { Page } from 'playwright-core'; @@ -17,7 +16,6 @@ export default class SecondDefendantSolicitorReferencePage extends ExuiPage(Base async verifyContent() { await super.runVerifications([ super.verifyHeadings(), - super.expectSubheading(subheadings.yourFileReference), this.defendantSolicitorReferenceFragment.verifyContent(), ]); } @@ -27,6 +25,6 @@ export default class SecondDefendantSolicitorReferencePage extends ExuiPage(Base } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-service-address/second-defendant-solicitor-service-address-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-service-address/second-defendant-solicitor-service-address-content.ts index def04786fc..b02a6a1cbc 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-service-address/second-defendant-solicitor-service-address-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-service-address/second-defendant-solicitor-service-address-content.ts @@ -1 +1 @@ -export const heading = "Second respondent representative's service address"; +export const heading = 'Second respondent representative’s service address'; diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-service-address/second-defendant-solicitor-service-address-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-service-address/second-defendant-solicitor-service-address-page.ts index f3dbcd0fae..3ec1044e0f 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-service-address/second-defendant-solicitor-service-address-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/second-defendant-solicitor-service-address/second-defendant-solicitor-service-address-page.ts @@ -22,15 +22,15 @@ export default class SecondDefendantSolicitorServiceAddressPage extends ExuiPage } async selectYesAndEnterAddress() { - this.serviceAddressFragment.selectYes(); - this.serviceAddressFragment.enterAddressManual(); + await this.serviceAddressFragment.selectYes(); + await this.serviceAddressFragment.enterAddressManual(); } async selectNo() { - this.serviceAddressFragment.selectNo(); + await this.serviceAddressFragment.selectNo(); } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-create-claim/upload-create-claim-content.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-create-claim/upload-create-claim-content.ts index f3b870e2d0..2dd11819f5 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-create-claim/upload-create-claim-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-create-claim/upload-create-claim-content.ts @@ -1,6 +1,10 @@ +export const subheadings = { + medicalReports: 'Medical reports (Optional)', +}; + export const paragraphs = { descriptionText1: "Documents uploaded to the Damages Claims Portal prior to the 'notify claim details' next step (refer to PD51ZB section 4), will be visible to the defendant solicitor once the claim has been issued.", descriptionText2: - "If you do not want to provide access to these documents prior to completing the 'notify claim details' next step, please do not upload them now.s", + "If you do not want to provide access to these documents prior to completing the 'notify claim details' next step, please do not upload them now.", }; diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-create-claim/upload-create-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-create-claim/upload-create-claim-page.ts index 7a42811ef9..47505bc0aa 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-create-claim/upload-create-claim-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-create-claim/upload-create-claim-page.ts @@ -5,7 +5,7 @@ import { AllMethodsStep } from '../../../../../../decorators/test-steps'; import CCDCaseData from '../../../../../../models/ccd/ccd-case-data'; import ExuiPage from '../../../../exui-page/exui-page'; import ParticularsOfClaimFragment from '../../../../fragments/particulars-of-claim/particulars-of-claim-fragment'; -import { paragraphs } from './upload-create-claim-content'; +import { paragraphs, subheadings } from './upload-create-claim-content'; @AllMethodsStep() export default class UploadCreateClaimPage extends ExuiPage(BasePage) { @@ -16,12 +16,13 @@ export default class UploadCreateClaimPage extends ExuiPage(BasePage) { this.particularsOfClaimFragment = particularsOfClaimFragment; } - async verifyContent(ccdCaseData: CCDCaseData) { + async verifyContent() { await super.runVerifications([ - super.verifyHeadings(ccdCaseData), + super.verifyHeadings(), super.expectText(paragraphs.descriptionText1), super.expectText(paragraphs.descriptionText2), this.particularsOfClaimFragment.verifyContent(), + super.expectSubheading(subheadings.medicalReports), ]); } diff --git a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-particulars-of-claim/upload-particulars-of-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-particulars-of-claim/upload-particulars-of-claim-page.ts index 125ed370d3..e16ea116bf 100644 --- a/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-particulars-of-claim/upload-particulars-of-claim-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/create-claim/unspec/upload-particulars-of-claim/upload-particulars-of-claim-page.ts @@ -21,6 +21,6 @@ export default class UploadParticularsOfClaimPage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/lr-spec/confirm-inform-agreed-extension-date-spec/confirm-inform-agreed-extension-date-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/lr-spec/confirm-inform-agreed-extension-date-spec/confirm-inform-agreed-extension-date-spec-page.ts index d4f3cccce4..84c0803347 100644 --- a/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/lr-spec/confirm-inform-agreed-extension-date-spec/confirm-inform-agreed-extension-date-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/lr-spec/confirm-inform-agreed-extension-date-spec/confirm-inform-agreed-extension-date-spec-page.ts @@ -12,6 +12,7 @@ export default class ConfirmInformAgreedExtensionDateSpecPage extends ExuiPage(B const date = DateHelper.addToDate(ccdCaseData.respondent1ResponseDeadline, { days: 28, workingDay: true, + addDayAfter4pm: true, }); await super.runVerifications([ super.verifyHeadings(ccdCaseData), diff --git a/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/lr-spec/extension-date-spec/extension-date-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/lr-spec/extension-date-spec/extension-date-spec-page.ts index 5992b32a3c..5924c13211 100644 --- a/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/lr-spec/extension-date-spec/extension-date-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/lr-spec/extension-date-spec/extension-date-spec-page.ts @@ -3,7 +3,6 @@ import BasePage from '../../../../../../base/base-page'; import { AllMethodsStep } from '../../../../../../decorators/test-steps'; import DateHelper from '../../../../../../helpers/date-helper'; import CCDCaseData from '../../../../../../models/ccd/ccd-case-data'; -import { Party } from '../../../../../../models/partys'; import ExuiPage from '../../../../exui-page/exui-page'; import DateFragment from '../../../../fragments/date/date-fragment'; import { inputs } from './extension-date-spec-content'; @@ -28,6 +27,7 @@ export default class ExtensionDateSpecPage extends ExuiPage(BasePage) { const extensionDate = DateHelper.addToDate(ccdCaseData.respondent1ResponseDeadline, { days: 28, workingDay: true, + addDayAfter4pm: true, }); await this.dateFragment.enterDate(extensionDate, inputs.extensionDate.selectorKey); } diff --git a/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/unspec/extension-date/extension-date-page.ts b/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/unspec/extension-date/extension-date-page.ts index 3509f14ce4..de79bdf272 100644 --- a/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/unspec/extension-date/extension-date-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/inform-agreed-extension-date/unspec/extension-date/extension-date-page.ts @@ -7,25 +7,7 @@ import { paragraphs } from './extension-date-content'; @AllMethodsStep() export default class ExtensionDatePage extends ExuiPage(BasePage) { - async verifyContent() { - throw new Error('Method not implemented.'); - } - - async verifyContentDefendant1(ccdCaseData: CCDCaseData) { - const extensionDate = DateHelper.addToDate(ccdCaseData.claimDetailsNotificationDate, { - days: ccdCaseData.respondent1AcknowledgeNotificationDate ? 56 : 42, - workingDay: true, - }); - await super.runVerifications([ - super.verifyHeadings(ccdCaseData), - super.expectText(paragraphs.descriptionText, { ignoreDuplicates: true }), - super.expectText( - DateHelper.formatDateToString(extensionDate, { outputFormat: 'DD Mon YYYY' }), - ), - ]); - } - - async verifyContentDefendant2(ccdCaseData: CCDCaseData) { + async verifyContent(ccdCaseData: CCDCaseData) { const extensionDate = DateHelper.addToDate(ccdCaseData.claimDetailsNotificationDate, { days: ccdCaseData.respondent2AcknowledgeNotificationDate ? 56 : 42, workingDay: true, @@ -40,6 +22,6 @@ export default class ExtensionDatePage extends ExuiPage(BasePage) { } async submit() { - await super.clickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/certificate-of-service-1-notify-claim-details/certificate-of-service-1-notify-claim-details-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/certificate-of-service-1-notify-claim-details/certificate-of-service-1-notify-claim-details-page.ts index 3b0b9c1ab6..7a26d72501 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/certificate-of-service-1-notify-claim-details/certificate-of-service-1-notify-claim-details-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/certificate-of-service-1-notify-claim-details/certificate-of-service-1-notify-claim-details-page.ts @@ -1,26 +1,32 @@ import { Page } from 'playwright-core'; import BasePage from '../../../../../base/base-page'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; -import CertificateOfServiceFragment from '../../../fragments/certificate-of-service/certificate-of-service-fragment'; +import CertificateOfServiceNotifyClaimDetailsFragment from '../../../fragments/certificate-of-service-notify-claim-details/certificate-of-service-notify-claim-details-fragment'; import ExuiPage from '../../../exui-page/exui-page'; @AllMethodsStep() export default class CertificateOfService1NotifyClaimDetailsPage extends ExuiPage(BasePage) { - private certificateOfServiceFragment: CertificateOfServiceFragment; + private certificateOfServiceNotifyClaimDetailsFragment: CertificateOfServiceNotifyClaimDetailsFragment; - constructor(certificateOfServiceFragment: CertificateOfServiceFragment, page: Page) { + constructor( + certificateOfServiceNotifyClaimDetailsFragment: CertificateOfServiceNotifyClaimDetailsFragment, + page: Page, + ) { super(page); - this.certificateOfServiceFragment = certificateOfServiceFragment; + this.certificateOfServiceNotifyClaimDetailsFragment = + certificateOfServiceNotifyClaimDetailsFragment; } async verifyContent() { - await super.runVerifications([this.certificateOfServiceFragment.verifyContent()]); + await super.runVerifications([ + this.certificateOfServiceNotifyClaimDetailsFragment.verifyContent(), + ]); } async fillDetails() { - await this.certificateOfServiceFragment.fillCertificateOfService(); - await this.certificateOfServiceFragment.uploadSupportingEvidence(); - await this.certificateOfServiceFragment.fillCertificateOfService(); + await this.certificateOfServiceNotifyClaimDetailsFragment.fillCertificateOfService(); + await this.certificateOfServiceNotifyClaimDetailsFragment.uploadSupportingEvidence(); + await this.certificateOfServiceNotifyClaimDetailsFragment.fillStatementOfTruth(); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/certificate-of-service-2-notify-claim-details/certificate-of-service-2-notify-claim-details-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/certificate-of-service-2-notify-claim-details/certificate-of-service-2-notify-claim-details-page.ts index 4bcdd09d9e..7af4a249cb 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/certificate-of-service-2-notify-claim-details/certificate-of-service-2-notify-claim-details-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/certificate-of-service-2-notify-claim-details/certificate-of-service-2-notify-claim-details-page.ts @@ -1,30 +1,34 @@ import { Page } from 'playwright-core'; import BasePage from '../../../../../base/base-page'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; -import CertificateOfServiceFragment from '../../../fragments/certificate-of-service/certificate-of-service-fragment'; +import CertificateOfServiceNotifyClaimDetailsFragment from '../../../fragments/certificate-of-service-notify-claim-details/certificate-of-service-notify-claim-details-fragment'; import ExuiPage from '../../../exui-page/exui-page'; import CCDCaseData from '../../../../../models/ccd/ccd-case-data'; @AllMethodsStep() export default class CertificateOfService2NotifyClaimDetailsPage extends ExuiPage(BasePage) { - private certificateOfServiceFragment: CertificateOfServiceFragment; + private certificateOfServiceNotifyClaimDetailsFragment: CertificateOfServiceNotifyClaimDetailsFragment; - constructor(certificateOfServiceFragment: CertificateOfServiceFragment, page: Page) { + constructor( + certificateOfServiceNotifyClaimDetailsFragment: CertificateOfServiceNotifyClaimDetailsFragment, + page: Page, + ) { super(page); - this.certificateOfServiceFragment = certificateOfServiceFragment; + this.certificateOfServiceNotifyClaimDetailsFragment = + certificateOfServiceNotifyClaimDetailsFragment; } async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), - this.certificateOfServiceFragment.verifyContent(), + this.certificateOfServiceNotifyClaimDetailsFragment.verifyContent(), ]); } async fillDetails() { - await this.certificateOfServiceFragment.fillCertificateOfService(); - await this.certificateOfServiceFragment.uploadSupportingEvidence(); - await this.certificateOfServiceFragment.fillStatementOfTruth(); + await this.certificateOfServiceNotifyClaimDetailsFragment.fillCertificateOfService(); + await this.certificateOfServiceNotifyClaimDetailsFragment.uploadSupportingEvidence(); + await this.certificateOfServiceNotifyClaimDetailsFragment.fillStatementOfTruth(); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/confirm-notify-claim-details/confirm-notify-claim-details-cos-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/confirm-notify-claim-details/confirm-notify-claim-details-cos-page.ts index 51e4f69c14..fe07360093 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/confirm-notify-claim-details/confirm-notify-claim-details-cos-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/confirm-notify-claim-details/confirm-notify-claim-details-cos-page.ts @@ -1,13 +1,13 @@ import BasePage from '../../../../../base/base-page'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; import ExuiPage from '../../../exui-page/exui-page'; -import { confirmationHeading, paragraphs } from './confirm-notify-claim-details-content'; +import { confirmationHeadingCOS, paragraphs } from './confirm-notify-claim-details-content'; @AllMethodsStep() export default class ConfirmNotifyClaimDetailsCOSPage extends ExuiPage(BasePage) { async verifyContent() { await super.runVerifications([ - super.expectHeading(confirmationHeading), + super.expectHeading(confirmationHeadingCOS), super.expectText(paragraphs.descriptionTextCOS1), super.expectText(paragraphs.descriptionTextCOS2), ]); diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/notify-claim-details-page-factory.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/notify-claim-details-page-factory.ts index 0fb1fdd033..5bd2f2bae1 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/notify-claim-details-page-factory.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/notify-claim-details-page-factory.ts @@ -1,7 +1,7 @@ import BasePageFactory from '../../../../base/base-page-factory'; import partys from '../../../../constants/partys'; -import CertificateOfServiceSubmitFragment from '../../fragments/certificate-of-service-submit/certificate-of-service-submit-fragment'; -import CertificateOfServiceFragment from '../../fragments/certificate-of-service/certificate-of-service-fragment'; +import CertificateOfServiceNotifyClaimDetailsSubmitFragment from '../../fragments/certificate-of-service-notify-claim-details-submit/certificate-of-service-notify-claim-details-submit-fragment'; +import CertificateOfServiceNotifyClaimDetailsFragment from '../../fragments/certificate-of-service-notify-claim-details/certificate-of-service-notify-claim-details-fragment'; import ParticularsOfClaimFragment from '../../fragments/particulars-of-claim/particulars-of-claim-fragment'; import CertificateOfService1NotifyClaimDetailsPage from './certificate-of-service-1-notify-claim-details/certificate-of-service-1-notify-claim-details-page'; import CertificateOfService2NotifyClaimDetailsPage from './certificate-of-service-2-notify-claim-details/certificate-of-service-2-notify-claim-details-page'; @@ -10,6 +10,8 @@ import ConfirmNotifyClaimDetailsPage from './confirm-notify-claim-details/confir import SelectDefendantSolicitorPage from './select-defendant-solicitor/select-defendant-solicitor-page'; import SubmitNotifyClaimDetailsCOSPage from './submit-notify-claim-details/submit-notify-claim-details-cos-page'; import SubmitNotifyClaimDetailsPage from './submit-notify-claim-details/submit-notify-claim-details-page'; +import SubmitNotifyClaimDetailsLIPPage from './submit-notify-claim-details/submit-notify-claim-details-lip-page'; +import SubmitNotifyClaimDetailsLIPLRPage from './submit-notify-claim-details/submit-notify-claim-details-lip-lr-page'; import UploadNotifyClaimDetailsPage from './upload-notify-claim-details/upload-notify-claim-details-page'; export default class NotifyClaimDetailsPageFactory extends BasePageFactory { @@ -26,29 +28,43 @@ export default class NotifyClaimDetailsPageFactory extends BasePageFactory { return new SubmitNotifyClaimDetailsPage(this.page); } + get submitNotifyClaimDetailsLIPPage() { + return new SubmitNotifyClaimDetailsLIPPage(this.page); + } + + get submitNotifyClaimDetailsLIPLRPage() { + return new SubmitNotifyClaimDetailsLIPLRPage(this.page); + } + get confirmNotifyClaimDetailsPage() { return new ConfirmNotifyClaimDetailsPage(this.page); } get certificateOfService1NotifyClaimDetailsPage() { - const certificateOfServiceFragment = new CertificateOfServiceFragment( + const certificateOfServiceNotifyClaimDetailsFragment = + new CertificateOfServiceNotifyClaimDetailsFragment(this.page, partys.DEFENDANT_1); + return new CertificateOfService1NotifyClaimDetailsPage( + certificateOfServiceNotifyClaimDetailsFragment, this.page, - partys.DEFENDANT_1, ); - return new CertificateOfService1NotifyClaimDetailsPage(certificateOfServiceFragment, this.page); } get certificateOfService2NotifyClaimDetailsPage() { - const certificateOfServiceFragment = new CertificateOfServiceFragment( + const certificateOfServiceNotifyClaimDetailsFragment = + new CertificateOfServiceNotifyClaimDetailsFragment(this.page, partys.DEFENDANT_2); + return new CertificateOfService2NotifyClaimDetailsPage( + certificateOfServiceNotifyClaimDetailsFragment, this.page, - partys.DEFENDANT_2, ); - return new CertificateOfService2NotifyClaimDetailsPage(certificateOfServiceFragment, this.page); } get submitNotifyClaimDetailsCOSPage() { - const certificateOfServiceSubmitFragment = new CertificateOfServiceSubmitFragment(this.page); - return new SubmitNotifyClaimDetailsCOSPage(certificateOfServiceSubmitFragment, this.page); + const certificateOfServiceNotifyClaimDetailsSubmitFragment = + new CertificateOfServiceNotifyClaimDetailsSubmitFragment(this.page); + return new SubmitNotifyClaimDetailsCOSPage( + certificateOfServiceNotifyClaimDetailsSubmitFragment, + this.page, + ); } get confirmNotifyClaimDetailsCOSPage() { diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/select-defendant-solicitor/select-defendant-solicitor-content.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/select-defendant-solicitor/select-defendant-solicitor-content.ts index 5cf6eab690..d375071145 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/select-defendant-solicitor/select-defendant-solicitor-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/select-defendant-solicitor/select-defendant-solicitor-content.ts @@ -1,7 +1,7 @@ export const dropdowns = { defendantSolicitors: { label: 'Which defendant legal representative do you want to notify of the claim details?', - selector: '#defendantSolicitorNotifyClaimOptions', + selector: '#defendantSolicitorNotifyClaimDetailsOptions', options: ['Both'], }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-content.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-content.ts index 8216e20926..876db41a2e 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-content.ts @@ -1,8 +1,47 @@ +export const heading = { + defendant1: { + label: 'Certificate of Service [defendant1]', + }, + defendant2: { + label: 'Certificate of Service [defendant2]', + }, +}; + export const subheading = 'Check your answers'; +export const COS_table = { + dateOfService: { + label: 'On what day did you serve?', + }, + dateDeemedServed: { + label: 'The date of service is', + }, + documentsServed: { + label: 'What documents did you serve?', + }, + notifyClaimRecipient: { + label: 'Who did you serve the claim to?', + }, + documentsServedLocation: { + label: 'The location where you served the documents was the:', + }, + serveType: { + label: 'How did you serve the documents?', + }, + locationType: { + label: 'Select the type of location where you served the documents', + }, + name: { + label: 'Your name', + }, + firm: { + label: 'Your firm', + }, +}; + export const table = { uploadDocuments: 'Upload documents', - partiularsOfClaim: 'Particulars of claim', + particularsOfClaim: 'Particulars of claim', medicalReports: 'Medical reports', scheduleOfLoss: 'Schedule of loss', certificateOfSuitability: 'Certificate of suitability', diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-cos-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-cos-page.ts index 2cb84331e2..f99b2a73f6 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-cos-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-cos-page.ts @@ -1,25 +1,28 @@ import { Page } from 'playwright-core'; import BasePage from '../../../../../base/base-page'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; -import CertificateOfServiceSubmitFragment from '../../../fragments/certificate-of-service-submit/certificate-of-service-submit-fragment'; +import CertificateOfServiceNotifyClaimDetailsSubmitFragment from '../../../fragments/certificate-of-service-notify-claim-details-submit/certificate-of-service-notify-claim-details-submit-fragment'; import ExuiPage from '../../../exui-page/exui-page'; import CCDCaseData from '../../../../../models/ccd/ccd-case-data'; @AllMethodsStep() export default class SubmitNotifyClaimDetailsCOSPage extends ExuiPage(BasePage) { - private certificateOfServiceSubmitFragment: CertificateOfServiceSubmitFragment; + private certificateOfServiceNotifyClaimDetailsSubmitFragment: CertificateOfServiceNotifyClaimDetailsSubmitFragment; - constructor(certificateOfServiceSubmitFragment: CertificateOfServiceSubmitFragment, page: Page) { + constructor( + certificateOfServiceSubmitFragment: CertificateOfServiceNotifyClaimDetailsSubmitFragment, + page: Page, + ) { super(page); - this.certificateOfServiceSubmitFragment = certificateOfServiceSubmitFragment; + this.certificateOfServiceNotifyClaimDetailsSubmitFragment = certificateOfServiceSubmitFragment; } async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), - this.certificateOfServiceSubmitFragment.verifyContent(), - this.certificateOfServiceSubmitFragment.verifyDefendant1Answers(), - this.certificateOfServiceSubmitFragment.verifyDefendant2Answers(), + this.certificateOfServiceNotifyClaimDetailsSubmitFragment.verifyContent(), + this.certificateOfServiceNotifyClaimDetailsSubmitFragment.verifyDefendant1Answers(), + this.certificateOfServiceNotifyClaimDetailsSubmitFragment.verifyDefendant2Answers(), ]); } diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-lip-lr-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-lip-lr-page.ts new file mode 100644 index 0000000000..d02ab4024e --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-lip-lr-page.ts @@ -0,0 +1,33 @@ +import BasePage from '../../../../../base/base-page'; +import { AllMethodsStep } from '../../../../../decorators/test-steps'; +import ExuiPage from '../../../exui-page/exui-page'; +import CCDCaseData from '../../../../../models/ccd/ccd-case-data'; +import { heading, subheading, table, COS_table } from './submit-notify-claim-details-content'; + +@AllMethodsStep() +export default class SubmitNotifyClaimDetailsLIPLRPage extends ExuiPage(BasePage) { + async verifyContent(ccdCaseData: CCDCaseData) { + await super.runVerifications([ + super.verifyHeadings(ccdCaseData), + super.expectSubheading(subheading), + super.expectText(table.particularsOfClaim), + super.expectText(table.medicalReports, { exact: true }), + super.expectText(table.scheduleOfLoss, { exact: true }), + super.expectText(table.certificateOfSuitability, { exact: true }), + super.expectHeading(heading.defendant2.label), + super.expectText(COS_table.dateDeemedServed.label), + super.expectText(COS_table.dateOfService.label), + super.expectText(COS_table.documentsServed.label), + super.expectText(COS_table.documentsServedLocation.label), + super.expectText(COS_table.name.label), + super.expectText(COS_table.firm.label), + super.expectText(COS_table.locationType.label), + super.expectText(COS_table.notifyClaimRecipient.label), + super.expectText(COS_table.serveType.label), + ]); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-lip-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-lip-page.ts new file mode 100644 index 0000000000..9a7d6b9dc5 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-lip-page.ts @@ -0,0 +1,29 @@ +import BasePage from '../../../../../base/base-page'; +import { AllMethodsStep } from '../../../../../decorators/test-steps'; +import ExuiPage from '../../../exui-page/exui-page'; +import CCDCaseData from '../../../../../models/ccd/ccd-case-data'; +import { heading, subheading, COS_table } from './submit-notify-claim-details-content'; + +@AllMethodsStep() +export default class SubmitNotifyClaimDetailsLIPPage extends ExuiPage(BasePage) { + async verifyContent(ccdCaseData: CCDCaseData) { + await super.runVerifications([ + super.verifyHeadings(ccdCaseData), + super.expectSubheading(subheading), + super.expectHeading(heading.defendant1.label), + super.expectText(COS_table.dateDeemedServed.label), + super.expectText(COS_table.dateOfService.label), + super.expectText(COS_table.documentsServed.label), + super.expectText(COS_table.documentsServedLocation.label), + super.expectText(COS_table.name.label), + super.expectText(COS_table.firm.label), + super.expectText(COS_table.locationType.label), + super.expectText(COS_table.notifyClaimRecipient.label), + super.expectText(COS_table.serveType.label), + ]); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-page.ts index 3318de1408..8024f7b800 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/submit-notify-claim-details/submit-notify-claim-details-page.ts @@ -11,7 +11,7 @@ export default class SubmitNotifyClaimDetailsPage extends ExuiPage(BasePage) { super.verifyHeadings(ccdCaseData), super.expectSubheading(subheading), super.expectText(table.uploadDocuments, { index: 1 }), - super.expectText(table.partiularsOfClaim, { first: true }), + super.expectText(table.particularsOfClaim, { first: true }), super.expectText(table.medicalReports, { first: true }), super.expectText(table.scheduleOfLoss, { first: true }), super.expectText(table.certificateOfSuitability, { first: true }), diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/upload-notify-claim-details/upload-notify-claim-details-content.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/upload-notify-claim-details/upload-notify-claim-details-content.ts new file mode 100644 index 0000000000..27481ed084 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/upload-notify-claim-details/upload-notify-claim-details-content.ts @@ -0,0 +1,3 @@ +export const subheadings = { + medicalReports: 'Medical reports', +}; diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/upload-notify-claim-details/upload-notify-claim-details-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/upload-notify-claim-details/upload-notify-claim-details-page.ts index 30e8ebf8b0..881ddabefc 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/upload-notify-claim-details/upload-notify-claim-details-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim-details/upload-notify-claim-details/upload-notify-claim-details-page.ts @@ -1,10 +1,10 @@ import { Page } from 'playwright-core'; import BasePage from '../../../../../base/base-page'; -import filePaths from '../../../../../config/file-paths'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; import CCDCaseData from '../../../../../models/ccd/ccd-case-data'; import ExuiPage from '../../../exui-page/exui-page'; import ParticularsOfClaimFragment from '../../../fragments/particulars-of-claim/particulars-of-claim-fragment'; +import { subheadings } from './upload-notify-claim-details-content'; @AllMethodsStep() export default class UploadNotifyClaimDetailsPage extends ExuiPage(BasePage) { @@ -18,6 +18,7 @@ export default class UploadNotifyClaimDetailsPage extends ExuiPage(BasePage) { async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), + super.expectSubheading(subheadings.medicalReports), this.particularsOfClaimFragment.verifyContent(), ]); } diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim/certificate-of-service-1-notify-claim/certificate-of-service-1-notify-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim/certificate-of-service-1-notify-claim/certificate-of-service-1-notify-claim-page.ts index 3c32361209..cc02279130 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim/certificate-of-service-1-notify-claim/certificate-of-service-1-notify-claim-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim/certificate-of-service-1-notify-claim/certificate-of-service-1-notify-claim-page.ts @@ -1,29 +1,33 @@ import { Page } from 'playwright-core'; import BasePage from '../../../../../base/base-page'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; -import CertificateOfServiceFragment from '../../../fragments/certificate-of-service/certificate-of-service-fragment'; +import CertificateOfServiceNotifyClaimFragment from '../../../fragments/certificate-of-service-notify-claim/certificate-of-service-notify-claim-fragment'; import ExuiPage from '../../../exui-page/exui-page'; import CCDCaseData from '../../../../../models/ccd/ccd-case-data'; @AllMethodsStep() export default class CertificateOfService1NotifyClaimPage extends ExuiPage(BasePage) { - private defendant1CertificateOfServiceFragment: CertificateOfServiceFragment; + private defendant1CertificateOfServiceNotifyClaimFragment: CertificateOfServiceNotifyClaimFragment; - constructor(defendant1CertificateOfServiceFragment: CertificateOfServiceFragment, page: Page) { + constructor( + defendant1CertificateOfServiceNotifyClaimFragment: CertificateOfServiceNotifyClaimFragment, + page: Page, + ) { super(page); - this.defendant1CertificateOfServiceFragment = defendant1CertificateOfServiceFragment; + this.defendant1CertificateOfServiceNotifyClaimFragment = + defendant1CertificateOfServiceNotifyClaimFragment; } async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), - this.defendant1CertificateOfServiceFragment.verifyContent(), + this.defendant1CertificateOfServiceNotifyClaimFragment.verifyContent(), ]); } async fillDetails() { - await this.defendant1CertificateOfServiceFragment.fillCertificateOfService(); - await this.defendant1CertificateOfServiceFragment.fillStatementOfTruth(); + await this.defendant1CertificateOfServiceNotifyClaimFragment.fillCertificateOfService(); + await this.defendant1CertificateOfServiceNotifyClaimFragment.fillStatementOfTruth(); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim/certificate-of-service-2-notify-claim/certificate-of-service-2-notify-claim-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim/certificate-of-service-2-notify-claim/certificate-of-service-2-notify-claim-page.ts index a1209e227a..2529bbf3e7 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim/certificate-of-service-2-notify-claim/certificate-of-service-2-notify-claim-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim/certificate-of-service-2-notify-claim/certificate-of-service-2-notify-claim-page.ts @@ -1,29 +1,33 @@ import { Page } from 'playwright-core'; import BasePage from '../../../../../base/base-page'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; -import CertificateOfServiceFragment from '../../../fragments/certificate-of-service/certificate-of-service-fragment'; +import CertificateOfServiceNotifyClaimFragment from '../../../fragments/certificate-of-service-notify-claim/certificate-of-service-notify-claim-fragment'; import ExuiPage from '../../../exui-page/exui-page'; import CCDCaseData from '../../../../../models/ccd/ccd-case-data'; @AllMethodsStep() export default class CertificateOfService2NotifyClaimPage extends ExuiPage(BasePage) { - private defendant2CertificateOfServiceFragment: CertificateOfServiceFragment; + private defendant2CertificateOfServiceNotifyClaimFragment: CertificateOfServiceNotifyClaimFragment; - constructor(defendant2CertificateOfServiceFragment: CertificateOfServiceFragment, page: Page) { + constructor( + defendant2CertificateOfServiceNotifyClaimFragment: CertificateOfServiceNotifyClaimFragment, + page: Page, + ) { super(page); - this.defendant2CertificateOfServiceFragment = defendant2CertificateOfServiceFragment; + this.defendant2CertificateOfServiceNotifyClaimFragment = + defendant2CertificateOfServiceNotifyClaimFragment; } async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), - this.defendant2CertificateOfServiceFragment.verifyContent(), + this.defendant2CertificateOfServiceNotifyClaimFragment.verifyContent(), ]); } async fillDetails() { - await this.defendant2CertificateOfServiceFragment.fillCertificateOfService(); - await this.defendant2CertificateOfServiceFragment.fillStatementOfTruth(); + await this.defendant2CertificateOfServiceNotifyClaimFragment.fillCertificateOfService(); + await this.defendant2CertificateOfServiceNotifyClaimFragment.fillStatementOfTruth(); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim/notify-claim-page-factory.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim/notify-claim-page-factory.ts index 2826df3bba..6994b88a06 100644 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim/notify-claim-page-factory.ts +++ b/playwright-e2e/pages/exui/solicitor-events/notify-claim/notify-claim-page-factory.ts @@ -1,14 +1,12 @@ import BasePageFactory from '../../../../base/base-page-factory'; import partys from '../../../../constants/partys'; -import CertificateOfServiceSubmitFragment from '../../fragments/certificate-of-service-submit/certificate-of-service-submit-fragment'; -import CertificateOfServiceFragment from '../../fragments/certificate-of-service/certificate-of-service-fragment'; +import CertificateOfServiceNotifyClaimFragment from '../../fragments/certificate-of-service-notify-claim/certificate-of-service-notify-claim-fragment'; import AccessGrantedWarningPage from './access-granted-warning/access-granted-warning-page'; import CertificateOfService1NotifyClaimPage from './certificate-of-service-1-notify-claim/certificate-of-service-1-notify-claim-page'; import CertificateOfService2NotifyClaimPage from './certificate-of-service-2-notify-claim/certificate-of-service-2-notify-claim-page'; import ConfirmNotifyClaimCOSPage from './confirm-notify-claim/confirm-notify-claim-cos-page'; import ConfirmNotifyClaimPage from './confirm-notify-claim/confirm-notify-claim-page'; import DefendantSolicitorToNotifyPage from './defendant-solicitor-to-notify/defendant-solicitor-to-notify-page'; -import SubmitNotifyClaimCOSPage from './submit-notify-claim/submit-notify-claim-cos-page'; import SubmitNotifyClaimPage from './submit-notify-claim/submit-notify-claim-page'; export default class NotifyClaimPageFactory extends BasePageFactory { @@ -29,24 +27,25 @@ export default class NotifyClaimPageFactory extends BasePageFactory { } get certificateOfService1NotifyClaimPage() { - const certificateOfServiceFragment = new CertificateOfServiceFragment( + const certificateOfServiceNotifyClaimFragment = new CertificateOfServiceNotifyClaimFragment( this.page, partys.DEFENDANT_1, ); - return new CertificateOfService1NotifyClaimPage(certificateOfServiceFragment, this.page); + return new CertificateOfService1NotifyClaimPage( + certificateOfServiceNotifyClaimFragment, + this.page, + ); } get certificateOfService2NotifyClaimPage() { - const certificateOfServiceFragment = new CertificateOfServiceFragment( + const certificateOfServiceNotifyClaimFragment = new CertificateOfServiceNotifyClaimFragment( this.page, partys.DEFENDANT_2, ); - return new CertificateOfService2NotifyClaimPage(certificateOfServiceFragment, this.page); - } - - get submitNotifyClaimCOSPage() { - const certificateOfServiceSubmitFragment = new CertificateOfServiceSubmitFragment(this.page); - return new SubmitNotifyClaimCOSPage(certificateOfServiceSubmitFragment, this.page); + return new CertificateOfService2NotifyClaimPage( + certificateOfServiceNotifyClaimFragment, + this.page, + ); } get confirmNotifyClaimCOSPage() { diff --git a/playwright-e2e/pages/exui/solicitor-events/notify-claim/submit-notify-claim/submit-notify-claim-cos-page.ts b/playwright-e2e/pages/exui/solicitor-events/notify-claim/submit-notify-claim/submit-notify-claim-cos-page.ts deleted file mode 100644 index 224adf3df6..0000000000 --- a/playwright-e2e/pages/exui/solicitor-events/notify-claim/submit-notify-claim/submit-notify-claim-cos-page.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Page } from 'playwright-core'; -import BasePage from '../../../../../base/base-page'; -import { AllMethodsStep } from '../../../../../decorators/test-steps'; -import CertificateOfServiceSubmitFragment from '../../../fragments/certificate-of-service-submit/certificate-of-service-submit-fragment'; -import ExuiPage from '../../../exui-page/exui-page'; -import CCDCaseData from '../../../../../models/ccd/ccd-case-data'; - -@AllMethodsStep() -export default class SubmitNotifyClaimCOSPage extends ExuiPage(BasePage) { - private certificateOfServiceSubmitFragment: CertificateOfServiceSubmitFragment; - - constructor(certificateOfServiceSubmitFragment: CertificateOfServiceSubmitFragment, page: Page) { - super(page); - this.certificateOfServiceSubmitFragment = certificateOfServiceSubmitFragment; - } - - async verifyContent(ccdCaseData: CCDCaseData) { - await super.runVerifications([ - super.verifyHeadings(ccdCaseData), - this.certificateOfServiceSubmitFragment.verifyContent(), - this.certificateOfServiceSubmitFragment.verifyDefendant1Answers(), - this.certificateOfServiceSubmitFragment.verifyDefendant2Answers(), - ]); - } - - async submit() { - await super.retryClickSubmit(); - } -} diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/claimant-response-page-factory.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/claimant-response-page-factory.ts index d22a0dbc29..9ff47fa210 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/claimant-response-page-factory.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/claimant-response-page-factory.ts @@ -13,11 +13,9 @@ import ApplicationPage from '../directions-questionaire/lr-spec/application/appl import DisclosureOfElectronicDocumentsPage from '../directions-questionaire/lr-spec/disclosure-of-electronic-documents/discloure-of-electronic-documents-page'; import DisclosureOfNonElectronicDocumentsSpecPage from '../directions-questionaire/lr-spec/disclosure-of-non-electronic-documents-spec/disclosure-of-non-electronic-documents-spec-page'; import DisclosureReportPage from '../directions-questionaire/lr-spec/disclosure-report/disclosure-report-page'; -import MediationContactInformationClaimantPage from '../mediation/mediation-contact-information/mediation-contact-information-page'; -import MediationAvailabilityClaimantPage from '../mediation/mediation-availability/mediation-availability-page'; -import HearingSpecPage from '../directions-questionaire/lr-spec/hearing-spec/hearing-spec-page'; -import SmallClaimExpertsClaimantPage from '../directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-claimant-page'; -import SmallClaimWitnessesClaimantPage from '../directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-claimant-page'; +import HearingSpecPage from '../directions-questionaire/lr-spec/hearing-spec/hearing-spec-page.ts'; +import SmallClaimExpertsPage from '../directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-page'; +import SmallClaimWitnessesPage from '../directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-page'; import VulnerabilityQuestionsSpecPage from '../directions-questionaire/lr-spec/vulnerability-questions-spec/vulnerability-questions-spec-page'; import DisclosureOfNonElectronicDocumentsPage from '../directions-questionaire/unspec/disclosure-of-non-electronic-documents/disclosure-of-non-electronic-documents-page'; import DraftDirectionsPage from '../directions-questionaire/unspec/draft-directions/draft-directions-page'; @@ -41,6 +39,11 @@ import RespondentResponsePage from './unspec/respondent-response/respondent-resp import MediationContactInformationPage from '../mediation/mediation-contact-information/mediation-contact-information-page'; import MediationAvailabilityPage from '../mediation/mediation-availability/mediation-availability-page'; import DateFragment from '../../../fragments/date/date-fragment'; +import HearingFastSpecPage from '../directions-questionaire/lr-spec/hearing-spec/hearing-fast-spec-page.ts'; +import ClaimType from '../../../../../enums/claim-type.ts'; +import SmallClaimExperts2v1ClaimantPage from '../directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-2v1-claimant-page.ts'; +import HearingFastPage from '../directions-questionaire/unspec/hearing/hearing-fast-page.ts'; + export default class ClaimantResponsePageFactory extends BasePageFactory { get respondentResponsePage() { return new RespondentResponsePage(this.page); @@ -123,12 +126,16 @@ export default class ClaimantResponsePageFactory extends BasePageFactory { ); } - get smallClaimExpertsClaimantPage() { - return new SmallClaimExpertsClaimantPage(this.page); + get smallClaimExpertsPage() { + return new SmallClaimExpertsPage(this.page, partys.CLAIMANT_1, partys.CLAIMANT_EXPERT_1); + } + + get smallClaimExperts2v1Page() { + return new SmallClaimExperts2v1ClaimantPage(this.page); } - get smallClaimWitnessesClaimantPage() { - return new SmallClaimWitnessesClaimantPage(this.page); + get smallClaimWitnessesPage() { + return new SmallClaimWitnessesPage(this.page, partys.CLAIMANT_1, partys.CLAIMANT_WITNESS_1); } get expertsPage() { @@ -148,11 +155,21 @@ export default class ClaimantResponsePageFactory extends BasePageFactory { return new HearingPage(this.page, dateFragment, partys.CLAIMANT_1); } + get hearingFastPage() { + const dateFragment = new DateFragment(this.page); + return new HearingFastPage(this.page, dateFragment, partys.CLAIMANT_1); + } + get hearingSpecPage() { const dateFragment = new DateFragment(this.page); return new HearingSpecPage(this.page, dateFragment, partys.CLAIMANT_1); } + get hearingFastSpecPage() { + const dateFragment = new DateFragment(this.page); + return new HearingFastSpecPage(this.page, dateFragment, partys.CLAIMANT_1); + } + get draftDirectionsPage() { return new DraftDirectionsPage(this.page, partys.CLAIMANT_1); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/common/statement-of-truth-claimant-response/statement-of-truth-claimant-response-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/common/statement-of-truth-claimant-response/statement-of-truth-claimant-response-content.ts deleted file mode 100644 index 40dfd99864..0000000000 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/common/statement-of-truth-claimant-response/statement-of-truth-claimant-response-content.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const paragraphs = { - descriptiveText1: 'The defendant believes that the facts stated in the response are true.', - descriptiveText2: 'I am duly authorised by the defendant to sign this statement.', - descriptiveText3: - 'The defendant understands that proceedings for contempt of court may be brought against anyone who makes, or causes to be made, a false statement in a document verified by a statement of truth without an honest belief in its truth.', - descriptiveText4: - 'In order to verify the response to claim by a statement of truth please click “submit” on the next screen. Doing so will be taken as verifying the response by the above statement of truth. Alternatively, you will have the opportunity, on the next screen, to change any of the answers before clicking the “submit” button.', -}; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/common/statement-of-truth-claimant-response/statement-of-truth-claimant-response-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/common/statement-of-truth-claimant-response/statement-of-truth-claimant-response-page.ts index 52b563a3b1..c4015e0e05 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/common/statement-of-truth-claimant-response/statement-of-truth-claimant-response-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/common/statement-of-truth-claimant-response/statement-of-truth-claimant-response-page.ts @@ -3,9 +3,7 @@ import BasePage from '../../../../../../../base/base-page.ts'; import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import ExuiPage from '../../../../../exui-page/exui-page.ts'; -import { paragraphs } from './statement-of-truth-claimant-response-content.ts'; import StatementOfTruthFragment from '../../../../../fragments/statement-of-truth/statement-of-truth-fragment.ts'; -import partys from '../../../../../../../constants/partys.ts'; @AllMethodsStep() export default class StatementOfTruthClaimantResponsePage extends ExuiPage(BasePage) { @@ -19,8 +17,6 @@ export default class StatementOfTruthClaimantResponsePage extends ExuiPage(BaseP await super.runVerifications([ super.verifyHeadings(ccdCaseData), this.statementOfTruthFragment.verifyContent(), - super.expectText(paragraphs.descriptiveText1), - super.expectText(paragraphs.descriptiveText2), ]); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/confirm-claimant-response-spec/confirm-claimant-response-spec-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/confirm-claimant-response-spec/confirm-claimant-response-spec-content.ts index ba69f28593..64445cc3d5 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/confirm-claimant-response-spec/confirm-claimant-response-spec-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/confirm-claimant-response-spec/confirm-claimant-response-spec-content.ts @@ -2,10 +2,6 @@ export const confirmationHeadings = { proceed: 'You have decided to proceed with the claim', }; -export const subheadings = { - happensNext: 'What happens Next', -}; - export const paragraphs = { descriptionText1: "We'll review the case and contact you about what to do next.", }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/confirm-claimant-response-spec/confirm-claimant-response-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/confirm-claimant-response-spec/confirm-claimant-response-spec-page.ts index 238c0df88e..15cf9e5b15 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/confirm-claimant-response-spec/confirm-claimant-response-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/confirm-claimant-response-spec/confirm-claimant-response-spec-page.ts @@ -2,11 +2,7 @@ import BasePage from '../../../../../../../base/base-page.ts'; import ExuiPage from '../../../../../exui-page/exui-page.ts'; import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; -import { - confirmationHeadings, - paragraphs, - subheadings, -} from './confirm-claimant-response-spec-content.ts'; +import { confirmationHeadings, paragraphs } from './confirm-claimant-response-spec-content.ts'; @AllMethodsStep() export default class ConfirmClaimantResponseSpecPage extends ExuiPage(BasePage) { @@ -14,7 +10,6 @@ export default class ConfirmClaimantResponseSpecPage extends ExuiPage(BasePage) await super.runVerifications([ super.verifyHeadings(ccdCaseData), super.expectHeading(confirmationHeadings.proceed), - super.expectSubheading(subheadings.happensNext), super.expectText(paragraphs.descriptionText1), ]); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/respondent-response-spec/respondent-response-2v1-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/respondent-response-spec/respondent-response-2v1-spec-page.ts index 94ac98a134..dc477a050b 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/respondent-response-spec/respondent-response-2v1-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/respondent-response-spec/respondent-response-2v1-spec-page.ts @@ -17,11 +17,11 @@ export default class RespondentResponse2v1SpecPage extends ExuiPage(BasePage) { } async selectYes() { - await super.clickBySelector(radioButtons.proceedWithClaim.yes.selector); + await super.clickBySelector(radioButtons.proceedWithClaim.yes.selector2v1); } async selectNo() { - await super.clickBySelector(radioButtons.proceedWithClaim.no.selector); + await super.clickBySelector(radioButtons.proceedWithClaim.no.selector2v1); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/respondent-response-spec/respondent-response-spec-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/respondent-response-spec/respondent-response-spec-content.ts index c7eb43c941..7f3e3b16ac 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/respondent-response-spec/respondent-response-spec-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/lr-spec/respondent-response-spec/respondent-response-spec-content.ts @@ -1,5 +1,3 @@ -import ClaimType from '../../../../../../../enums/claim-type'; - export const paragraphs = { fullDefence: 'Defends all of the claim', responseForm: 'Defendant response form', diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/confirm-claimant-response/confirm-claimants-response-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/confirm-claimant-response/confirm-claimants-response-page.ts index 083cd7943e..11edf647e6 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/confirm-claimant-response/confirm-claimants-response-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/confirm-claimant-response/confirm-claimants-response-page.ts @@ -10,7 +10,7 @@ export default class ConfirmClaimantResponsePage extends ExuiPage(BasePage) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), super.expectHeading(confirmationHeadings.proceed), - super.expectSubheading(paragraphs.descriptionText1), + super.expectText(paragraphs.descriptionText1), ]); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/respondent-response/respondent-response-2v1-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/respondent-response/respondent-response-2v1-page.ts index 7e80fa646c..57ecb4dba4 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/respondent-response/respondent-response-2v1-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/respondent-response/respondent-response-2v1-page.ts @@ -15,8 +15,8 @@ export default class RespondentResponse2v1Page extends ExuiPage(BasePage) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), super.expectSubheading(subheadings.docUrl, { index: 0 }), - super.expectLabel(radioButtons.proceedWithClaim.label2v1(partys.CLAIMANT_1)), - super.expectLabel(radioButtons.proceedWithClaim.label2v1(partys.CLAIMANT_2)), + super.expectText(radioButtons.proceedWithClaim.label2v1(partys.CLAIMANT_1)), + super.expectText(radioButtons.proceedWithClaim.label2v1(partys.CLAIMANT_2)), ]); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/respondent-response/respondent-response-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/respondent-response/respondent-response-content.ts index 4af7024eed..c50418df40 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/respondent-response/respondent-response-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/claimant-response/unspec/respondent-response/respondent-response-content.ts @@ -12,24 +12,24 @@ export const paragraphs = { export const radioButtons = { proceedWithClaim: { label: 'Do you want to proceed with the claim', + label1v2: `Do you want to proceed with the claim against`, label2v1: (claimantParty: Party) => `Does Claimant ${claimantParty.number} want to proceed with the claim against`, - label1v2: `Do you want to proceed with the claim against`, yes: { label: 'Yes', selector: '#applicant1ProceedWithClaim_Yes', - selector2v1: (claimantParty: Party) => - `#${StringHelper.capitalise(claimantParty.oldKey)}ProceedWithClaimMultiParty2v1_Yes`, selector1v2: (defendantParty: Party) => `#applicant1ProceedWithClaimAgainst${StringHelper.capitalise(defendantParty.oldKey)}MultiParty1v2_Yes`, + selector2v1: (claimantParty: Party) => + `#${claimantParty.oldKey}ProceedWithClaimMultiParty2v1_Yes`, }, no: { label: 'No', selector: '#applicant1ProceedWithClaim_No', - selector2v1: (claimantParty: Party) => - `#${StringHelper.capitalise(claimantParty.oldKey)}ProceedWithClaimMultiParty2v1_No`, selector1v2: (defendantParty: Party) => `#applicant1ProceedWithClaimAgainst${StringHelper.capitalise(defendantParty.oldKey)}MultiParty1v2_No`, + selector2v1: (claimantParty: Party) => + `#${claimantParty.oldKey}ProceedWithClaimMultiParty2v1_No`, }, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/common/statement-of-truth-defendant-response/statement-of-truth-defendant-response-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/common/statement-of-truth-defendant-response/statement-of-truth-defendant-response-content.ts deleted file mode 100644 index 40dfd99864..0000000000 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/common/statement-of-truth-defendant-response/statement-of-truth-defendant-response-content.ts +++ /dev/null @@ -1,8 +0,0 @@ -export const paragraphs = { - descriptiveText1: 'The defendant believes that the facts stated in the response are true.', - descriptiveText2: 'I am duly authorised by the defendant to sign this statement.', - descriptiveText3: - 'The defendant understands that proceedings for contempt of court may be brought against anyone who makes, or causes to be made, a false statement in a document verified by a statement of truth without an honest belief in its truth.', - descriptiveText4: - 'In order to verify the response to claim by a statement of truth please click “submit” on the next screen. Doing so will be taken as verifying the response by the above statement of truth. Alternatively, you will have the opportunity, on the next screen, to change any of the answers before clicking the “submit” button.', -}; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/common/statement-of-truth-defendant-response/statement-of-truth-defendant-response-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/common/statement-of-truth-defendant-response/statement-of-truth-defendant-response-page.ts index e352731682..693d8eb351 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/common/statement-of-truth-defendant-response/statement-of-truth-defendant-response-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/common/statement-of-truth-defendant-response/statement-of-truth-defendant-response-page.ts @@ -3,7 +3,6 @@ import BasePage from '../../../../../../../base/base-page.ts'; import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import ExuiPage from '../../../../../exui-page/exui-page.ts'; -import { paragraphs } from './statement-of-truth-defendant-response-content.ts'; import StatementOfTruthFragment from '../../../../../fragments/statement-of-truth/statement-of-truth-fragment.ts'; @AllMethodsStep() @@ -18,8 +17,6 @@ export default class StatmentOfTruthDefendantResponsePage extends ExuiPage(BaseP await super.runVerifications([ super.verifyHeadings(ccdCaseData), this.statementOfTruthFragment.verifyContent(), - super.expectText(paragraphs.descriptiveText1), - super.expectText(paragraphs.descriptiveText2), ]); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/defendant-response-page-factory.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/defendant-response-page-factory.ts index 365dcb3c37..e5c2657e4e 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/defendant-response-page-factory.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/defendant-response-page-factory.ts @@ -9,16 +9,15 @@ import FileDirectionsQuestionnairePage from '../directions-questionaire/common/f import FixedRecoverableCostsPage from '../directions-questionaire/common/fixed-recoverable-costs/fixed-recoverable-costs-page'; import HearingSupportPage from '../directions-questionaire/common/hearing-support/hearing-support-page'; import LanguagePage from '../directions-questionaire/common/language/language-page'; -import WitnessesPage from '../directions-questionaire/common/witnesses/witnesses-page'; import ApplicationPage from '../directions-questionaire/lr-spec/application/application-page'; import DisclosureOfElectronicDocumentsLRSpecPage from '../directions-questionaire/lr-spec/disclosure-of-electronic-documents-lr-spec/discloure-of-electronic-documents-lr-spec-page'; import DisclosureOfNonElectronicDocumentsLRSpecPage from '../directions-questionaire/lr-spec/disclosure-of-non-electronic-documents-lr-spec/disclosure-of-non-electronic-documents-lr-spec-page'; import DisclosureReportPage from '../directions-questionaire/lr-spec/disclosure-report/disclosure-report-page'; import HearingLRSpecPage from '../directions-questionaire/lr-spec/hearing-lr-spec/hearing-lr-spec-page'; import RequestedCourtLRSpecPage from '../directions-questionaire/lr-spec/requested-court-lr-spec/requested-court-lr-spec-page'; -import SmallClaimExpertsDefendantPage from '../directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-defendant-page'; -import SmallClaimHearingPage from '../directions-questionaire/lr-spec/small-claim-hearing/small-claim-hearing-page'; -import SmallClaimWitnessesDefendantPage from '../directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-defendant-page'; +import SmallClaimExpertsPage from '../directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-page'; +import SmallClaimHearingPage from '../directions-questionaire/lr-spec/hearing-spec/hearing-spec-page'; +import SmallClaimWitnessesDefendantPage from '../directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-page'; import VulnerabilityQuestionsSpecPage from '../directions-questionaire/lr-spec/vulnerability-questions-spec/vulnerability-questions-spec-page'; import DraftDirectionsPage from '../directions-questionaire/unspec/draft-directions/draft-directions-page'; import FurtherInformationPage from '../directions-questionaire/unspec/further-information/further-information-page'; @@ -50,13 +49,15 @@ import Confirm1v2DSDefendantResponsePage from './unspec/confirm-defendant-respon import ConfirmDefendantResponsePage from './unspec/confirm-defendant-response/confirm-defendant-response-page'; import ConfirmDetails1v2Page from './unspec/confirm-details/confirm-details-1v2-page'; import ConfirmDetailsPage from './unspec/confirm-details/confirm-details-page'; -import RespondentResponseType1v2Page from './unspec/respondent-response-type/respondent-response-type-1v2-page'; +import RespondentResponseType1v2SSPage from './unspec/respondent-response-type/respondent-response-type-1v2SS-page'; import RespondentResponseType2v1Page from './unspec/respondent-response-type/respondent-response-type-2v1-page'; import RespondentResponseTypePage from './unspec/respondent-response-type/respondent-response-type-page'; -import SolicitorReferencesPage from './unspec/solicitor-references/solicitor-references-page'; import UploadDefendantResponsePage from './unspec/upload-defendant-response/upload-defendant-response-page'; import MediationContactInformationPage from '../mediation/mediation-contact-information/mediation-contact-information-page'; import MediationAvailabilityPage from '../mediation/mediation-availability/mediation-availability-page'; +import WitnessesSpecPage from '../directions-questionaire/lr-spec/witnesses-spec/witnesses-spec-page'; +import SolicitorReferencesDefendantResponsePage from './unspec/solicitor-references-defendant-response/solicitor-references-defendant-response-page'; +import SolicitorReferenceFragment from '../../../fragments/solicitor-reference/solicitor-reference-fragment'; export default class DefendantResponsePageFactory extends BasePageFactory { get respondentChecklistPage() { @@ -111,8 +112,8 @@ export default class DefendantResponsePageFactory extends BasePageFactory { return new RespondentResponseTypePage(this.page, partys.DEFENDANT_2); } - get respondentResponseType1v2Page() { - return new RespondentResponseType1v2Page(this.page); + get respondentResponseType1v2SSPage() { + return new RespondentResponseType1v2SSPage(this.page); } get respondentResponseType2v1Page() { @@ -131,8 +132,30 @@ export default class DefendantResponsePageFactory extends BasePageFactory { return new RespondentResponseType2v1SpecPage(this.page); } - get solicitorReferencesPage() { - return new SolicitorReferencesPage(this.page); + get solicitorReferencesDefendantResponseDefendant1Page() { + const solicitorReferenceFragment = new SolicitorReferenceFragment( + this.page, + partys.DEFENDANT_1, + partys.DEFENDANT_SOLICITOR_1, + ); + return new SolicitorReferencesDefendantResponsePage( + this.page, + solicitorReferenceFragment, + partys.DEFENDANT_1, + ); + } + + get solicitorReferencesDefendantResponseDefendant2Page() { + const solicitorReferenceFragment = new SolicitorReferenceFragment( + this.page, + partys.DEFENDANT_2, + partys.DEFENDANT_SOLICITOR_2, + ); + return new SolicitorReferencesDefendantResponsePage( + this.page, + solicitorReferenceFragment, + partys.DEFENDANT_2, + ); } get defenceRouteDefendant1Page() { @@ -270,11 +293,11 @@ export default class DefendantResponsePageFactory extends BasePageFactory { } get smallClaimExpertsDefendant1Page() { - return new SmallClaimExpertsDefendantPage(this.page, partys.DEFENDANT_1); + return new SmallClaimExpertsPage(this.page, partys.DEFENDANT_1, partys.DEFENDANT_1_EXPERT_1); } get smallClaimExpertsDefendant2Page() { - return new SmallClaimExpertsDefendantPage(this.page, partys.DEFENDANT_2); + return new SmallClaimExpertsPage(this.page, partys.DEFENDANT_2, partys.DEFENDANT_2_EXPERT_1); } get expertsDefendant1Page() { @@ -286,22 +309,30 @@ export default class DefendantResponsePageFactory extends BasePageFactory { } get smallClaimWitnessesDefendant1Page() { - return new SmallClaimWitnessesDefendantPage(this.page, partys.DEFENDANT_1); + return new SmallClaimWitnessesDefendantPage( + this.page, + partys.DEFENDANT_1, + partys.DEFENDANT_1_WITNESS_1, + ); } get smallClaimWitnessesDefendant2Page() { - return new SmallClaimWitnessesDefendantPage(this.page, partys.DEFENDANT_2); + return new SmallClaimWitnessesDefendantPage( + this.page, + partys.DEFENDANT_2, + partys.DEFENDANT_2_WITNESS_1, + ); } - get witnessesDefendant1Page() { - return new WitnessesPage(this.page, partys.DEFENDANT_1); + get witnessesSpecDefendant1Page() { + return new WitnessesSpecPage(this.page, partys.DEFENDANT_1); } - get witnessesDefendant2Page() { - return new WitnessesPage(this.page, partys.DEFENDANT_2); + get witnessesSpecDefendant2Page() { + return new WitnessesSpecPage(this.page, partys.DEFENDANT_2); } - get languageDefendant1Page() { + get languageSDefendant1Page() { return new LanguagePage(this.page, partys.DEFENDANT_1); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/lr-spec/respondent-response-type-spec/respondent-response-type-spec-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/lr-spec/respondent-response-type-spec/respondent-response-type-spec-content.ts index ae8217b4b6..9f5e09609b 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/lr-spec/respondent-response-type-spec/respondent-response-type-spec-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/lr-spec/respondent-response-type-spec/respondent-response-type-spec-content.ts @@ -4,21 +4,21 @@ export const radioButtons = { fullDefence: { label: 'Defends all of the claim', selector: (defendantParty: Party) => - `#respondent${defendantParty.number}ClaimResponseTypeForSpec-FULL_DEFENCE`, + `#${defendantParty.oldKey}ClaimResponseTypeForSpec-FULL_DEFENCE`, }, fullAdmit: { label: 'Admits all of the claim', selector: (defendantParty: Party) => - `#respondent${defendantParty.number}ClaimResponseTypeForSpec-FULL_ADMISSION`, + `#${defendantParty.oldKey}ClaimResponseTypeForSpec-FULL_ADMISSION`, }, partAdmit: { label: 'Admits part of the claim', selector: (defendantParty: Party) => - `#respondent${defendantParty.number}ClaimResponseTypeForSpec-PART_ADMISSION`, + `#${defendantParty.oldKey}ClaimResponseTypeForSpec-PART_ADMISSION`, }, counterClaim: { label: 'Defends all of the claim and wants to counterclaim', selector: (defendantParty: Party) => - `#respondent${defendantParty.number}ClaimResponseTypeForSpec-COUNTER_CLAIM`, + `#${defendantParty.oldKey}ClaimResponseTypeForSpec-COUNTER_CLAIM`, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/lr-spec/upload-defendant-response-spec/upload-defendant-response-spec-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/lr-spec/upload-defendant-response-spec/upload-defendant-response-spec-content.ts index 658e6276d4..ca69bed137 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/lr-spec/upload-defendant-response-spec/upload-defendant-response-spec-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/lr-spec/upload-defendant-response-spec/upload-defendant-response-spec-content.ts @@ -13,6 +13,6 @@ export const inputs = { uploadEvidence: { label: '', selector: (defendantParty: Party) => - `#respondent${defendantParty.number}SpecDefenceResponseDocument_file`, + `#${defendantParty.oldKey}SpecDefenceResponseDocument_file`, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-1v2-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-1v2SS-page.ts similarity index 74% rename from playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-1v2-page.ts rename to playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-1v2SS-page.ts index e0a51dbddc..ce88072474 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-1v2-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-1v2SS-page.ts @@ -6,7 +6,7 @@ import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import partys from '../../../../../../../constants/partys.ts'; @AllMethodsStep() -export default class RespondentResponseType1v2Page extends ExuiPage(BasePage) { +export default class RespondentResponseType1v2SSPage extends ExuiPage(BasePage) { async verifyContent(ccdCaseData: CCDCaseData) { super.runVerifications([ super.verifyHeadings(ccdCaseData), @@ -18,8 +18,12 @@ export default class RespondentResponseType1v2Page extends ExuiPage(BasePage) { } async selectRejectAll() { - await super.clickBySelector(radioButtons.rejectAll.selector(partys.DEFENDANT_1)); - await super.clickBySelector(radioButtons.rejectAll.selector(partys.DEFENDANT_2)); + await super.clickBySelector( + radioButtons.rejectAll.selector(partys.DEFENDANT_1, partys.CLAIMANT_1), + ); + await super.clickBySelector( + radioButtons.rejectAll.selector(partys.DEFENDANT_2, partys.CLAIMANT_1), + ); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-2v1-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-2v1-page.ts index 86f09ec7d7..31d3f4b3fd 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-2v1-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-2v1-page.ts @@ -18,8 +18,12 @@ export default class RespondentResponseType2v1Page extends ExuiPage(BasePage) { } async selectRejectAll() { - await super.clickBySelector(radioButtons.rejectAll.selector(partys.DEFENDANT_1)); - await super.clickBySelector(radioButtons.rejectAll.selector(partys.DEFENDANT_1, true)); + await super.clickBySelector( + radioButtons.rejectAll.selector(partys.DEFENDANT_1, partys.CLAIMANT_1), + ); + await super.clickBySelector( + radioButtons.rejectAll.selector(partys.DEFENDANT_1, partys.CLAIMANT_2), + ); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-content.ts index aeb4635edc..0f9fab731f 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-content.ts @@ -3,22 +3,22 @@ import { Party } from '../../../../../../../models/partys'; export const radioButtons = { rejectAll: { label: 'Reject all of the claim', - selector: (defendantParty: Party, isClaimant2 = false) => - `#respondent${defendantParty.number}ClaimResponseType${isClaimant2 ? 'ToApplicant2' : ''}-FULL_DEFENCE`, + selector: (defendantParty: Party, claimantParty: Party) => + `#respondent${defendantParty.number}ClaimResponseType${claimantParty.number === 2 ? 'ToApplicant2' : ''}-FULL_DEFENCE`, }, admitAll: { label: 'Admit all of the claim', - selector: (defendantParty: Party, isClaimant2 = false) => - `#respondent${defendantParty.number}ClaimResponseType${isClaimant2 ? 'ToApplicant2' : ''}-FULL_ADMISSION`, + selector: (defendantParty: Party, claimantParty: Party) => + `#respondent${defendantParty.number}ClaimResponseType${claimantParty.number === 2 ? 'ToApplicant2' : ''}-FULL_ADMISSION`, }, partAdmit: { label: 'Admit part of claim', - selector: (defendantParty: Party, isClaimant2 = false) => - `#respondent${defendantParty.number}ClaimResponseType${isClaimant2 ? 'ToApplicant2' : ''}-PART_ADMISSION`, + selector: (defendantParty: Party, claimantParty: Party) => + `#respondent${defendantParty.number}ClaimResponseType${claimantParty.number === 2 ? 'ToApplicant2' : ''}-PART_ADMISSION`, }, counterClaim: { label: 'Reject all of the claim and wants to counterclaim', - selector: (defendantParty: Party, isClaimant2 = false) => - `#respondent${defendantParty.number}ClaimResponseType${isClaimant2 ? 'ToApplicant2' : ''}-COUNTER_CLAIM`, + selector: (defendantParty: Party, claimantParty: Party) => + `#respondent${defendantParty.number}ClaimResponseType${claimantParty.number === 2 ? 'ToApplicant2' : ''}-COUNTER_CLAIM`, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-page.ts index 843bd6c01f..06d8246a78 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/respondent-response-type/respondent-response-type-page.ts @@ -5,6 +5,7 @@ import { radioButtons } from './respondent-response-type-content.ts'; import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import { Party } from '../../../../../../../models/partys.ts'; import { Page } from 'playwright-core'; +import partys from '../../../../../../../constants/partys.ts'; @AllMethodsStep() export default class RespondentResponseTypePage extends ExuiPage(BasePage) { @@ -26,7 +27,9 @@ export default class RespondentResponseTypePage extends ExuiPage(BasePage) { } async selectRejectAll() { - await super.clickBySelector(radioButtons.rejectAll.selector(this.defendantParty)); + await super.clickBySelector( + radioButtons.rejectAll.selector(this.defendantParty, partys.CLAIMANT_1), + ); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references/solicitor-references-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references-defendant-response/solicitor-references-defendant-response-content.ts similarity index 100% rename from playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references/solicitor-references-content.ts rename to playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references-defendant-response/solicitor-references-defendant-response-content.ts diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references-defendant-response/solicitor-references-defendant-response-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references-defendant-response/solicitor-references-defendant-response-page.ts new file mode 100644 index 0000000000..5cec2a97e5 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references-defendant-response/solicitor-references-defendant-response-page.ts @@ -0,0 +1,40 @@ +import { Page } from 'playwright-core'; +import BasePage from '../../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; +import StringHelper from '../../../../../../../helpers/string-helper.ts'; +import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; +import { Party } from '../../../../../../../models/partys.ts'; +import ExuiPage from '../../../../../exui-page/exui-page.ts'; +import SolicitorReferenceFragment from '../../../../../fragments/solicitor-reference/solicitor-reference-fragment.ts'; +import { subheadings, inputs } from './solicitor-references-defendant-response-content.ts'; + +@AllMethodsStep() +export default class SolicitorReferencesDefendantResponsePage extends ExuiPage(BasePage) { + private defendantParty: Party; + private defendantSolicitorReferenceFragment: SolicitorReferenceFragment; + + constructor( + page: Page, + defendantSolicitorReferenceFragment: SolicitorReferenceFragment, + defendantParty: Party, + ) { + super(page); + this.defendantSolicitorReferenceFragment = defendantSolicitorReferenceFragment; + this.defendantParty = defendantParty; + } + + async verifyContent(ccdCaseData: CCDCaseData) { + await super.runVerifications( + [super.verifyHeadings(ccdCaseData), super.expectSubheading(subheadings.fileRef)], + { axePageInsertName: StringHelper.capitalise(this.defendantParty.key) }, + ); + } + + async enterDetails() { + await this.defendantSolicitorReferenceFragment.enterReference(); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references/solicitor-references-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references/solicitor-references-page.ts deleted file mode 100644 index 54600ca35f..0000000000 --- a/playwright-e2e/pages/exui/solicitor-events/response/defendant-response/unspec/solicitor-references/solicitor-references-page.ts +++ /dev/null @@ -1,27 +0,0 @@ -import BasePage from '../../../../../../../base/base-page.ts'; -import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; -import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; -import ExuiPage from '../../../../../exui-page/exui-page.ts'; -import { subheadings, inputs } from './solicitor-references-content.ts'; - -@AllMethodsStep() -export default class SolicitorReferencesPage extends ExuiPage(BasePage) { - async verifyContent(ccdCaseData: CCDCaseData) { - await super.runVerifications([ - super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.fileRef), - ]); - } - - async fillDefendant1Ref() { - await super.inputText('New Defendant 1 Ref', inputs.defendant1Ref.selector); - } - - async fillDefendant2Ref() { - await super.inputText('New Defendant 2 Ref', inputs.defendant2Ref.selector); - } - - async submit() { - await super.retryClickSubmit(); - } -} diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/experts/experts-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/experts/experts-content.ts index 472980fa48..3b754353e1 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/experts/experts-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/experts/experts-content.ts @@ -94,6 +94,7 @@ export const inputs = { export const buttons = { addNew: { title: 'Add new', - selector: '.write-collection-add-item__top', + selector: (claimantDefendantParty: Party) => + `div[id='${claimantDefendantParty.oldKey}DQExperts_details'] button[type='button']`, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/experts/experts-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/experts/experts-page.ts index 146b0a428f..9352bdf194 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/experts/experts-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/experts/experts-page.ts @@ -4,7 +4,7 @@ import BasePage from '../../../../../../../base/base-page.ts'; import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import ExuiPage from '../../../../../exui-page/exui-page.ts'; -import { subheadings, inputs, radioButtons } from './experts-content.ts'; +import { subheadings, inputs, radioButtons, buttons } from './experts-content.ts'; import StringHelper from '../../../../../../../helpers/string-helper.ts'; import CaseDataHelper from '../../../../../../../helpers/case-data-helper.ts'; @@ -21,10 +21,10 @@ export default class ExpertPage extends ExuiPage(BasePage) { await super.runVerifications( [ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.experts), - super.expectText(radioButtons.expertsRequired.label), - super.expectLabel(radioButtons.expertsRequired.yes.label), - super.expectLabel(radioButtons.expertsRequired.no.label), + super.expectSubheading(subheadings.experts, { index: 0 }), + // super.expectText(radioButtons.expertsRequired.label, { first: true }), + // super.expectLabel(radioButtons.expertsRequired.yes.label, { index: 0 }), + // super.expectLabel(radioButtons.expertsRequired.no.label, { index: 0 }), ], { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, ); @@ -41,7 +41,7 @@ export default class ExpertPage extends ExuiPage(BasePage) { } async addNewExpert() { - await super.clickAddNew(); + await super.clickBySelector(buttons.addNew.selector(this.claimantDefendantParty)); } async enterExpertDetails(expertParty: Party) { diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/file-directions-questionnaire/file-directions-questionnaire-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/file-directions-questionnaire/file-directions-questionnaire-page.ts index c39fad4a69..abef4c0493 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/file-directions-questionnaire/file-directions-questionnaire-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/file-directions-questionnaire/file-directions-questionnaire-page.ts @@ -25,10 +25,16 @@ export default class FileDirectionsQuestionnairePage extends ExuiPage(BasePage) await super.runVerifications( [ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.fileDQ), - super.expectLabel(getCheckboxes(this.claimantDefendantParty).fileDQConfirm.label), - super.expectText(radioButtons(this.claimantDefendantParty).oneMonthStay.label), - super.expectText(radioButtons(this.claimantDefendantParty).protocolComplied.label), + super.expectSubheading(subheadings.fileDQ, { index: 0 }), + super.expectLabel(getCheckboxes(this.claimantDefendantParty).fileDQConfirm.label, { + index: 0, + }), + super.expectText(radioButtons(this.claimantDefendantParty).oneMonthStay.label, { + index: 0, + }), + super.expectText(radioButtons(this.claimantDefendantParty).protocolComplied.label, { + index: 0, + }), ], { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, ); @@ -41,7 +47,7 @@ export default class FileDirectionsQuestionnairePage extends ExuiPage(BasePage) radioButtons(this.claimantDefendantParty).protocolComplied.no.selector, ); await super.inputText( - `No explanation - ${this.claimantDefendantParty}`, + `No explanation - ${this.claimantDefendantParty.key}`, inputs(this.claimantDefendantParty).noProtocolCompliedReason.selector, ); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/fixed-recoverable-costs/fixed-recoverable-costs-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/fixed-recoverable-costs/fixed-recoverable-costs-content.ts index ff8fa1db1e..0d521caf74 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/fixed-recoverable-costs/fixed-recoverable-costs-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/fixed-recoverable-costs/fixed-recoverable-costs-content.ts @@ -1,45 +1,51 @@ import { Party } from '../../../../../../../models/partys'; export const subheadings = { - fixedRecoverableCosts: 'Fixed recoverable costs', + fixedRecoverableCosts: 'Fixed Recoverable Costs', }; -export const radioButtons = (claimantDefendantParty: Party) => ({ +export const radioButtons = { fixedRecoverableCosts: { label: 'Is this claim subject to the Fixed Recoverable Cost Regime requiring the court to determine a complexity band?', yes: { label: 'Yes', - selector: `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_isSubjectToFixedRecoverableCostRegime`, + selector: (claimantDefendantParty: Party) => + `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_isSubjectToFixedRecoverableCostRegime_Yes`, }, no: { label: 'No', - selector: `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_isSubjectToFixedRecoverableCostRegime_No`, + selector: (claimantDefendantParty: Party) => + `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_isSubjectToFixedRecoverableCostRegime_No`, }, }, complexityBands: { label: 'Which complexity band do you believe this claim falls into?', band1: { label: 'Band 1: road traffic accident without personal injury; debt claims', - selector: `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_band-BAND_1`, + selector: (claimantDefendantParty: Party) => + `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_band-BAND_1`, }, }, complexityBandAgreed: { - label: 'Has this complexity band been agreed with the other claimantDefendantParty?', + label: 'Has this complexity band been agreed with the other party?', yes: { label: 'Yes', - selector: `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_complexityBandingAgreed_Yes`, + selector: (claimantDefendantParty: Party) => + `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_complexityBandingAgreed_Yes`, }, no: { label: 'No', - selector: `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_complexityBandingAgreed_No`, + selector: (claimantDefendantParty: Party) => + `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_complexityBandingAgreed_No`, }, }, -}); +}; -export const inputs = (claimantDefendantParty: Party) => ({ +export const inputs = { fixedRecoverableCostsReason: { label: 'Please give your reasons (Optional)', - selector: `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_reasons`, + selector: (claimantDefendantParty: Party) => + `#${claimantDefendantParty.oldKey}DQFixedRecoverableCosts_reasons`, }, -}); +}; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/fixed-recoverable-costs/fixed-recoverable-costs-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/fixed-recoverable-costs/fixed-recoverable-costs-page.ts index 5e27422480..7bf049aff8 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/fixed-recoverable-costs/fixed-recoverable-costs-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/fixed-recoverable-costs/fixed-recoverable-costs-page.ts @@ -20,10 +20,10 @@ export default class FixedRecoverableCostsPage extends ExuiPage(BasePage) { await super.runVerifications( [ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.fixedRecoverableCosts), - super.expectText(radioButtons(this.claimantDefendantParty).fixedRecoverableCosts.label), - super.expectText(radioButtons(this.claimantDefendantParty).fixedRecoverableCosts.yes.label), - super.expectText(radioButtons(this.claimantDefendantParty).fixedRecoverableCosts.no.label), + super.expectSubheading(subheadings.fixedRecoverableCosts, { index: 0 }), + super.expectText(radioButtons.fixedRecoverableCosts.label, { + index: 0, + }), ], { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, ); @@ -31,28 +31,30 @@ export default class FixedRecoverableCostsPage extends ExuiPage(BasePage) { async selectNo() { await super.clickBySelector( - radioButtons(this.claimantDefendantParty).fixedRecoverableCosts.no.selector, + radioButtons.fixedRecoverableCosts.no.selector(this.claimantDefendantParty), ); await super.inputText( - 'No explanation', - inputs(this.claimantDefendantParty).fixedRecoverableCostsReason.selector, + `No explanation - ${this.claimantDefendantParty.key}`, + inputs.fixedRecoverableCostsReason.selector(this.claimantDefendantParty), ); } async selectYes() { await super.clickBySelector( - radioButtons(this.claimantDefendantParty).fixedRecoverableCosts.yes.selector, + radioButtons.fixedRecoverableCosts.yes.selector(this.claimantDefendantParty), ); await super.clickBySelector( - radioButtons(this.claimantDefendantParty).complexityBands.band1.selector, + radioButtons.complexityBands.band1.selector(this.claimantDefendantParty), ); - await super.expectText(radioButtons(this.claimantDefendantParty).complexityBandAgreed.label); + await super.expectText(radioButtons.complexityBandAgreed.label, { + index: 0, + }); await super.clickBySelector( - radioButtons(this.claimantDefendantParty).complexityBandAgreed.yes.selector, + radioButtons.complexityBandAgreed.yes.selector(this.claimantDefendantParty), ); await super.inputText( - 'No explanation', - inputs(this.claimantDefendantParty).fixedRecoverableCostsReason.selector, + `No explanation - ${this.claimantDefendantParty.key}`, + inputs.fixedRecoverableCostsReason.selector(this.claimantDefendantParty), ); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/hearing-support/hearing-support-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/hearing-support/hearing-support-page.ts index 6949145226..e91fc7e88c 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/hearing-support/hearing-support-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/hearing-support/hearing-support-page.ts @@ -20,8 +20,8 @@ export default class HearingSupportPage extends ExuiPage(BasePage) { await super.runVerifications( [ super.verifyHeadings(ccdCaseData), - super.expectHeading(subheadings.supportNeeds), - super.expectText(radioButtons.supportRequirements.label), + super.expectSubheading(subheadings.supportNeeds, { index: 0 }), + super.expectText(radioButtons.supportRequirements.label, { index: 0 }), ], { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, ); diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/language/language-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/language/language-content.ts index 806ffd0ce3..1a1aa76fc0 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/language/language-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/language/language-content.ts @@ -1,11 +1,11 @@ import { Party } from '../../../../../../../models/partys'; -export const subheadings = { welsh: 'Welsh Language' }; +export const subheadings = { welsh: 'Welsh language' }; export const paragraphs = { descriptionText: - 'Welsh is an official language of Wales.' + - 'You can use Welsh in court hearings.' + + 'Welsh is an official language of Wales. ' + + 'You can use Welsh in court hearings. ' + 'Asking to speak in Welsh in your hearing will not delay the hearing or have any effect on proceedings or the outcome of a case.', }; @@ -28,22 +28,22 @@ export const radioButtons = { `#${claimantDefendantParty.oldKey}DQLanguage_court-BOTH`, }, }, - documentLnaguage: { + documentLanguage: { label: 'What language will documents be provided in?', welsh: { label: 'Welsh', selector: (claimantDefendantParty: Party) => - `#${claimantDefendantParty.oldKey}DQLanguage_document-WELSH`, + `#${claimantDefendantParty.oldKey}DQLanguage_documents-WELSH`, }, english: { label: 'English', selector: (claimantDefendantParty: Party) => - `#${claimantDefendantParty.oldKey}DQLanguage_document-ENGLISH`, + `#${claimantDefendantParty.oldKey}DQLanguage_documents-ENGLISH`, }, welshAndEnglish: { label: 'Welsh and English', selector: (claimantDefendantParty: Party) => - `#${claimantDefendantParty.oldKey}DQLanguage_document-BOTH`, + `#${claimantDefendantParty.oldKey}DQLanguage_documents-BOTH`, }, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/language/language-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/language/language-page.ts index e3a8b905e8..87d9dc8529 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/language/language-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/language/language-page.ts @@ -20,13 +20,16 @@ export default class LanguagePage extends ExuiPage(BasePage) { await super.runVerifications( [ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.welsh), - super.expectText(paragraphs.descriptionText), - super.expectText(radioButtons.courtLanguage.label), - super.expectText(radioButtons.documentLnaguage.label), - super.expectLabel(radioButtons.courtLanguage.welsh.label, { count: 2 }), - super.expectLabel(radioButtons.courtLanguage.english.label, { count: 2 }), - super.expectLabel(radioButtons.courtLanguage.welshAndEnglish.label, { count: 2 }), + // super.expectSubheading(subheadings.welsh, { index: 0 }), + // super.expectText(paragraphs.descriptionText, { index: 0 }), + // super.expectText(radioButtons.courtLanguage.label, { index: 0 }), + // super.expectText(radioButtons.documentLanguage.label, { index: 0 }), + // super.expectLabel(radioButtons.courtLanguage.welsh.label, { index: 0 }), + // super.expectLabel(radioButtons.courtLanguage.english.label, { index: 0 }), + // super.expectLabel(radioButtons.courtLanguage.welshAndEnglish.label, { index: 0 }), + // super.expectLabel(radioButtons.documentLanguage.welsh.label, { index: 1 }), + // super.expectLabel(radioButtons.documentLanguage.english.label, { index: 1 }), + // super.expectLabel(radioButtons.documentLanguage.welshAndEnglish.label, { index: 1 }), ], { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, ); @@ -37,7 +40,7 @@ export default class LanguagePage extends ExuiPage(BasePage) { radioButtons.courtLanguage.welshAndEnglish.selector(this.claimantDefendantParty), ); await super.clickBySelector( - radioButtons.documentLnaguage.welshAndEnglish.selector(this.claimantDefendantParty), + radioButtons.documentLanguage.welshAndEnglish.selector(this.claimantDefendantParty), ); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/witnesses/witnesses-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/witnesses/witnesses-content.ts index eaf2b5208e..4eeda331c3 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/witnesses/witnesses-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/witnesses/witnesses-content.ts @@ -10,12 +10,12 @@ export const radioButtons = { yes: { label: 'Yes', selector: (claimantDefendantParty: Party) => - `#${claimantDefendantParty.oldKey}DQExperts_witnessesToAppear_Yes`, + `#${claimantDefendantParty.oldKey}DQWitnesses_witnessesToAppear_Yes`, }, no: { label: 'No', selector: (claimantDefendantParty: Party) => - `#${claimantDefendantParty.oldKey}DQExperts_witnessesToAppear_No`, + `#${claimantDefendantParty.oldKey}DQWitnesses_witnessesToAppear_No`, }, }, }; @@ -43,7 +43,7 @@ export const inputs = { number: { label: 'Phone number (Optional)', selector: (claimantDefendantParty: Party, witnessParty: Party) => - `#${claimantDefendantParty.oldKey}DQWitnessses_details_${witnessParty.number - 1}_phoneNumber`, + `#${claimantDefendantParty.oldKey}DQWitnesses_details_${witnessParty.number - 1}_phoneNumber`, }, email: { label: 'Email address (Optional)', diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/witnesses/witnesses-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/witnesses/witnesses-page.ts index 380043b20b..bb38a6b044 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/witnesses/witnesses-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/common/witnesses/witnesses-page.ts @@ -6,6 +6,7 @@ import ExuiPage from '../../../../../exui-page/exui-page.ts'; import { subheadings, buttons, inputs, radioButtons } from './witnesses-content.ts'; import { Party } from '../../../../../../../models/partys.ts'; import StringHelper from '../../../../../../../helpers/string-helper.ts'; +import CaseDataHelper from '../../../../../../../helpers/case-data-helper.ts'; @AllMethodsStep() export default class WitnessesPage extends ExuiPage(BasePage) { @@ -20,32 +21,49 @@ export default class WitnessesPage extends ExuiPage(BasePage) { await super.runVerifications( [ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.witnesses), - super.expectText(radioButtons.witnessesRequired.label), + super.expectSubheading(subheadings.witnesses, { index: 0 }), + super.expectText(radioButtons.witnessesRequired.label, { index: 0 }), ], { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, ); } - async addWitnesses() { + async selectYes() { + await super.clickBySelector( + radioButtons.witnessesRequired.yes.selector(this.claimantDefendantParty), + ); + } + + async selectNo() { + await super.clickBySelector( + radioButtons.witnessesRequired.no.selector(this.claimantDefendantParty), + ); + } + + async addWitness() { await super.clickBySelector(buttons.addNewWitness.selector(this.claimantDefendantParty)); } async enterWitnessDetails(witnessParty: Party) { + const witnessData = CaseDataHelper.buildWitnessData(witnessParty); await super.inputText( - 'First name', + witnessData.firstName, inputs.witnessDetails.firstName.selector(this.claimantDefendantParty, witnessParty), ); await super.inputText( - 'Last name', + witnessData.lastName, inputs.witnessDetails.lastName.selector(this.claimantDefendantParty, witnessParty), ); await super.inputText( - 'firstlast@gmail.com', + witnessData.phoneNumber, + inputs.witnessDetails.number.selector(this.claimantDefendantParty, witnessParty), + ); + await super.inputText( + witnessData.emailAddress, inputs.witnessDetails.email.selector(this.claimantDefendantParty, witnessParty), ); await super.inputText( - 'Event', + witnessData.reasonForWitness, inputs.witnessDetails.whatEvent.selector(this.claimantDefendantParty, witnessParty), ); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/applicant-court-location-lr-spec/applicant-court-lr-spec-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/applicant-court-location-lr-spec/applicant-court-lr-spec-content.ts index 2c331364dd..e22cb34370 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/applicant-court-location-lr-spec/applicant-court-lr-spec-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/applicant-court-location-lr-spec/applicant-court-lr-spec-content.ts @@ -1,5 +1,6 @@ export const subheadings = { courtLocation: 'Court Location', + claimant: `Claimant's requested court`, }; export const dropdowns = { diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/applicant-court-location-lr-spec/applicant-court-lr-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/applicant-court-location-lr-spec/applicant-court-lr-spec-page.ts index 7024ca4c88..49839877a7 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/applicant-court-location-lr-spec/applicant-court-lr-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/applicant-court-location-lr-spec/applicant-court-lr-spec-page.ts @@ -6,6 +6,7 @@ import ExuiPage from '../../../../../exui-page/exui-page.ts'; import { dropdowns, inputs, subheadings } from './applicant-court-lr-spec-content.ts'; import RemoteHearingSpecFragment from '../../../../../fragments/remote-hearing-spec/remote-hearing-spec-fragment.ts'; import partys from '../../../../../../../constants/partys.ts'; +import preferredCourts from '../../../../../../../config/preferred-courts.ts'; @AllMethodsStep() export default class ApplicantCourtLocationLRSpecPage extends ExuiPage(BasePage) { @@ -19,15 +20,15 @@ export default class ApplicantCourtLocationLRSpecPage extends ExuiPage(BasePage) async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.courtLocation), - super.expectLabel(inputs.preferredCourtReason.label), + super.expectSubheading(subheadings.claimant), + // super.expectLabel(inputs.preferredCourtReason.label, { index: 0 }), this.remoteHearingSpecFragment.verifyContent(), ]); } async selectCourtLocation() { await super.selectFromDropdown( - dropdowns.courtLocations.options[0], + preferredCourts[partys.CLAIMANT_1.key].default, dropdowns.courtLocations.selector, ); await super.inputText( diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/application/application-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/application/application-content.ts index 8f7f396fef..ad53128829 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/application/application-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/application/application-content.ts @@ -1,4 +1,5 @@ import { Party } from '../../../../../../../models/partys'; +import PartyType from '../../../../../../../enums/party-types.ts'; export const subheadings = { application: 'Application', @@ -26,8 +27,13 @@ export const inputs = { selector: (claimantDefendantParty: Party) => `#${claimantDefendantParty.oldKey}DQFutureApplications_whatWillFutureApplicationsBeMadeFor`, }, + otherInformation: { label: 'Provide any other information the judge may need (Optional)', - selector: '#additionalInformationForJudge', + selector: (claimantDefendantParty: Party) => { + if (claimantDefendantParty.partyType === PartyType.CLAIMANT) + return `#${claimantDefendantParty.oldKey}AdditionalInformationForJudge`; + return '#additionalInformationForJudge'; + }, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/application/application-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/application/application-page.ts index 8d1662a764..0809fe3670 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/application/application-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/application/application-page.ts @@ -29,7 +29,10 @@ export default class ApplicationPage extends ExuiPage(BasePage) { async selectYes() { await super.clickBySelector(radioButtons.application.yes.selector(this.claimantDefendantParty)); - await super.inputText('test', inputs.whatFor.selector(this.claimantDefendantParty)); + await super.inputText( + `Reason - ${this.claimantDefendantParty.key}`, + inputs.whatFor.selector(this.claimantDefendantParty), + ); } async selectNo() { @@ -37,7 +40,10 @@ export default class ApplicationPage extends ExuiPage(BasePage) { } async enterAdditionalInformation() { - await super.inputText('test', inputs.otherInformation.selector); + await super.inputText( + `Additional information - ${this.claimantDefendantParty.key}`, + inputs.otherInformation.selector(this.claimantDefendantParty), + ); } async submit() { diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/disclosure-of-electronic-documents/disclosure-of-electronic-documents-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/disclosure-of-electronic-documents/disclosure-of-electronic-documents-content.ts index 4007d98bde..a92d21a41f 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/disclosure-of-electronic-documents/disclosure-of-electronic-documents-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/disclosure-of-electronic-documents/disclosure-of-electronic-documents-content.ts @@ -19,7 +19,7 @@ export const radioButtons = { }, }, agreement: { - label: 'Is such an agreement likely?', + label: 'Is such agreement likely?', yes: { label: 'Yes', selector: (claimantDefendantParty: Party) => @@ -35,7 +35,8 @@ export const radioButtons = { export const inputs = { disagreementReason: { - label: 'What are the issues?', + label: + 'What are the issues about disclosure of electronic documents which the court needs to address, and should they be dealt with at the CMC or at a separate hearing?', selector: (claimantDefendantParty: Party) => `#spec${StringHelper.capitalise(claimantDefendantParty.oldKey)}DQDisclosureOfElectronicDocuments_reasonForNoAgreement`, }, diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-fast-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-fast-spec-page.ts new file mode 100644 index 0000000000..c1acc84640 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-fast-spec-page.ts @@ -0,0 +1,86 @@ +import { Page } from 'playwright-core'; +import BasePage from '../../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; +import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; +import ExuiPage from '../../../../../exui-page/exui-page.ts'; +import { buttons, heading, radioButtons, subheadings, inputs } from './hearing-spec-content.ts'; +import { Party } from '../../../../../../../models/partys.ts'; +import DateFragment from '../../../../../fragments/date/date-fragment.ts'; +import DateHelper from '../../../../../../../helpers/date-helper.ts'; + +@AllMethodsStep() +export default class HearingFastSpecPage extends ExuiPage(BasePage) { + private dateFragment: DateFragment; + private claimantParty: Party; + + constructor(page: Page, dateFragment: DateFragment, claimantParty: Party) { + super(page); + this.claimantParty = claimantParty; + this.dateFragment = dateFragment; + } + + async verifyContent() { + await super.runVerifications([ + super.expectHeading(heading), + super.expectText(radioButtons.unavailableDateRequired.labelFast), + ]); + } + + async selectYesUnavailabilityRequired() { + await super.clickBySelector( + radioButtons.unavailableDateRequired.yes.selectorFast(this.claimantParty), + ); + } + + async selectNoUnavailabilityRequired() { + await super.clickBySelector( + radioButtons.unavailableDateRequired.no.selectorFast(this.claimantParty), + ); + } + + async addNewUnavailableDate() { + await super.clickBySelector(buttons.addNewUnavailability.selectorFast(this.claimantParty)); + await super.expectSubheading(subheadings.unavailableDate, { ignoreDuplicates: true }); + } + + async selectSingleDate(unavailableDateNumber: number) { + await super.clickBySelector( + radioButtons.unavailableDateType.single.selectorFast( + this.claimantParty, + unavailableDateNumber, + ), + ); + const unavailableDate = DateHelper.addToToday({ months: 6 }); + await this.dateFragment.enterDate(unavailableDate, inputs.singleDate.selectorKey); + } + + async selectSingleDateFastTrack(unavailableDateNumber: number) { + await super.clickBySelector( + radioButtons.unavailableDateType.single.selectorFast( + this.claimantParty, + unavailableDateNumber, + ), + ); + const unavailableDate = DateHelper.addToToday({ months: 6 }); + await this.dateFragment.enterDate(unavailableDate, 'date'); + } + + async selectDateRange(unavailableDateNumber: number) { + await super.clickBySelector( + radioButtons.unavailableDateType.range.selectorFast( + this.claimantParty, + unavailableDateNumber, + ), + ); + + const unavailableDateFrom = DateHelper.addToToday({ months: 6 }); + const unavailableDateTo = DateHelper.addToToday({ months: 7 }); + await this.dateFragment.enterDate(unavailableDateFrom, inputs.dateFrom.selectorKey); + await this.dateFragment.enterDate(unavailableDateTo, inputs.dateTo.selectorKey); + } + + async submit() { + await super.retryClickSubmit(); + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-spec-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-spec-content.ts index e00a9faac1..d2ffbbcc1c 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-spec-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-spec-content.ts @@ -1,3 +1,4 @@ +import ClaimType from '../../../../../../../enums/claim-type'; import { Party } from '../../../../../../../models/partys'; export const heading = 'Hearing availability'; @@ -9,27 +10,38 @@ export const subheadings = { export const radioButtons = { unavailableDateRequired: { label: - 'Are there any days in the next 12 months when your client, an expert, or a witness, cannot attend a hearing?', + 'Are there any days in the next 12 months when you, your client, an expert, or a witness, cannot attend a hearing?', + labelFast: + 'Are there any dates when you, your client(s), experts or any witnesses are unavailable?', yes: { label: 'Yes', - selector: (claimantDefendantParty: Party) => - `#${claimantDefendantParty.oldKey}DQHearing_unavailableDatesRequired_Yes`, + selector: (claimantParty: Party) => + `#${claimantParty.oldKey}DQSmallClaimHearing_unavailableDatesRequired_Yes`, + selectorFast: (claimantParty: Party) => + `#${claimantParty.oldKey}DQHearingLRspec_unavailableDatesRequired_Yes`, }, no: { label: 'No', - selector: (claimantDefendantParty: Party) => - `#${claimantDefendantParty.oldKey}DQHearing_unavailableDatesRequired_No`, + selector: (claimantParty: Party) => + `#${claimantParty.oldKey}DQHearingSmallClaim_unavailableDatesRequired_No`, + selectorFast: (claimantParty: Party) => + `#${claimantParty.oldKey}DQHearingLRspec_unavailableDatesRequired_No`, }, }, + unavailableDateType: { label: 'Add a single date or a date range', single: { - selector: (claimantDefendantParty: Party, unavailableDateNumber: number) => - `#${claimantDefendantParty.oldKey}DQHearingFastClaim_unavailableDate_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, + selector: (claimantParty: Party, unavailableDateNumber: number) => + `#${claimantParty.oldKey}DQSmallClaimHearing_smallClaimUnavailableDate_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, + selectorFast: (claimantParty: Party, unavailableDateNumber: number) => + `#${claimantParty.oldKey}DQHearingLRspec_unavailableDates_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, }, range: { - selector: (claimantDefendantParty: Party, unavailableDateNumber: number) => - `#${claimantDefendantParty.oldKey}DQHearingFastClaim_unavailableDate_${unavailableDateNumber - 1}_unavailableDateType-DATE_RANGE`, + selector: (claimantParty: Party, unavailableDateNumber: number) => + `#${claimantParty.oldKey}DQHearingSmallClaim_smallClaimUnavailableDate_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, + selectorFast: (claimantParty: Party, unavailableDateNumber: number) => + `#${claimantParty.oldKey}DQHearingLRspec_unavailableDate_${unavailableDateNumber - 1}_unavailableDateType-DATE_RANGE`, }, }, }; @@ -50,9 +62,11 @@ export const inputs = { }; export const buttons = { - addNewAvailability: { + addNewUnavailability: { title: 'Add new', - selector: (claimantDefendantParty: Party) => - `div[id='${claimantDefendantParty.oldKey}DQHearing_unavailableDates'] button[type='button']`, + selector: (claimantParty: Party) => + `div[id='${claimantParty.oldKey}DQSmallClaimHearing_smallClaimUnavailableDate'] button[type='button']`, + selectorFast: (claimantParty: Party) => + `div[id='${claimantParty.oldKey}DQHearingLRspec_unavailableDates'] button[type='button']`, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-spec-page.ts index af3418af5d..71c594b08f 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/hearing-spec/hearing-spec-page.ts @@ -3,53 +3,53 @@ import BasePage from '../../../../../../../base/base-page.ts'; import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import ExuiPage from '../../../../../exui-page/exui-page.ts'; -import { buttons, heading, radioButtons, subheadings, inputs } from './hearing-spec-content.ts'; +import { buttons, radioButtons, subheadings, inputs, heading } from './hearing-spec-content.ts'; import { Party } from '../../../../../../../models/partys.ts'; import DateFragment from '../../../../../fragments/date/date-fragment.ts'; import DateHelper from '../../../../../../../helpers/date-helper.ts'; +import StringHelper from '../../../../../../../helpers/string-helper.ts'; @AllMethodsStep() export default class HearingSpecPage extends ExuiPage(BasePage) { private dateFragment: DateFragment; - private claimantDefendantParty: Party; + private claimantParty: Party; - constructor(page: Page, dateFragment: DateFragment, claimantDefendantParty: Party) { + constructor(page: Page, dateFrament: DateFragment, claimantParty: Party) { super(page); - this.claimantDefendantParty = claimantDefendantParty; + this.dateFragment = dateFrament; + this.claimantParty = claimantParty; } - async verifyContent(ccdCaseData: CCDCaseData) { - await super.runVerifications([ - super.expectHeading(heading), - super.expectHeading(ccdCaseData.id), - super.expectHeading(ccdCaseData.caseNamePublic), - super.expectText(radioButtons.unavailableDateRequired.label), - ]); + async verifyContent() { + await super.runVerifications( + [ + super.expectHeading(heading), + // super.expectSubheading(subheadings.unavailableDate), + super.expectText(radioButtons.unavailableDateRequired.label), + ], + { axePageInsertName: StringHelper.capitalise(this.claimantParty.key) }, + ); } - async selectYesAvailabilityRequired() { + async selectYesUnavailabilityRequired() { await super.clickBySelector( - radioButtons.unavailableDateRequired.yes.selector(this.claimantDefendantParty), + radioButtons.unavailableDateRequired.yes.selector(this.claimantParty), ); } - async selectNoAvailabilityRequired() { + async selectNoUnavailabilityRequired() { await super.clickBySelector( - radioButtons.unavailableDateRequired.no.selector(this.claimantDefendantParty), + radioButtons.unavailableDateRequired.no.selector(this.claimantParty), ); } async addNewUnavailableDate() { - await super.clickBySelector(buttons.addNewAvailability.selector(this.claimantDefendantParty)); - await super.expectSubheading(subheadings.unavailableDate); + await super.clickBySelector(buttons.addNewUnavailability.selector(this.claimantParty)); } async selectSingleDate(unavailableDateNumber: number) { await super.clickBySelector( - radioButtons.unavailableDateType.single.selector( - this.claimantDefendantParty, - unavailableDateNumber, - ), + radioButtons.unavailableDateType.single.selector(this.claimantParty, unavailableDateNumber), ); const unavailableDate = DateHelper.addToToday({ months: 6 }); await this.dateFragment.enterDate(unavailableDate, inputs.singleDate.selectorKey); @@ -57,10 +57,7 @@ export default class HearingSpecPage extends ExuiPage(BasePage) { async selectDateRange(unavailableDateNumber: number) { await super.clickBySelector( - radioButtons.unavailableDateType.range.selector( - this.claimantDefendantParty, - unavailableDateNumber, - ), + radioButtons.unavailableDateType.range.selector(this.claimantParty, unavailableDateNumber), ); const unavailableDateFrom = DateHelper.addToToday({ months: 6 }); const unavailableDateTo = DateHelper.addToToday({ months: 7 }); @@ -70,5 +67,6 @@ export default class HearingSpecPage extends ExuiPage(BasePage) { async submit() { await super.retryClickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/requested-court-lr-spec/requested-court-lr-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/requested-court-lr-spec/requested-court-lr-spec-page.ts index 935340c679..22dac5bfc9 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/requested-court-lr-spec/requested-court-lr-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/requested-court-lr-spec/requested-court-lr-spec-page.ts @@ -7,6 +7,7 @@ import { dropdowns, inputs, subheadings } from './requested-court-lr-spec-conten import { Party } from '../../../../../../../models/partys.ts'; import StringHelper from '../../../../../../../helpers/string-helper.ts'; import RemoteHearingSpecFragment from '../../../../../fragments/remote-hearing-spec/remote-hearing-spec-fragment.ts'; +import preferredCourts from '../../../../../../../config/preferred-courts.ts'; @AllMethodsStep() export default class RequestedCourtLRSpecPage extends ExuiPage(BasePage) { @@ -37,7 +38,7 @@ export default class RequestedCourtLRSpecPage extends ExuiPage(BasePage) { async selectCourtLocation() { await super.selectFromDropdown( - dropdowns.courtLocationDropdown.options[0], + preferredCourts[this.defendantParty.key].default, dropdowns.courtLocationDropdown.selector, ); await super.inputText( diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-claimant-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-2v1-claimant-page.ts similarity index 77% rename from playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-claimant-page.ts rename to playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-2v1-claimant-page.ts index 8e4afc74ef..3358a0f6ea 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-claimant-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-2v1-claimant-page.ts @@ -1,29 +1,27 @@ -import { Page } from 'playwright-core'; import BasePage from '../../../../../../../base/base-page.ts'; import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import ExuiPage from '../../../../../exui-page/exui-page.ts'; -import { inputs, radioButtons } from './small-claim-experts-content.ts'; +import { inputs, radioButtons, subheadings } from './small-claim-experts-content.ts'; import partys from '../../../../../../../constants/partys.ts'; import CaseDataHelper from '../../../../../../../helpers/case-data-helper.ts'; -import { subheadings } from '../../common/witnesses/witnesses-content.ts'; @AllMethodsStep() -export default class SmallClaimExpertsClaimantPage extends ExuiPage(BasePage) { +export default class SmallClaimExperts2v1ClaimantPage extends ExuiPage(BasePage) { async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.witnesses), - super.expectText(radioButtons.expertsRequired.label), + super.expectSubheading(subheadings.experts), + // super.expectText(radioButtons.expertsRequired.label, { index: 1 }), ]); } - async useExperts() { - await super.clickBySelector(radioButtons.expertsRequired.yes.selector(partys.CLAIMANT_1)); + async selectYesExperts() { + await super.clickBySelector(radioButtons.expertsRequired.yes.selector2v1); } - async useNoExperts() { - await super.clickBySelector(radioButtons.expertsRequired.no.selector(partys.CLAIMANT_1)); + async selectNoExperts() { + await super.clickBySelector(radioButtons.expertsRequired.no.selector2v1); } async enterExpertDetails() { diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-content.ts index ae7d219a6f..09eb6fef70 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-content.ts @@ -1,3 +1,4 @@ +import ClaimType from '../../../../../../../enums/claim-type'; import PartyType from '../../../../../../../enums/party-types'; import { Party } from '../../../../../../../models/partys'; @@ -7,16 +8,19 @@ export const radioButtons = { expertsRequired: { label: 'Do you want to use an expert?', yes: { + selector2v1: '#applicantMPClaimExpertSpecRequired_Yes', selector: (claimantDefendantParty: Party) => { - if (claimantDefendantParty.partyType === PartyType.CLAIMANT) + if (claimantDefendantParty.partyType === PartyType.CLAIMANT) { return `#${claimantDefendantParty.oldKey}ClaimExpertSpecRequired_Yes`; + } return `#responseClaimExpertSpecRequired${claimantDefendantParty.number === 1 ? '' : '2'}_Yes`; }, }, no: { + selector2v1: '#applicantMPClaimExpertSpecRequired_No', selector: (claimantDefendantParty: Party) => { if (claimantDefendantParty.partyType === PartyType.CLAIMANT) - return `#${claimantDefendantParty.oldKey}ClaimExpertSpecRequired_Yes`; + return `#${claimantDefendantParty.oldKey}ClaimExpertSpecRequired_No`; return `#responseClaimExpertSpecRequired${claimantDefendantParty.number === 1 ? '' : '2'}_No`; }, }, @@ -32,7 +36,7 @@ export const inputs = { 'Then use the Manage Contact Information event to provide the name when known', selector: (claimantDefendantParty: Party) => { if (claimantDefendantParty.partyType === PartyType.CLAIMANT) - `#${claimantDefendantParty.oldKey}RespondToClaimExperts_firstName`; + return `#${claimantDefendantParty.oldKey}RespondToClaimExperts_firstName`; return `#respondToClaimExperts${claimantDefendantParty.number === 1 ? '' : '2'}_firstName`; }, }, @@ -40,7 +44,7 @@ export const inputs = { label: 'Last name', selector: (claimantDefendantParty: Party) => { if (claimantDefendantParty.partyType === PartyType.CLAIMANT) - `#${claimantDefendantParty.oldKey}RespondToClaimExperts_lastName`; + return `#${claimantDefendantParty.oldKey}RespondToClaimExperts_lastName`; return `#respondToClaimExperts${claimantDefendantParty.number === 1 ? '' : '2'}_lastName`; }, }, @@ -48,7 +52,7 @@ export const inputs = { label: 'Phone number (Optional)', selector: (claimantDefendantParty: Party) => { if (claimantDefendantParty.partyType === PartyType.CLAIMANT) - `#${claimantDefendantParty.oldKey}RespondToClaimExperts_phoneNumber`; + return `#${claimantDefendantParty.oldKey}RespondToClaimExperts_phoneNumber`; return `#respondToClaimExperts${claimantDefendantParty.number === 1 ? '' : '2'}_phoneNumber`; }, }, @@ -56,7 +60,7 @@ export const inputs = { label: 'Email address (Optional)', selector: (claimantDefendantParty: Party) => { if (claimantDefendantParty.partyType === PartyType.CLAIMANT) - `#${claimantDefendantParty.oldKey}RespondToClaimExperts_emailAddress`; + return `#${claimantDefendantParty.oldKey}RespondToClaimExperts_emailAddress`; return `#respondToClaimExperts${claimantDefendantParty.number === 1 ? '' : '2'}_emailAddress`; }, }, @@ -64,7 +68,7 @@ export const inputs = { label: 'Field of expertise', selector: (claimantDefendantParty: Party) => { if (claimantDefendantParty.partyType === PartyType.CLAIMANT) - `#${claimantDefendantParty.oldKey}RespondToClaimExperts_fieldofExpertise`; + return `#${claimantDefendantParty.oldKey}RespondToClaimExperts_fieldofExpertise`; return `#respondToClaimExperts${claimantDefendantParty.number === 1 ? '' : '2'}_fieldofExpertise`; }, }, @@ -72,7 +76,7 @@ export const inputs = { label: 'Why do you need this expert?', selector: (claimantDefendantParty: Party) => { if (claimantDefendantParty.partyType === PartyType.CLAIMANT) - `#${claimantDefendantParty.oldKey}RespondToClaimExperts_whyRequired`; + return `#${claimantDefendantParty.oldKey}RespondToClaimExperts_whyRequired`; return `#respondToClaimExperts${claimantDefendantParty.number === 1 ? '' : '2'}_whyRequired`; }, }, @@ -80,7 +84,7 @@ export const inputs = { label: 'Estimated cost', selector: (claimantDefendantParty: Party) => { if (claimantDefendantParty.partyType === PartyType.CLAIMANT) - `#${claimantDefendantParty.oldKey}RespondToClaimExperts_whyRequired`; + return `#${claimantDefendantParty.oldKey}RespondToClaimExperts_estimatedCost`; return `#respondToClaimExperts${claimantDefendantParty.number === 1 ? '' : '2'}_estimatedCost`; }, }, diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-defendant-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-page.ts similarity index 51% rename from playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-defendant-page.ts rename to playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-page.ts index e4245378c2..03fb102917 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-defendant-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-experts/small-claim-experts-page.ts @@ -5,17 +5,17 @@ import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import ExuiPage from '../../../../../exui-page/exui-page.ts'; import { inputs, radioButtons, subheadings } from './small-claim-experts-content.ts'; import { Party } from '../../../../../../../models/partys.ts'; -import partys from '../../../../../../../constants/partys.ts'; import CaseDataHelper from '../../../../../../../helpers/case-data-helper.ts'; -import StringHelper from '../../../../../../../helpers/string-helper.ts'; @AllMethodsStep() -export default class SmallClaimExpertsDefendantPage extends ExuiPage(BasePage) { - private defendantParty: Party; +export default class SmallClaimExpertsPage extends ExuiPage(BasePage) { + private claimantDefendantParty: Party; + private expertParty: Party; - constructor(page: Page, defendantParty: Party) { + constructor(page: Page, claimantDefendantParty: Party, expertParty: Party) { super(page); - this.defendantParty = defendantParty; + this.claimantDefendantParty = claimantDefendantParty; + this.expertParty = expertParty; } async verifyContent(ccdCaseData: CCDCaseData) { @@ -23,51 +23,53 @@ export default class SmallClaimExpertsDefendantPage extends ExuiPage(BasePage) { [ super.verifyHeadings(ccdCaseData), super.expectSubheading(subheadings.experts), - super.expectText(radioButtons.expertsRequired.label), + // super.expectText(radioButtons.expertsRequired.label), ], - { axePageInsertName: StringHelper.capitalise(this.defendantParty.key) }, + { axePageInsertName: this.claimantDefendantParty.key }, ); } - async useExperts() { - await super.clickBySelector(radioButtons.expertsRequired.yes.selector(this.defendantParty)); + async selectYesExperts() { + await super.clickBySelector( + radioButtons.expertsRequired.yes.selector(this.claimantDefendantParty), + ); } async useNoExperts() { - await super.clickBySelector(radioButtons.expertsRequired.no.selector(this.defendantParty)); + await super.clickBySelector( + radioButtons.expertsRequired.no.selector(this.claimantDefendantParty), + ); } async enterExpertDetails() { - const expertParty = - this.defendantParty.number === 1 ? partys.DEFENDANT_1_EXPERT_1 : partys.DEFENDANT_2_EXPERT_1; - const expertData = CaseDataHelper.buildExpertData(expertParty); + const expertData = CaseDataHelper.buildExpertData(this.expertParty); await super.inputText( expertData.firstName, - inputs.expert.firstName.selector(this.defendantParty), + inputs.expert.firstName.selector(this.claimantDefendantParty), ); await super.inputText( expertData.lastName, - inputs.expert.lastName.selector(this.defendantParty), + inputs.expert.lastName.selector(this.claimantDefendantParty), ); await super.inputText( expertData.phoneNumber, - inputs.expert.phoneNumber.selector(this.defendantParty), + inputs.expert.phoneNumber.selector(this.claimantDefendantParty), ); await super.inputText( expertData.emailAddress, - inputs.expert.email.selector(this.defendantParty), + inputs.expert.email.selector(this.claimantDefendantParty), ); await super.inputText( expertData.fieldOfExpertise, - inputs.expert.expertise.selector(this.defendantParty), + inputs.expert.expertise.selector(this.claimantDefendantParty), ); await super.inputText( expertData.whyRequired, - inputs.expert.whyRequired.selector(this.defendantParty), + inputs.expert.whyRequired.selector(this.claimantDefendantParty), ); await super.inputText( expertData.estimatedCost, - inputs.expert.estimatedCost.selector(this.defendantParty), + inputs.expert.estimatedCost.selector(this.claimantDefendantParty), ); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-hearing/small-claim-hearing-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-hearing/small-claim-hearing-content.ts index 534deea435..36966d1e60 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-hearing/small-claim-hearing-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-hearing/small-claim-hearing-content.ts @@ -11,23 +11,23 @@ export const radioButtons = { 'Are there any days in the next 12 months when you, your client, an expert, or a witness, cannot attend a hearing?', yes: { label: 'Yes', - selector: (claimantDefendantParty: Party) => - `#${claimantDefendantParty.oldKey}DQHearingSmallClaim_unavailableDatesRequired_Yes`, + selector: (defendantParty: Party) => + `#${defendantParty.oldKey}DQSmallClaimHearing_unavailableDatesRequired_Yes`, }, no: { label: 'No', - selector: (claimantDefendantParty: Party) => - `#${claimantDefendantParty.oldKey}DQHearingSmallClaim_unavailableDatesRequired_No`, + selector: (defendantParty: Party) => + `#${defendantParty.oldKey}DQHearingSmallClaim_unavailableDatesRequired_No`, }, }, availabilityOptions: { single: { - selector: (claimantDefendantParty: Party, unavailableDateNumber: number) => - `#${claimantDefendantParty.oldKey}DQHearingSmallClaim_smallClaimUnavailableDate_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, + selector: (defendantParty: Party, unavailableDateNumber: number) => + `#${defendantParty.oldKey}DQSmallClaimHearing_smallClaimUnavailableDate_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, }, range: { - selector: (claimantDefendantParty: Party, unavailableDateNumber: number) => - `#${claimantDefendantParty.oldKey}DQHearingSmallClaim_smallClaimUnavailableDate_${unavailableDateNumber - 1}_unavailableDateType-DATE_RANGE`, + selector: (defendantParty: Party, unavailableDateNumber: number) => + `#${defendantParty.oldKey}DQHearingSmallClaim_smallClaimUnavailableDate_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, }, }, interpreter: { @@ -47,8 +47,8 @@ export const radioButtons = { export const buttons = { addNewAvailability: { title: 'Add new', - selector: (claimantDefendantParty: Party) => - `div[id='${claimantDefendantParty.oldKey}DQHearing_unavailableDates'] button[class='button write-collection-add-item__top']`, + selector: (defendantParty: Party) => + `div[id='${defendantParty.oldKey}DQSmallClaimHearing_smallClaimUnavailableDate'] button[type='button']`, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-hearing/small-claim-hearing-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-hearing/small-claim-hearing-page.ts index 184fdd5915..0d2ef2f5da 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-hearing/small-claim-hearing-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-hearing/small-claim-hearing-page.ts @@ -12,12 +12,12 @@ import StringHelper from '../../../../../../../helpers/string-helper.ts'; @AllMethodsStep() export default class SmallClaimHearingPage extends ExuiPage(BasePage) { private dateFragment: DateFragment; - private claimantDefendantParty: Party; + private defendantParty: Party; - constructor(page: Page, dateFrament: DateFragment, claimantDefendantParty: Party) { + constructor(page: Page, dateFrament: DateFragment, defendantParty: Party) { super(page); this.dateFragment = dateFrament; - this.claimantDefendantParty = claimantDefendantParty; + this.defendantParty = defendantParty; } async verifyContent(ccdCaseData: CCDCaseData) { @@ -27,19 +27,19 @@ export default class SmallClaimHearingPage extends ExuiPage(BasePage) { super.expectSubheading(subheadings.availability), super.expectText(radioButtons.unavailableDatesRequired.label), ], - { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, + { axePageInsertName: StringHelper.capitalise(this.defendantParty.key) }, ); } async selectYesAvailabilityRequired() { await super.clickBySelector( - radioButtons.unavailableDatesRequired.yes.selector(this.claimantDefendantParty), + radioButtons.unavailableDatesRequired.yes.selector(this.defendantParty), ); } async selectNoAvailabilityRequired() { await super.clickBySelector( - radioButtons.unavailableDatesRequired.no.selector(this.claimantDefendantParty), + radioButtons.unavailableDatesRequired.no.selector(this.defendantParty), ); } @@ -52,15 +52,12 @@ export default class SmallClaimHearingPage extends ExuiPage(BasePage) { } async addNewUnavailableDate() { - await super.clickBySelector(buttons.addNewAvailability.selector(this.claimantDefendantParty)); + await super.clickBySelector(buttons.addNewAvailability.selector(this.defendantParty)); } async selectSingleDate(unavailableDateNumber: number) { await super.clickBySelector( - radioButtons.availabilityOptions.single.selector( - this.claimantDefendantParty, - unavailableDateNumber, - ), + radioButtons.availabilityOptions.single.selector(this.defendantParty, unavailableDateNumber), ); const unavailableDate = DateHelper.addToToday({ months: 6 }); await this.dateFragment.enterDate(unavailableDate, inputs.dateTo.selectorKey); @@ -68,10 +65,7 @@ export default class SmallClaimHearingPage extends ExuiPage(BasePage) { async selectDateRange(unavailableDateNumber: number) { await super.clickBySelector( - radioButtons.availabilityOptions.range.selector( - this.claimantDefendantParty, - unavailableDateNumber, - ), + radioButtons.availabilityOptions.range.selector(this.defendantParty, unavailableDateNumber), ); const unavailableDateFrom = DateHelper.addToToday({ months: 6 }); const unavailableDateTo = DateHelper.addToToday({ months: 7 }); diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-claimant-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-claimant-page.ts deleted file mode 100644 index 8d568bdeb5..0000000000 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-claimant-page.ts +++ /dev/null @@ -1,56 +0,0 @@ -import { Party } from '../../../../../../../models/partys.ts'; -import BasePage from '../../../../../../../base/base-page.ts'; -import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; -import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; -import ExuiPage from '../../../../../exui-page/exui-page.ts'; -import { buttons, inputs, radioButtons, subheadings } from './small-claim-witnesses-content.ts'; -import CaseDataHelper from '../../../../../../../helpers/case-data-helper.ts'; -import partys from '../../../../../../../constants/partys.ts'; - -@AllMethodsStep() -export default class SmallClaimWitnessesClaimantPage extends ExuiPage(BasePage) { - async verifyContent(ccdCaseData: CCDCaseData) { - await super.runVerifications([ - super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.witnesses), - super.expectSubheading(subheadings.claimantWitnesses), - super.expectText(radioButtons.witnessesRequired.label), - ]); - } - - async selectYes() { - await super.clickBySelector(radioButtons.witnessesRequired.yes.selector(partys.CLAIMANT_1)); - } - - async selectNo() { - await super.clickBySelector(radioButtons.witnessesRequired.no.selector(partys.CLAIMANT_1)); - } - - async addWitness() { - await super.clickBySelector(buttons.addNewWitness.selector(partys.CLAIMANT_1)); - } - - async enterWitness1Details(claimantWitnessParty: Party) { - const defendantWitnessData = CaseDataHelper.buildWitnessData(claimantWitnessParty); - await super.inputText( - defendantWitnessData.firstName, - inputs.witnessDetails.firstName.selector(partys.CLAIMANT_1, claimantWitnessParty), - ); - await super.inputText( - defendantWitnessData.lastName, - inputs.witnessDetails.lastName.selector(partys.CLAIMANT_1, claimantWitnessParty), - ); - await super.inputText( - defendantWitnessData.emailAddress, - inputs.witnessDetails.email.selector(partys.CLAIMANT_1, claimantWitnessParty), - ); - await super.inputText( - defendantWitnessData.reasonForWitness, - inputs.witnessDetails.whatEvent.selector(partys.CLAIMANT_1, claimantWitnessParty), - ); - } - - async submit() { - await super.retryClickSubmit(); - } -} diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-content.ts index 956960f8a2..18edb11fad 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-content.ts @@ -1,9 +1,10 @@ +import StringHelper from '../../../../../../../helpers/string-helper'; import { Party } from '../../../../../../../models/partys'; export const subheadings = { witnesses: `Witnesses`, - claimantWitnesses: `Claimant 1 witnesses`, - defendantWitnesses: (defendantParty: Party) => `Defendant ${defendantParty.number} witnesses`, + partyWitnesses: (defendantParty: Party) => + `${StringHelper.capitalise(defendantParty.partyType)} ${defendantParty.number} witnesses`, }; export const radioButtons = { @@ -26,7 +27,7 @@ export const buttons = { addNewWitness: { title: 'Add new', selector: (claimantDefendantParty: Party) => - `div[id='${claimantDefendantParty.oldKey}DQWitnesses_details'] button[class='button write-collection-add-item__top']`, + `div[id='${claimantDefendantParty.oldKey}DQWitnessesSmallClaim_details'] button[class='button write-collection-add-item__top']`, }, }; @@ -36,31 +37,31 @@ export const inputs = { firstName: { label: 'First name', selector: (claimantDefendantParty: Party, claimantDefendantWitnessParty: Party) => - `#${claimantDefendantParty.oldKey}DQWitnesses_details_${claimantDefendantWitnessParty.number - 1}_firstName`, + `#${claimantDefendantParty.oldKey}DQWitnessesSmallClaim_details_${claimantDefendantWitnessParty.number - 1}_firstName`, }, lastName: { label: 'Last name', selector: (claimantDefendantParty: Party, claimantDefendantWitnessParty: Party) => - `#${claimantDefendantParty.oldKey}DQWitnesses_details_${claimantDefendantWitnessParty.number - 1}_lastName`, + `#${claimantDefendantParty.oldKey}DQWitnessesSmallClaim_details_${claimantDefendantWitnessParty.number - 1}_lastName`, }, - number: { + phoneNumber: { label: 'Phone number (Optional)', selector: (claimantDefendantParty: Party, claimantDefendantWitnessParty: Party) => - `#${claimantDefendantParty.oldKey}DQWitnessses_details_${claimantDefendantWitnessParty.number - 1}_phoneNumber`, + `#${claimantDefendantParty.oldKey}DQWitnessesSmallClaim_details_${claimantDefendantWitnessParty.number - 1}_phoneNumber`, }, email: { label: 'Email address (Optional)', selector: (claimantDefendantParty: Party, claimantDefendantWitnessParty: Party) => - `#${claimantDefendantParty.oldKey}DQWitnesses_details_${claimantDefendantWitnessParty.number - 1}_emailAddress`, + `#${claimantDefendantParty.oldKey}DQWitnessesSmallClaim_details_${claimantDefendantWitnessParty.number - 1}_emailAddress`, }, whatEvent: { label: 'What event did they witness?', selector: (claimantDefendantParty: Party, claimantDefendantWitnessParty: Party) => - `#${claimantDefendantParty.oldKey}DQWitnesses_details_${claimantDefendantWitnessParty.number - 1}_reasonForWitness`, + `#${claimantDefendantParty.oldKey}DQWitnessesSmallClaim_details_${claimantDefendantWitnessParty.number - 1}_reasonForWitness`, }, }, witnessNumber: { label: 'How many witnesses, including the claimant, will give evidence at the hearing?', - selector: '#applicant1ClaimWitnesses', + selector: (claimantDefendantParty: Party) => `#${claimantDefendantParty.oldKey}ClaimWitnesses`, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-page.ts new file mode 100644 index 0000000000..5e831efd27 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-page.ts @@ -0,0 +1,81 @@ +import { Page } from 'playwright-core'; +import { Party } from '../../../../../../../models/partys.ts'; +import BasePage from '../../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; +import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; +import ExuiPage from '../../../../../exui-page/exui-page.ts'; +import { buttons, inputs, radioButtons, subheadings } from './small-claim-witnesses-content.ts'; +import CaseDataHelper from '../../../../../../../helpers/case-data-helper.ts'; +import StringHelper from '../../../../../../../helpers/string-helper.ts'; + +@AllMethodsStep() +export default class SmallClaimWitnessesDefendantPage extends ExuiPage(BasePage) { + private claimantDefendantParty: Party; + private witnessParty: Party; + + constructor(page: Page, claimantDefendantParty: Party, witnessParty: Party) { + super(page); + this.claimantDefendantParty = claimantDefendantParty; + this.witnessParty = witnessParty; + } + + async verifyContent(ccdCaseData: CCDCaseData) { + await super.runVerifications( + [ + super.verifyHeadings(ccdCaseData), + super.expectSubheading(subheadings.witnesses), + super.expectSubheading(subheadings.partyWitnesses(this.claimantDefendantParty)), + super.expectText(radioButtons.witnessesRequired.label), + ], + { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, + ); + } + + async selectYes() { + await super.clickBySelector( + radioButtons.witnessesRequired.yes.selector(this.claimantDefendantParty), + ); + } + + async selectNo() { + await super.clickBySelector( + radioButtons.witnessesRequired.no.selector(this.claimantDefendantParty), + ); + } + + async addWitness() { + await super.clickBySelector(buttons.addNewWitness.selector(this.claimantDefendantParty)); + } + + async enterWitnessDetails() { + const defendantWitnessData = CaseDataHelper.buildWitnessData(this.witnessParty); + await super.inputText( + defendantWitnessData.firstName, + inputs.witnessDetails.firstName.selector(this.claimantDefendantParty, this.witnessParty), + ); + await super.inputText( + defendantWitnessData.lastName, + inputs.witnessDetails.lastName.selector(this.claimantDefendantParty, this.witnessParty), + ); + await super.inputText( + defendantWitnessData.phoneNumber, + inputs.witnessDetails.phoneNumber.selector(this.claimantDefendantParty, this.witnessParty), + ); + await super.inputText( + defendantWitnessData.emailAddress, + inputs.witnessDetails.email.selector(this.claimantDefendantParty, this.witnessParty), + ); + await super.inputText( + defendantWitnessData.reasonForWitness, + inputs.witnessDetails.whatEvent.selector(this.claimantDefendantParty, this.witnessParty), + ); + } + + async enterWitnessNumber() { + await super.inputText(1, inputs.witnessNumber.selector(this.claimantDefendantParty)); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/vulnerability-questions-spec/vulnerability-questions-spec-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/vulnerability-questions-spec/vulnerability-questions-spec-page.ts index ce44c7deb5..093a785d4d 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/vulnerability-questions-spec/vulnerability-questions-spec-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/vulnerability-questions-spec/vulnerability-questions-spec-page.ts @@ -15,7 +15,7 @@ export default class VulnerabilityQuestionsSpecPage extends ExuiPage(BasePage) { super(page); this.claimantDefendantParty = claimantDefendantParty; } - async verifyContent(ccdCaseData: CCDCaseData, defendantNumber: number) { + async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications( [ super.verifyHeadings(ccdCaseData), @@ -36,7 +36,7 @@ export default class VulnerabilityQuestionsSpecPage extends ExuiPage(BasePage) { async enterVulnerabilityAdjustments() { await super.inputText( - `Vulnerability adjustments for ${this.claimantDefendantParty.key}`, + `Vulnerability adjustments - ${this.claimantDefendantParty.key}`, inputs.vulnerabilityAdjustments.selector(this.claimantDefendantParty), ); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/witnesses-spec/witnesses-spec-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/witnesses-spec/witnesses-spec-content.ts new file mode 100644 index 0000000000..0924d75c26 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/witnesses-spec/witnesses-spec-content.ts @@ -0,0 +1,57 @@ +import { Party } from '../../../../../../../models/partys'; + +export const subheadings = { + witnesses: 'Witnesses', +}; + +export const radioButtons = { + witnessesRequired: { + label: 'Are there any witnesses who should attend the hearing?', + yes: { + label: 'Yes', + selector: (defendantParty: Party) => `#${defendantParty.oldKey}DQWitnessesRequiredSpec_Yes`, + }, + no: { + label: 'No', + selector: (defendantParty: Party) => `#${defendantParty.oldKey}DQWitnessesRequiredSpec_No`, + }, + }, +}; + +export const buttons = { + addNewWitness: { + title: 'Add new', + selector: (defendantParty: Party) => + `div[id='${defendantParty.oldKey}DQWitnessesDetailsSpec'] button[type='button']`, + }, +}; + +export const inputs = { + witnessDetails: { + firstName: { + label: 'First name', + selector: (defendantParty: Party, witnessParty: Party) => + `#${defendantParty.oldKey}DQWitnessesDetailsSpec_${witnessParty.number - 1}_firstName`, + }, + lastName: { + label: 'Last name', + selector: (defendantParty: Party, witnessParty: Party) => + `#${defendantParty.oldKey}DQWitnessesDetailsSpec_${witnessParty.number - 1}_lastName`, + }, + number: { + label: 'Phone number (Optional)', + selector: (defendantParty: Party, witnessParty: Party) => + `#${defendantParty.oldKey}DQWitnessesDetailsSpec_${witnessParty.number - 1}_phoneNumber`, + }, + email: { + label: 'Email address (Optional)', + selector: (defendantParty: Party, witnessParty: Party) => + `#${defendantParty.oldKey}DQWitnessesDetailsSpec_${witnessParty.number - 1}_email`, + }, + reasonForWitness: { + label: 'What event did they witness?', + selector: (defendantParty: Party, witnessParty: Party) => + `#${defendantParty.oldKey}DQWitnessesDetailsSpec_${witnessParty.number - 1}_reasonForWitness`, + }, + }, +}; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-defendant-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/witnesses-spec/witnesses-spec-page.ts similarity index 59% rename from playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-defendant-page.ts rename to playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/witnesses-spec/witnesses-spec-page.ts index af360799c8..3317f1ff01 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/small-claim-witnesses/small-claim-witnesses-defendant-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/lr-spec/witnesses-spec/witnesses-spec-page.ts @@ -1,15 +1,15 @@ import { Page } from 'playwright-core'; -import { Party } from '../../../../../../../models/partys.ts'; import BasePage from '../../../../../../../base/base-page.ts'; import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; import ExuiPage from '../../../../../exui-page/exui-page.ts'; -import { buttons, inputs, radioButtons, subheadings } from './small-claim-witnesses-content.ts'; -import CaseDataHelper from '../../../../../../../helpers/case-data-helper.ts'; +import { subheadings, buttons, inputs, radioButtons } from './witnesses-spec-content.ts'; +import { Party } from '../../../../../../../models/partys.ts'; import StringHelper from '../../../../../../../helpers/string-helper.ts'; +import CaseDataHelper from '../../../../../../../helpers/case-data-helper.ts'; @AllMethodsStep() -export default class SmallClaimWitnessesDefendantPage extends ExuiPage(BasePage) { +export default class WitnessesSpecPage extends ExuiPage(BasePage) { private defendantParty: Party; constructor(page: Page, defendantParty: Party) { @@ -21,43 +21,39 @@ export default class SmallClaimWitnessesDefendantPage extends ExuiPage(BasePage) await super.runVerifications( [ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.witnesses), - super.expectSubheading(subheadings.defendantWitnesses(this.defendantParty)), - super.expectText(radioButtons.witnessesRequired.label), + super.expectSubheading(subheadings.witnesses, { index: 0 }), + super.expectText(radioButtons.witnessesRequired.label, { index: 0 }), ], { axePageInsertName: StringHelper.capitalise(this.defendantParty.key) }, ); } - async selectYes() { + async addWitnesses() { await super.clickBySelector(radioButtons.witnessesRequired.yes.selector(this.defendantParty)); - } - - async selectNo() { - await super.clickBySelector(radioButtons.witnessesRequired.no.selector(this.defendantParty)); - } - - async addWitness() { await super.clickBySelector(buttons.addNewWitness.selector(this.defendantParty)); } - async enterWitnessDetails(defendantWitnessParty: Party) { - const defendantWitnessData = CaseDataHelper.buildWitnessData(defendantWitnessParty); + async enterWitnessDetails(witnessParty: Party) { + const witnessData = CaseDataHelper.buildWitnessData(witnessParty); + await super.inputText( + witnessData.firstName, + inputs.witnessDetails.firstName.selector(this.defendantParty, witnessParty), + ); await super.inputText( - defendantWitnessData.firstName, - inputs.witnessDetails.firstName.selector(this.defendantParty, defendantWitnessParty), + witnessData.lastName, + inputs.witnessDetails.lastName.selector(this.defendantParty, witnessParty), ); await super.inputText( - defendantWitnessData.lastName, - inputs.witnessDetails.lastName.selector(this.defendantParty, defendantWitnessParty), + witnessData.phoneNumber, + inputs.witnessDetails.number.selector(this.defendantParty, witnessParty), ); await super.inputText( - defendantWitnessData.emailAddress, - inputs.witnessDetails.email.selector(this.defendantParty, defendantWitnessParty), + witnessData.emailAddress, + inputs.witnessDetails.email.selector(this.defendantParty, witnessParty), ); await super.inputText( - defendantWitnessData.reasonForWitness, - inputs.witnessDetails.whatEvent.selector(this.defendantParty, defendantWitnessParty), + witnessData.reasonForWitness, + inputs.witnessDetails.reasonForWitness.selector(this.defendantParty, witnessParty), ); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/disclosure-of-non-electronic-documents/disclosure-of-non-electronic-documents-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/disclosure-of-non-electronic-documents/disclosure-of-non-electronic-documents-page.ts index 3fcf6f860e..20d1170202 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/disclosure-of-non-electronic-documents/disclosure-of-non-electronic-documents-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/disclosure-of-non-electronic-documents/disclosure-of-non-electronic-documents-page.ts @@ -24,8 +24,8 @@ export default class DisclosureOfNonElectronicDocumentsPage extends ExuiPage(Bas await super.runVerifications( [ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.disclosureOfDocs), - super.expectLabel(radioButtons.disclosureOfElectronicDocs.label), + super.expectSubheading(subheadings.disclosureOfDocs, { index: 0 }), + super.expectText(radioButtons.disclosureOfElectronicDocs.label, { index: 0 }), ], { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, ); @@ -35,10 +35,11 @@ export default class DisclosureOfNonElectronicDocumentsPage extends ExuiPage(Bas await super.clickBySelector( radioButtons.disclosureOfElectronicDocs.yes.selector(this.claimantDefendantParty), ); + await super.expectText(radioButtons.standardDisclosure.label, { index: 0 }); await super.clickBySelector( radioButtons.standardDisclosure.no.selector(this.claimantDefendantParty), ); - await super.expectLabel(inputs.bespokeDirections.label); + await super.expectLabel(inputs.bespokeDirections.label, { index: 0 }); await super.inputText( `No directions required - ${this.claimantDefendantParty.key}`, inputs.bespokeDirections.selector(this.claimantDefendantParty), diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/further-information/further-information-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/further-information/further-information-page.ts index a924fd840c..33b585404a 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/further-information/further-information-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/further-information/further-information-page.ts @@ -18,21 +18,27 @@ export default class FurtherInformationPage extends ExuiPage(BasePage) { async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications( - [super.verifyHeadings(ccdCaseData), super.expectSubheading(subheadings.furtherInformation)], + [ + super.verifyHeadings(ccdCaseData), + super.expectSubheading(subheadings.furtherInformation, { index: 0 }), + ], { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, ); } async selectYes() { await super.clickBySelector(radioButtons.yes.selector(this.claimantDefendantParty)); - await super.inputText('test', form.whatForForm.selector(this.claimantDefendantParty)); + await super.inputText( + `Further information - ${this.claimantDefendantParty.key}`, + form.whatForForm.selector(this.claimantDefendantParty), + ); } async selectNo() { await super.clickBySelector(radioButtons.no.selector(this.claimantDefendantParty)); } - async inputFurtherInformation() { + async enterFurtherInformation() { await super.inputText( 'test', form.furtherInformationForm.selector(this.claimantDefendantParty), diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-content.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-content.ts index a914453fac..f1435db5b6 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-content.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-content.ts @@ -23,12 +23,18 @@ export const radioButtons = { unavailableDateType: { label: 'Add a single date or a date range', single: { + label: 'Single Date', selector: (claimantDefendantParty: Party, unavailableDateNumber: number) => - `#${claimantDefendantParty.oldKey}DQHearingFastClaim_unavailableDate_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, + `#${claimantDefendantParty.oldKey}DQHearing_unavailableDates_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, + selectorFast: (claimantDefendantParty: Party, unavailableDateNumber: number) => + `#${claimantDefendantParty.oldKey}DQHearingFastClaim_unavailableDates_${unavailableDateNumber - 1}_unavailableDateType-SINGLE_DATE`, }, range: { + label: 'Date Range', selector: (claimantDefendantParty: Party, unavailableDateNumber: number) => - `#${claimantDefendantParty.oldKey}DQHearingFastClaim_unavailableDate_${unavailableDateNumber - 1}_unavailableDateType-DATE_RANGE`, + `#${claimantDefendantParty.oldKey}DQHearing_unavailableDates_${unavailableDateNumber - 1}_unavailableDateType-DATE_RANGE`, + selectorFast: (claimantDefendantParty: Party, unavailableDateNumber: number) => + `#${claimantDefendantParty.oldKey}DQHearingFastClaim_unavailableDates_${unavailableDateNumber - 1}_unavailableDateType-DATE_RANGE`, }, }, }; diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-fast-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-fast-page.ts new file mode 100644 index 0000000000..fc91605e34 --- /dev/null +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-fast-page.ts @@ -0,0 +1,69 @@ +import { Page } from 'playwright-core'; +import BasePage from '../../../../../../../base/base-page.ts'; +import { AllMethodsStep } from '../../../../../../../decorators/test-steps.ts'; +import CCDCaseData from '../../../../../../../models/ccd/ccd-case-data.ts'; +import ExuiPage from '../../../../../exui-page/exui-page.ts'; +import { buttons, inputs, radioButtons, subheadings } from './hearing-content.ts'; +import { Party } from '../../../../../../../models/partys.ts'; +import DateFragment from '../../../../../fragments/date/date-fragment.ts'; +import DateHelper from '../../../../../../../helpers/date-helper.ts'; + +@AllMethodsStep() +export default class HearingFastPage extends ExuiPage(BasePage) { + private dateFragment: DateFragment; + private claimantParty: Party; + + constructor(page: Page, dateFragment: DateFragment, claimantParty: Party) { + super(page); + this.dateFragment = dateFragment; + this.claimantParty = claimantParty; + this.dateFragment = dateFragment; + } + + async verifyContent(ccdCaseData: CCDCaseData) { + await super.runVerifications([ + super.verifyHeadings(ccdCaseData), + super.expectSubheading(subheadings.availability, { index: 0 }), + super.expectText(radioButtons.unavailableDateRequired.label, { index: 0 }), + ]); + } + + async selectYesAvailabilityRequired() { + await super.clickBySelector( + radioButtons.unavailableDateRequired.yes.selector(this.claimantParty), + ); + } + + async selectNoAvailabilityRequired() { + await super.clickBySelector( + radioButtons.unavailableDateRequired.no.selector(this.claimantParty), + ); + } + + async addNewUnavailableDate() { + await super.clickBySelector(buttons.addNewAvailability.selector(this.claimantParty)); + await super.expectSubheading(subheadings.unavailableDate, { index: 0 }); + } + + async selectSingleDate(unavailableDateNumber: number) { + await super.clickBySelector( + radioButtons.unavailableDateType.single.selector(this.claimantParty, unavailableDateNumber), + ); + const unavailableDate = DateHelper.addToToday({ months: 6 }); + await this.dateFragment.enterDate(unavailableDate, inputs.singleDate.selectorKey); + } + + async selectDateRange(unavailableDateNumber: number) { + await super.clickBySelector( + radioButtons.unavailableDateType.range.selector(this.claimantParty, unavailableDateNumber), + ); + const unavailableDateFrom = DateHelper.addToToday({ months: 6 }); + const unavailableDateTo = DateHelper.addToToday({ months: 7 }); + await this.dateFragment.enterDate(unavailableDateFrom, inputs.dateFrom.selectorKey); + await this.dateFragment.enterDate(unavailableDateTo, inputs.dateTo.selectorKey); + } + + async submit() { + await super.retryClickSubmit(); + } +} diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-page.ts index c68f6f55ed..99bf82f4fc 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/hearing/hearing-page.ts @@ -11,45 +11,43 @@ import DateHelper from '../../../../../../../helpers/date-helper.ts'; @AllMethodsStep() export default class HearingPage extends ExuiPage(BasePage) { private dateFragment: DateFragment; - private claimantDefendantParty: Party; + private claimantParty: Party; - constructor(page: Page, dateFragment: DateFragment, claimantDefendantParty: Party) { + constructor(page: Page, dateFragment: DateFragment, claimantParty: Party) { super(page); this.dateFragment = dateFragment; - this.claimantDefendantParty = claimantDefendantParty; + this.claimantParty = claimantParty; + this.dateFragment = dateFragment; } async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications([ super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.availability), - super.expectText(radioButtons.unavailableDateRequired.label), + super.expectSubheading(subheadings.availability, { index: 0 }), + super.expectText(radioButtons.unavailableDateRequired.label, { index: 0 }), ]); } async selectYesAvailabilityRequired() { await super.clickBySelector( - radioButtons.unavailableDateRequired.yes.selector(this.claimantDefendantParty), + radioButtons.unavailableDateRequired.yes.selector(this.claimantParty), ); } async selectNoAvailabilityRequired() { await super.clickBySelector( - radioButtons.unavailableDateRequired.no.selector(this.claimantDefendantParty), + radioButtons.unavailableDateRequired.no.selector(this.claimantParty), ); } async addNewUnavailableDate() { - await super.clickBySelector(buttons.addNewAvailability.selector(this.claimantDefendantParty)); - await super.expectSubheading(subheadings.unavailableDate); + await super.clickBySelector(buttons.addNewAvailability.selector(this.claimantParty)); + await super.expectSubheading(subheadings.unavailableDate, { index: 0 }); } async selectSingleDate(unavailableDateNumber: number) { await super.clickBySelector( - radioButtons.unavailableDateType.single.selector( - this.claimantDefendantParty, - unavailableDateNumber, - ), + radioButtons.unavailableDateType.single.selector(this.claimantParty, unavailableDateNumber), ); const unavailableDate = DateHelper.addToToday({ months: 6 }); await this.dateFragment.enterDate(unavailableDate, inputs.singleDate.selectorKey); @@ -57,10 +55,7 @@ export default class HearingPage extends ExuiPage(BasePage) { async selectDateRange(unavailableDateNumber: number) { await super.clickBySelector( - radioButtons.unavailableDateType.range.selector( - this.claimantDefendantParty, - unavailableDateNumber, - ), + radioButtons.unavailableDateType.range.selector(this.claimantParty, unavailableDateNumber), ); const unavailableDateFrom = DateHelper.addToToday({ months: 6 }); const unavailableDateTo = DateHelper.addToToday({ months: 7 }); @@ -70,5 +65,6 @@ export default class HearingPage extends ExuiPage(BasePage) { async submit() { await super.retryClickSubmit(); + await super.retryClickSubmit(); } } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/requested-court/requested-court-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/requested-court/requested-court-page.ts index 526516f0bb..204776aef8 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/requested-court/requested-court-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/requested-court/requested-court-page.ts @@ -7,6 +7,7 @@ import { dropdowns, inputs, subheadings } from './requested-court-content.ts'; import RemoteHearingFragment from '../../../../../fragments/remote-hearing/remote-hearing-fragment.ts'; import { Party } from '../../../../../../../models/partys.ts'; import StringHelper from '../../../../../../../helpers/string-helper.ts'; +import preferredCourts from '../../../../../../../config/preferred-courts.ts'; @AllMethodsStep() export default class RequestedCourtPage extends ExuiPage(BasePage) { @@ -34,14 +35,14 @@ export default class RequestedCourtPage extends ExuiPage(BasePage) { async selectCourtLocation() { await super.selectFromDropdown( - dropdowns.courtLocations.options[0], + preferredCourts[this.defendantParty.key].default, dropdowns.courtLocations.selector(this.defendantParty), ); } async enterPreferredCourtReason() { await super.inputText( - `Test reason - ${this.defendantParty.key}`, + `Reason for preferred court - ${this.defendantParty.key}`, inputs.preferredCourtReason.selector(this.defendantParty), ); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/vulnerability-questions/vulnerability-questions-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/vulnerability-questions/vulnerability-questions-page.ts index 037678d094..bd66eece68 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/vulnerability-questions/vulnerability-questions-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/directions-questionaire/unspec/vulnerability-questions/vulnerability-questions-page.ts @@ -20,7 +20,7 @@ export default class VulnerabilityQuestionsPage extends ExuiPage(BasePage) { super(page); this.claimantDefendantParty = claimantDefendantParty; } - async verifyContent(ccdCaseData: CCDCaseData, defendantNumber: number) { + async verifyContent(ccdCaseData: CCDCaseData) { await super.runVerifications( [ super.verifyHeadings(ccdCaseData), @@ -43,7 +43,7 @@ export default class VulnerabilityQuestionsPage extends ExuiPage(BasePage) { async enterVulnerabilityAdjustments() { await super.inputText( - `Vulnerability adjustments for ${this.claimantDefendantParty.key}`, + `Vulnerability adjustments - ${this.claimantDefendantParty.key}`, inputs.vulnerabilityAdjustments.selector(this.claimantDefendantParty), ); } diff --git a/playwright-e2e/pages/exui/solicitor-events/response/mediation/mediation-availability/mediation-availability-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/mediation/mediation-availability/mediation-availability-page.ts index 8cf18cde05..9114c6a803 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/mediation/mediation-availability/mediation-availability-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/mediation/mediation-availability/mediation-availability-page.ts @@ -13,6 +13,7 @@ import { } from './mediation-availability-content.ts'; import DateHelper from '../../../../../../helpers/date-helper.ts'; import DateFragment from '../../../../fragments/date/date-fragment.ts'; +import StringHelper from '../../../../../../helpers/string-helper.ts'; @AllMethodsStep() export default class MediationAvailabilityPage extends ExuiPage(BasePage) { @@ -26,13 +27,16 @@ export default class MediationAvailabilityPage extends ExuiPage(BasePage) { } async verifyContent(ccdCaseData: CCDCaseData) { - await super.runVerifications([ - super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings.mediationAvailability), - super.expectText(paragraphs.descriptionText), - super.expectText(radioButtons.mediationAvailability.label), - super.expectText(radioButtons.mediationAvailability.hintText), - ]); + await super.runVerifications( + [ + super.verifyHeadings(ccdCaseData), + super.expectSubheading(subheadings.mediationAvailability), + super.expectText(paragraphs.descriptionText), + super.expectText(radioButtons.mediationAvailability.label), + super.expectText(radioButtons.mediationAvailability.hintText), + ], + { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, + ); } async selectYes() { diff --git a/playwright-e2e/pages/exui/solicitor-events/response/mediation/mediation-contact-information/mediation-contact-information-page.ts b/playwright-e2e/pages/exui/solicitor-events/response/mediation/mediation-contact-information/mediation-contact-information-page.ts index ef2f469c73..ad5118ac97 100644 --- a/playwright-e2e/pages/exui/solicitor-events/response/mediation/mediation-contact-information/mediation-contact-information-page.ts +++ b/playwright-e2e/pages/exui/solicitor-events/response/mediation/mediation-contact-information/mediation-contact-information-page.ts @@ -6,6 +6,7 @@ import CCDCaseData from '../../../../../../models/ccd/ccd-case-data.ts'; import ExuiPage from '../../../../exui-page/exui-page.ts'; import { subheadings, paragraphs, inputs } from './mediation-contact-information-content.ts'; import CaseDataHelper from '../../../../../../helpers/case-data-helper.ts'; +import StringHelper from '../../../../../../helpers/string-helper.ts'; @AllMethodsStep() export default class MediationContactInformationPage extends ExuiPage(BasePage) { @@ -19,16 +20,19 @@ export default class MediationContactInformationPage extends ExuiPage(BasePage) } async verifyContent(ccdCaseData: CCDCaseData) { - await super.runVerifications([ - super.verifyHeadings(ccdCaseData), - super.expectSubheading(subheadings, { index: 0 }), - super.expectText(paragraphs.description1), - super.expectText(paragraphs.description2), - super.expectText(inputs.mediationFriendDetails.firstName.label), - super.expectText(inputs.mediationFriendDetails.lastName.label), - super.expectText(inputs.mediationFriendDetails.emailAddress.label), - super.expectText(inputs.mediationFriendDetails.telephoneNumber.label), - ]); + await super.runVerifications( + [ + super.verifyHeadings(ccdCaseData), + super.expectSubheading(subheadings, { index: 0 }), + super.expectText(paragraphs.description1), + super.expectText(paragraphs.description2), + super.expectText(inputs.mediationFriendDetails.firstName.label), + super.expectText(inputs.mediationFriendDetails.lastName.label), + super.expectText(inputs.mediationFriendDetails.emailAddress.label), + super.expectText(inputs.mediationFriendDetails.telephoneNumber.label), + ], + { axePageInsertName: StringHelper.capitalise(this.claimantDefendantParty.key) }, + ); } async enterMediationContactDetails() { diff --git a/playwright-e2e/pages/idam/login/login-page-content.ts b/playwright-e2e/pages/idam/login/login-page-content.ts index 1530ba2310..551ebaf8da 100644 --- a/playwright-e2e/pages/idam/login/login-page-content.ts +++ b/playwright-e2e/pages/idam/login/login-page-content.ts @@ -2,7 +2,7 @@ export const heading = 'Sign in or create an account'; export const inputs = { email: { - label: 'Email Address', + label: 'Email address', selector: '#username', }, password: { diff --git a/playwright-e2e/playwright-fixtures/ui/page-expect-fixtures.ts b/playwright-e2e/playwright-fixtures/ui/page-expect-fixtures.ts index 2ae0f8ea51..4653bbb185 100644 --- a/playwright-e2e/playwright-fixtures/ui/page-expect-fixtures.ts +++ b/playwright-e2e/playwright-fixtures/ui/page-expect-fixtures.ts @@ -188,38 +188,43 @@ export const expect = baseExpect let pass: boolean; let matcherResult: any; let locatorCount: number; + let failureCount = 0; try { + locatorCount = await locator.count(); if (count !== null) { await baseExpect(locator).toHaveCount(count, { timeout: 5000 }); } else { await baseExpect(locator).not.toHaveCount(0, { timeout: 5000 }); } - locatorCount = await locator.count(); const promises = []; for (let i = 0; i < locatorCount; i++) { promises.push(baseExpect(locator.nth(i)).toBeVisible({ timeout: options.timeout })); } - await Promise.all(promises); + const results = await Promise.allSettled(promises); + results.forEach((result) => { + if (result.status === 'rejected') failureCount++; + }); + const firstFailedResult = results.filter((result) => result !== undefined).find((result: any) => (result.status = 'rejected')) as any; + if (firstFailedResult) throw firstFailedResult.reason; pass = true; } catch (error) { pass = false; matcherResult = error.matcherResult; } - const message = pass ? () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) + '\n\n' + `Locator: ${locator}\n` + - `Expected: ${this.isNot ? 'not' : ''}${count !== null ? count : 'multiple' + ' '}matching locator(s) to be visible\n` + - (matcherResult ? `Received: ${locatorCount === undefined ? 'locator count ' + this.utils.printReceived(0) : this.utils.printReceived(matcherResult.actual)}` : '') + `Expected: ${this.isNot ? 'not' : ''}${count !== null ? count + ' ' : 'multiple '}matching locator(s) to be visible\n` + + (matcherResult ? `Received: ${locatorCount === undefined ? 0 : locatorCount} locator(s)${locatorCount !== count ? '' : ` and ${failureCount}`} ${failureCount > 1 ? 'were' : 'was'} not visible` : '') : () => this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) + '\n\n' + `Locator: ${locator}\n` + - `Expected: ${this.isNot ? 'not' : ''}${count !== null ? count : 'multiple' + ' '}matching locator(s) to be visible\n` + - (matcherResult ? `Received: ${locatorCount === undefined ? 'locator count ' + this.utils.printReceived(0) : this.utils.printReceived(matcherResult.actual)}` : ''); + `Expected: ${this.isNot ? 'not' : ''}${count !== null ? count + ' ' : 'multiple' + ' '}matching locator(s) to be visible\n` + + (matcherResult ? `Received: ${locatorCount === undefined ? 0 : locatorCount} locator(s)${locatorCount !== count ? '' : ` and ${failureCount}`} ${failureCount > 1 ? 'were' : 'was'} not visible` : ''); return { message, @@ -228,6 +233,7 @@ export const expect = baseExpect actual: matcherResult?.actual }; }, + async allToBeHidden(locator: Locator, options?: { timeout?: number }) { const assertionName = 'allToBeHidden'; let pass: boolean; @@ -246,7 +252,7 @@ export const expect = baseExpect if (result.status === 'rejected') failureCount++; }); if (failureCount) { - const firstResult = results.find((result) => (result.status = 'rejected')) as any; + const firstResult = results.filter((result) => result !== undefined).find((result: any) => (result.status = 'rejected')) as any; throw firstResult.reason; } pass = true; @@ -256,9 +262,17 @@ export const expect = baseExpect } const message = pass ? () => - this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) + '\n\n' + `Locator: ${locator}\n` + `Expected: ${this.isNot ? 'not ' : ''}all locator(s) to be hidden\n` + (matcherResult ? `Received: ${locatorCount} locator(s) and ${failureCount} were visible` : '') + this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) + + '\n\n' + + `Locator: ${locator}\n` + + `Expected: ${this.isNot ? 'not ' : ''}all locator(s) to be hidden\n` + + (matcherResult ? `Received: ${locatorCount} locator(s) and ${failureCount} ${failureCount > 1 ? 'were' : 'was'} visible` : '') : () => - this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) + '\n\n' + `Locator: ${locator}\n` + `Expected: ${this.isNot ? 'not ' : ''}all locator(s) to be hidden\n` + (matcherResult ? `Received: ${locatorCount} locator(s) and ${failureCount} were visible` : ''); + this.utils.matcherHint(assertionName, undefined, undefined, { isNot: this.isNot }) + + '\n\n' + + `Locator: ${locator}\n` + + `Expected: ${this.isNot ? 'not ' : ''}all locator(s) to be hidden\n` + + (matcherResult ? `Received: ${locatorCount} locator(s) and ${failureCount} ${failureCount > 1 ? 'were' : 'was'} visible` : ''); return { message, diff --git a/playwright-e2e/playwright-fixtures/ui/page-factory-fixtures.ts b/playwright-e2e/playwright-fixtures/ui/page-factory-fixtures.ts index 9c39c303cf..3092130776 100644 --- a/playwright-e2e/playwright-fixtures/ui/page-factory-fixtures.ts +++ b/playwright-e2e/playwright-fixtures/ui/page-factory-fixtures.ts @@ -9,6 +9,8 @@ import DefendantResponsePageFactory from '../../pages/exui/solicitor-events/resp import ClaimantResponsePageFactory from '../../pages/exui/solicitor-events/response/claimant-response/claimant-response-page-factory'; import InformAgreedExtensionDatePageFactory from '../../pages/exui/solicitor-events/inform-agreed-extension-date/inform-agreed-extension-date-page-factory'; import CreateCaseFlagsPageFactory from '../../pages/exui/caseworker-events/create-case-flags/create-case-flags-page-factory'; +import AcknowledgeClaimPageFactory from '../../pages/exui/solicitor-events/acknowledge-claim/acknowledge-claim-page-factory'; +import AddDefendantLitigationFriendPageFactory from '../../pages/exui/solicitor-events/add-defendant-litigation-friend/add-defendant-litigation-friend-page-factory'; type PageFactoryFixtures = { _pageUtilsFactory: PageUtilsFactory; @@ -21,6 +23,8 @@ type PageFactoryFixtures = { _defendantResponsePageFactory: DefendantResponsePageFactory; _claimantResponsePageFactory: ClaimantResponsePageFactory; _createCaseFlagsPageFactory: CreateCaseFlagsPageFactory; + _acknowledgeClaimPageFactory: AcknowledgeClaimPageFactory; + _addDefendantLitigationFriendPageFactory: AddDefendantLitigationFriendPageFactory; }; export const test = base.extend({ @@ -53,5 +57,11 @@ export const test = base.extend({ }, _createCaseFlagsPageFactory: async ({ page }, use) => { await use(new CreateCaseFlagsPageFactory(page)); + }, + _acknowledgeClaimPageFactory: async ({ page }, use) => { + await use(new AcknowledgeClaimPageFactory(page)); + }, + _addDefendantLitigationFriendPageFactory: async ({ page }, use) => { + await use(new AddDefendantLitigationFriendPageFactory(page)); } }); diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/acknowledge-claim-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/acknowledge-claim-steps.ts new file mode 100644 index 0000000000..f4bfe83ed0 --- /dev/null +++ b/playwright-e2e/steps/ui/exui/solicitor-events/acknowledge-claim-steps.ts @@ -0,0 +1,21 @@ +import BaseExuiSteps from '../../../../base/base-exui-steps'; +import { AllMethodsStep } from '../../../../decorators/test-steps'; +import TestData from '../../../../models/test-data'; +import ExuiDashboardPageFactory from '../../../../pages/exui/exui-dashboard/exui-dashboard-page-factory'; +import AcknowledgeClaimPageFactory from '../../../../pages/exui/solicitor-events/acknowledge-claim/acknowledge-claim-page-factory'; +import RequestsFactory from '../../../../requests/requests-factory'; + +@AllMethodsStep() +export default class AcknowledgeClaimSteps extends BaseExuiSteps { + private acknowledgeClaimPageFactory: AcknowledgeClaimPageFactory; + + constructor( + acknowledgeClaimPageFactory: AcknowledgeClaimPageFactory, + exuiDashboardPageFactory: ExuiDashboardPageFactory, + requestsFactory: RequestsFactory, + testData: TestData, + ) { + super(exuiDashboardPageFactory, requestsFactory, testData); + this.acknowledgeClaimPageFactory = acknowledgeClaimPageFactory; + } +} diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/add-defendant-litigation-friend-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/add-defendant-litigation-friend-steps.ts new file mode 100644 index 0000000000..8264726403 --- /dev/null +++ b/playwright-e2e/steps/ui/exui/solicitor-events/add-defendant-litigation-friend-steps.ts @@ -0,0 +1,21 @@ +import BaseExuiSteps from '../../../../base/base-exui-steps'; +import { AllMethodsStep } from '../../../../decorators/test-steps'; +import TestData from '../../../../models/test-data'; +import ExuiDashboardPageFactory from '../../../../pages/exui/exui-dashboard/exui-dashboard-page-factory'; +import RequestsFactory from '../../../../requests/requests-factory'; +import AddDefendantLitigationFriendPageFactory from '../../../../pages/exui/solicitor-events/add-defendant-litigation-friend/add-defendant-litigation-friend-page-factory'; + +@AllMethodsStep() +export default class AddDefendantLitigationFriendSteps extends BaseExuiSteps { + private addDefendantLitigationFriendPageFactory: AddDefendantLitigationFriendPageFactory; + + constructor( + addDefendantLitigationFriendPageFactory: AddDefendantLitigationFriendPageFactory, + exuiDashboardPageFactory: ExuiDashboardPageFactory, + requestsFactory: RequestsFactory, + testData: TestData, + ) { + super(exuiDashboardPageFactory, requestsFactory, testData); + this.addDefendantLitigationFriendPageFactory = addDefendantLitigationFriendPageFactory; + } +} diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-spec-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-spec-steps.ts index 827e76204b..12ad2a19b9 100644 --- a/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-spec-steps.ts +++ b/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-spec-steps.ts @@ -1,11 +1,14 @@ import BaseExuiSteps from '../../../../../base/base-exui-steps'; -import { AllMethodsStep } from '../../../../../decorators/test-steps'; +import { Step } from '../../../../../decorators/test-steps'; import TestData from '../../../../../models/test-data'; import ExuiDashboardPageFactory from '../../../../../pages/exui/exui-dashboard/exui-dashboard-page-factory'; import ClaimantResponsePageFactory from '../../../../../pages/exui/solicitor-events/response/claimant-response/claimant-response-page-factory'; import RequestsFactory from '../../../../../requests/requests-factory'; +import ccdEvents from '../../../../../constants/ccd-events.ts'; +import { claimantSolicitorUser } from '../../../../../config/users/exui-users.ts'; +import partys from '../../../../../constants/partys.ts'; -@AllMethodsStep() +const classKey = 'ClaimantResponseSpecSteps'; export default class ClaimantResponseSpecSteps extends BaseExuiSteps { private claimantResponsePageFactory: ClaimantResponsePageFactory; @@ -18,4 +21,266 @@ export default class ClaimantResponseSpecSteps extends BaseExuiSteps { super(exuiDashboardPageFactory, requestsFactory, testData); this.claimantResponsePageFactory = claimantResponsePageFactory; } + + @Step(classKey) + async FastTrack1v1() { + await this.retryExuiEvent( + async () => { + await this.processRespondentResponseSpecPage(); + await this.processDefenceDocumentSpecPage(); + + const { fileDirectionsQuestionairePage } = this.claimantResponsePageFactory; + await fileDirectionsQuestionairePage.verifyContent(this.ccdCaseData); + await fileDirectionsQuestionairePage.enterDetails(); + await fileDirectionsQuestionairePage.submit(); + + const { fixedRecoverableCostsPage } = this.claimantResponsePageFactory; + await fixedRecoverableCostsPage.verifyContent(this.ccdCaseData); + await fixedRecoverableCostsPage.selectYes(); + await fixedRecoverableCostsPage.submit(); + + const { disclosureOfElectronicDocumentsPage } = this.claimantResponsePageFactory; + await disclosureOfElectronicDocumentsPage.verifyContent(this.ccdCaseData); + await disclosureOfElectronicDocumentsPage.enterDetails(); + await disclosureOfElectronicDocumentsPage.submit(); + + const { disclosureOfNonElectronicDocumentsSpecPage } = this.claimantResponsePageFactory; + await disclosureOfNonElectronicDocumentsSpecPage.verifyContent(this.ccdCaseData); + await disclosureOfNonElectronicDocumentsSpecPage.enterDetails(); + await disclosureOfNonElectronicDocumentsSpecPage.submit(); + + const { disclosureReportPage } = this.claimantResponsePageFactory; + await disclosureReportPage.verifyContent(this.ccdCaseData); + await disclosureReportPage.enterDetails(); + await disclosureReportPage.submit(); + + await this.processExpertsPage(); + await this.processWitnessesPage(); + await this.processLanguagePage(); + await this.processHearingSpecFastTrackPage(); + await this.processApplicantCourtLocationLRSpecPage(); + await this.processHearingSupportPage(); + await this.processVulnerabilityQuestionsSpecPage(); + + const { applicationPage } = this.claimantResponsePageFactory; + await applicationPage.verifyContent(this.ccdCaseData); + await applicationPage.selectYes(); + await applicationPage.enterAdditionalInformation(); + await applicationPage.submit(); + + await this.processStatementOfTruthPage(); + await this.processSubmitPage(); + await this.processConfirmPage(); + }, + ccdEvents.CLAIMANT_RESPONSE_SPEC, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + @Step(classKey) + async SmallTrack1v1() { + await this.retryExuiEvent( + async () => { + await this.processRespondentResponseSpecPage(); + await this.processDefenceDocumentSpecPage(); + + await this.processSmallClaimExperts(); + await this.processSmallClaimWitnesses(); + await this.smallClaimSpec(); + }, + ccdEvents.CLAIMANT_RESPONSE_SPEC, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + async SmallTrack2v1() { + await this.retryExuiEvent( + async () => { + const { respondentResponse2v1SpecPage } = this.claimantResponsePageFactory; + await respondentResponse2v1SpecPage.selectYes(); + await respondentResponse2v1SpecPage.submit(); + + await this.processDefenceDocumentSpecPage(); + await this.processSmallClaimExperts2v1(); + await this.processSmallClaimWitnesses(); + await this.smallClaimSpec(); + }, + ccdEvents.CLAIMANT_RESPONSE_SPEC, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + @Step(classKey) + async SmallTrack1v2SS() { + await this.retryExuiEvent( + async () => { + const { respondentResponse1v2SSSpecPage } = this.claimantResponsePageFactory; + await respondentResponse1v2SSSpecPage.selectYes(); + await respondentResponse1v2SSSpecPage.submit(); + + await this.processDefenceDocumentSpecPage(); + await this.processSmallClaimExperts(); + await this.processSmallClaimWitnesses(); + await this.smallClaimSpec(); + }, + ccdEvents.CLAIMANT_RESPONSE_SPEC, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + @Step(classKey) + async SmallTrack1v2DS() { + await this.retryExuiEvent( + async () => { + const { respondentResponse1v2DSSpecPage } = this.claimantResponsePageFactory; + await respondentResponse1v2DSSpecPage.selectYes(); + await respondentResponse1v2DSSpecPage.submit(); + + await this.processDefenceDocumentSpecPage(); + await this.processSmallClaimExperts(); + await this.processSmallClaimWitnesses(); + await this.smallClaimSpec(); + }, + ccdEvents.CLAIMANT_RESPONSE_SPEC, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + private async smallClaimSpec() { + await this.processLanguagePage(); + await this.processHearingSpecSmallClaimPage(); + await this.processApplicantCourtLocationLRSpecPage(); + await this.processHearingSupportPage(); + await this.processVulnerabilityQuestionsSpecPage(); + await this.processStatementOfTruthPage(); + await this.processSubmitPage(); + await this.processConfirmPage(); + } + + private async processRespondentResponseSpecPage() { + const { respondentResponseSpecPage } = this.claimantResponsePageFactory; + await respondentResponseSpecPage.selectYes(); + await respondentResponseSpecPage.submit(); + } + + private async processDefenceDocumentSpecPage() { + const { defenceResponseDocumentSpecPage } = this.claimantResponsePageFactory; + await defenceResponseDocumentSpecPage.uploadDoc(); + await defenceResponseDocumentSpecPage.submit(); + } + + private async processExpertsPage() { + const { expertsPage } = this.claimantResponsePageFactory; + await expertsPage.verifyContent(this.ccdCaseData); + await expertsPage.useExperts(); + await expertsPage.addNewExpert(); + await expertsPage.enterExpertDetails(partys.CLAIMANT_EXPERT_1); + await expertsPage.submit(); + } + + private async processSmallClaimExperts() { + const { smallClaimExpertsPage } = this.claimantResponsePageFactory; + await smallClaimExpertsPage.verifyContent(this.ccdCaseData); + await smallClaimExpertsPage.selectYesExperts(); + await smallClaimExpertsPage.enterExpertDetails(); + await smallClaimExpertsPage.submit(); + } + + private async processSmallClaimExperts2v1() { + const { smallClaimExperts2v1Page } = this.claimantResponsePageFactory; + await smallClaimExperts2v1Page.verifyContent(this.ccdCaseData); + await smallClaimExperts2v1Page.selectYesExperts(); + await smallClaimExperts2v1Page.enterExpertDetails(); + await smallClaimExperts2v1Page.submit(); + } + + private async processWitnessesPage() { + const { witnessesPage } = this.claimantResponsePageFactory; + await witnessesPage.verifyContent(this.ccdCaseData); + await witnessesPage.addWitness(); + await witnessesPage.enterWitnessDetails(partys.CLAIMANT_WITNESS_1); + await witnessesPage.submit(); + } + + private async processSmallClaimWitnesses() { + const { smallClaimWitnessesPage } = this.claimantResponsePageFactory; + await smallClaimWitnessesPage.verifyContent(this.ccdCaseData); + await smallClaimWitnessesPage.selectYes(); + await smallClaimWitnessesPage.addWitness(); + await smallClaimWitnessesPage.enterWitnessDetails(); + await smallClaimWitnessesPage.enterWitnessNumber(); + await smallClaimWitnessesPage.submit(); + } + + private async processLanguagePage() { + const { languagePage } = this.claimantResponsePageFactory; + await languagePage.verifyContent(this.ccdCaseData); + await languagePage.selectEnglishAndWelsh(); + await languagePage.submit(); + } + + private async processHearingSpecSmallClaimPage() { + const { hearingSpecPage } = this.claimantResponsePageFactory; + await hearingSpecPage.verifyContent(); + await hearingSpecPage.selectYesUnavailabilityRequired(); + await hearingSpecPage.addNewUnavailableDate(); + await hearingSpecPage.selectSingleDate(1); + await hearingSpecPage.submit(); + } + + private async processHearingSpecFastTrackPage() { + const { hearingFastSpecPage } = this.claimantResponsePageFactory; + await hearingFastSpecPage.verifyContent(); + await hearingFastSpecPage.selectYesUnavailabilityRequired(); + await hearingFastSpecPage.addNewUnavailableDate(); + await hearingFastSpecPage.selectSingleDateFastTrack(1); + await hearingFastSpecPage.submit(); + } + private async processApplicantCourtLocationLRSpecPage() { + const { applicantCourtLocationLRSpecPage } = this.claimantResponsePageFactory; + await applicantCourtLocationLRSpecPage.verifyContent(this.ccdCaseData); + await applicantCourtLocationLRSpecPage.selectCourtLocation(); + await applicantCourtLocationLRSpecPage.selectNoRemoteHearing(); + await applicantCourtLocationLRSpecPage.submit(); + } + + private async processHearingSupportPage() { + const { hearingSupportPage } = this.claimantResponsePageFactory; + await hearingSupportPage.verifyContent(this.ccdCaseData); + await hearingSupportPage.selectYes(); + await hearingSupportPage.enterSupportRequirementsAdditional(); + await hearingSupportPage.submit(); + } + + private async processVulnerabilityQuestionsSpecPage() { + const { vulnerabilityQuestionsSpecPage } = this.claimantResponsePageFactory; + await vulnerabilityQuestionsSpecPage.verifyContent(this.ccdCaseData); + await vulnerabilityQuestionsSpecPage.selectYes(); + await vulnerabilityQuestionsSpecPage.enterVulnerabilityAdjustments(); + await vulnerabilityQuestionsSpecPage.submit(); + } + + private async processStatementOfTruthPage() { + const { statementOfTruthClaimantResponsePage } = this.claimantResponsePageFactory; + await statementOfTruthClaimantResponsePage.verifyContent(this.ccdCaseData); + await statementOfTruthClaimantResponsePage.enterDetails(); + await statementOfTruthClaimantResponsePage.submit(); + } + + private async processSubmitPage() { + const { submitClaimantResponsePage } = this.claimantResponsePageFactory; + await submitClaimantResponsePage.verifyContent(this.ccdCaseData); + await submitClaimantResponsePage.submit(); + } + + private async processConfirmPage() { + const { confirmClaimantResponseSpecPage } = this.claimantResponsePageFactory; + await confirmClaimantResponseSpecPage.verifyContent(this.ccdCaseData); + await confirmClaimantResponseSpecPage.submit(); + } } diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-steps.ts index ec8610edf2..b3d097e31f 100644 --- a/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-steps.ts +++ b/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-steps.ts @@ -1,10 +1,12 @@ import BaseExuiSteps from '../../../../../base/base-exui-steps'; -import BaseSteps from '../../../../../base/base-steps'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; import TestData from '../../../../../models/test-data'; import ExuiDashboardPageFactory from '../../../../../pages/exui/exui-dashboard/exui-dashboard-page-factory'; import ClaimantResponsePageFactory from '../../../../../pages/exui/solicitor-events/response/claimant-response/claimant-response-page-factory'; import RequestsFactory from '../../../../../requests/requests-factory'; +import ccdEvents from '../../../../../constants/ccd-events.ts'; +import { civilAdminUser, claimantSolicitorUser } from '../../../../../config/users/exui-users.ts'; +import partys from '../../../../../constants/partys.ts'; @AllMethodsStep() export default class ClaimantResponseSteps extends BaseExuiSteps { @@ -19,4 +21,208 @@ export default class ClaimantResponseSteps extends BaseExuiSteps { super(exuiDashboardPageFactory, requestsFactory, testData); this.claimantResponsePageFactory = claimantResponsePageFactory; } + + async FastTrack1v1() { + await this.retryExuiEvent( + async () => { + await this.processRespondentResponsePage(); + + await this.processDefenceResponseDocumentPage(); + + const { fileDirectionsQuestionairePage } = this.claimantResponsePageFactory; + await fileDirectionsQuestionairePage.verifyContent(this.ccdCaseData); + await fileDirectionsQuestionairePage.enterDetails(); + await fileDirectionsQuestionairePage.submit(); + + const { fixedRecoverableCostsPage } = this.claimantResponsePageFactory; + await fixedRecoverableCostsPage.verifyContent(this.ccdCaseData); + await fixedRecoverableCostsPage.selectYes(); + await fixedRecoverableCostsPage.submit(); + + const { disclosureOfNonElectronicDocumentsPage } = this.claimantResponsePageFactory; + await disclosureOfNonElectronicDocumentsPage.verifyContent(this.ccdCaseData); + await disclosureOfNonElectronicDocumentsPage.enterDetails(); + await disclosureOfNonElectronicDocumentsPage.submit(); + + await this.processDirectionsQuestionairePages(); + }, + ccdEvents.CLAIMANT_RESPONSE_SPEC, + civilAdminUser, + { verifySuccessEvent: false }, + ); + } + + async SmallClaim1v1() { + await this.retryExuiEvent( + async () => { + await this.processRespondentResponsePage(); + await this.processDefenceResponseDocumentPage(); + await this.processDirectionsQuestionairePages(); + }, + ccdEvents.CLAIMANT_RESPONSE, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + async SmallClaim2v1() { + await this.retryExuiEvent( + async () => { + const { respondentResponse2v1Page } = this.claimantResponsePageFactory; + await respondentResponse2v1Page.verifyContent(this.ccdCaseData); + await respondentResponse2v1Page.selectYesBothClaimants(); + await respondentResponse2v1Page.submit(); + + await this.processDefenceResponseDocumentPage(); + await this.processDirectionsQuestionairePages(); + }, + ccdEvents.CLAIMANT_RESPONSE, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + async SmallClaim1v2SS() { + await this.retryExuiEvent( + async () => { + await this.processResponse1v2Pages(); + await this.processDirectionsQuestionairePages(); + }, + ccdEvents.CLAIMANT_RESPONSE, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + async SmallClaim1v2DS() { + await this.retryExuiEvent( + async () => { + await this.processResponse1v2Pages(); + await this.processDirectionsQuestionairePages(); + }, + ccdEvents.CLAIMANT_RESPONSE, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + private async processRespondentResponsePage() { + const { respondentResponsePage } = this.claimantResponsePageFactory; + await respondentResponsePage.selectYes(); + await respondentResponsePage.submit(); + } + + private async processResponse1v2Pages() { + const { respondentResponse1v2Page } = this.claimantResponsePageFactory; + await respondentResponse1v2Page.selectYesBothDefendants(); + await respondentResponse1v2Page.submit(); + + const { defenceResponseDocument1v2Page } = this.claimantResponsePageFactory; + await defenceResponseDocument1v2Page.uploadDocumentBothDefendants(); + await defenceResponseDocument1v2Page.submit(); + } + + private async processDefenceResponseDocumentPage() { + const { defenceResponseDocumentPage } = this.claimantResponsePageFactory; + await defenceResponseDocumentPage.uploadDocument(); + await defenceResponseDocumentPage.submit(); + } + + private async processDirectionsQuestionairePages() { + await this.processExpertsPage(); + await this.processWitnessesPage(); + await this.processLanguagePage(); + await this.processHearingSmallClaimPage(); + await this.processDraftDirectionsPage(); + await this.processHearingSupportPage(); + await this.processVulnerabilityQuestionsPage(); + await this.processFutherInformationPage(); + await this.processStatementOfTruthPage(); + await this.processSubmitPage(); + await this.processConfirmPage(); + } + + private async processExpertsPage() { + const { expertsPage } = this.claimantResponsePageFactory; + await expertsPage.verifyContent(this.ccdCaseData); + await expertsPage.useExperts(); + await expertsPage.addNewExpert(); + await expertsPage.enterExpertDetails(partys.CLAIMANT_EXPERT_1); + await expertsPage.submit(); + } + + private async processWitnessesPage() { + const { witnessesPage } = this.claimantResponsePageFactory; + await witnessesPage.verifyContent(this.ccdCaseData); + await witnessesPage.selectYes(); + await witnessesPage.addWitness(); + await witnessesPage.enterWitnessDetails(partys.CLAIMANT_WITNESS_1); + await witnessesPage.submit(); + } + + private async processLanguagePage() { + const { languagePage } = this.claimantResponsePageFactory; + await languagePage.verifyContent(this.ccdCaseData); + await languagePage.selectEnglishAndWelsh(); + await languagePage.submit(); + } + + private async processHearingSmallClaimPage() { + const { hearingPage } = this.claimantResponsePageFactory; + await hearingPage.verifyContent(this.ccdCaseData); + await hearingPage.selectYesAvailabilityRequired(); + await hearingPage.addNewUnavailableDate(); + await hearingPage.selectSingleDate(1); + await hearingPage.submit(); + } + + private async processDraftDirectionsPage() { + const { draftDirectionsPage } = this.claimantResponsePageFactory; + await draftDirectionsPage.verifyContent(this.ccdCaseData); + await draftDirectionsPage.uploadEvidence(); + await draftDirectionsPage.submit(); + } + + private async processHearingSupportPage() { + const { hearingSupportPage } = this.claimantResponsePageFactory; + await hearingSupportPage.verifyContent(this.ccdCaseData); + await hearingSupportPage.selectYes(); + await hearingSupportPage.enterSupportRequirementsAdditional(); + await hearingSupportPage.submit(); + } + + private async processFutherInformationPage() { + const { furtherInformationPage } = this.claimantResponsePageFactory; + await furtherInformationPage.verifyContent(this.ccdCaseData); + await furtherInformationPage.selectYes(); + await furtherInformationPage.enterFurtherInformation(); + await furtherInformationPage.submit(); + } + + private async processVulnerabilityQuestionsPage() { + const { vulnerabilityQuestionsPage } = this.claimantResponsePageFactory; + await vulnerabilityQuestionsPage.verifyContent(this.ccdCaseData); + await vulnerabilityQuestionsPage.selectYes(); + await vulnerabilityQuestionsPage.enterVulnerabilityAdjustments(); + await vulnerabilityQuestionsPage.submit(); + } + + private async processStatementOfTruthPage() { + const { statementOfTruthClaimantResponsePage } = this.claimantResponsePageFactory; + await statementOfTruthClaimantResponsePage.verifyContent(this.ccdCaseData); + await statementOfTruthClaimantResponsePage.enterDetails(); + await statementOfTruthClaimantResponsePage.submit(); + } + + private async processSubmitPage() { + const { submitClaimantResponsePage } = this.claimantResponsePageFactory; + await submitClaimantResponsePage.verifyContent(this.ccdCaseData); + await submitClaimantResponsePage.submit(); + } + + private async processConfirmPage() { + const { confirmClaimantResponsePage } = this.claimantResponsePageFactory; + await confirmClaimantResponsePage.verifyContent(this.ccdCaseData); + await confirmClaimantResponsePage.submit(); + } } diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/create-claim/create-claim-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/create-claim/create-claim-steps.ts index cbdeaf5832..2b940baa22 100644 --- a/playwright-e2e/steps/ui/exui/solicitor-events/create-claim/create-claim-steps.ts +++ b/playwright-e2e/steps/ui/exui/solicitor-events/create-claim/create-claim-steps.ts @@ -1,10 +1,11 @@ import BaseExuiSteps from '../../../../../base/base-exui-steps'; -import BaseSteps from '../../../../../base/base-steps'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; import TestData from '../../../../../models/test-data'; import ExuiDashboardPageFactory from '../../../../../pages/exui/exui-dashboard/exui-dashboard-page-factory'; import CreateClaimPageFactory from '../../../../../pages/exui/solicitor-events/create-claim/create-claim-page-factory'; import RequestsFactory from '../../../../../requests/requests-factory'; +import ccdEvents from '../../../../../constants/ccd-events'; +import { claimantSolicitorUser } from '../../../../../config/users/exui-users'; @AllMethodsStep() export default class CreateClaimSteps extends BaseExuiSteps { @@ -19,4 +20,312 @@ export default class CreateClaimSteps extends BaseExuiSteps { super(exuiDashboardPageFactory, requestsFactory, testData); this.createClaimPageFactory = createClaimPageFactory; } + + async FastTrack1v1() { + await super.retryExuiEvent( + async () => { + await this.processClaimant1DetailsPages(); + await this.processNoAddAnotherClaimantPage(); + await this.processDefendant1DetailsPages(); + await this.processDefendantSolicitor1Pages(); + await this.processNoDefendant2Page(); + await this.processClaimDetails(); + await this.processFastTrackClaimPages(); + await this.processFinalPages(); + }, + ccdEvents.CREATE_CLAIM, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + async SmallTrack1v1() { + await super.retryExuiEvent( + async () => { + await this.processClaimant1DetailsPages(); + await this.processNoAddAnotherClaimantPage(); + await this.processDefendant1DetailsPages(); + await this.processDefendantSolicitor1Pages(); + await this.processNoDefendant2Page(); + await this.processClaimDetails(); + await this.processSmallTrackClaimPages(); + await this.processFinalPages(); + }, + ccdEvents.CREATE_CLAIM, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + async SmallTrack2v1() { + await super.retryExuiEvent( + async () => { + await this.processClaimant1DetailsPages(); + + const { addAnotherClaimantPage } = this.createClaimPageFactory; + await addAnotherClaimantPage.verifyContent(); + await addAnotherClaimantPage.selectYes(); + await addAnotherClaimantPage.submit(); + + const { secondClaimantPage } = this.createClaimPageFactory; + await secondClaimantPage.verifyContent(); + await secondClaimantPage.chooseIndividualAndEnterDetails(); + await secondClaimantPage.submit(); + + const { secondClaimantLitigationFriendPage } = this.createClaimPageFactory; + await secondClaimantLitigationFriendPage.verifyContent(); + await secondClaimantLitigationFriendPage.selectYes(); + await secondClaimantLitigationFriendPage.enterLitigationFriendDetails(); + await secondClaimantPage.submit(); + + await this.processDefendant1DetailsPages(); + await this.processDefendantSolicitor1Pages(); + await this.processClaimDetails(); + await this.processSmallTrackClaimPages(); + await this.processFinalPages(); + }, + ccdEvents.CREATE_CLAIM, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + async SmallTrack1v2SS() { + await super.retryExuiEvent( + async () => { + await this.processClaimant1DetailsPages(); + await this.processNoAddAnotherClaimantPage(); + await this.processDefendant1DetailsPages(); + await this.processDefendantSolicitor1Pages(); + await this.processDefendant2DetailsPages(); + await this.processDefendant2RepresentedPages(); + + const { sameLegalRepresentativePage } = this.createClaimPageFactory; + await sameLegalRepresentativePage.verifyContent(); + await sameLegalRepresentativePage.selectYes(); + await sameLegalRepresentativePage.submit(); + + await this.processClaimDetails(); + await this.processSmallTrackClaimPages(); + await this.processFinalPages(); + }, + ccdEvents.CREATE_CLAIM, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + async SmallTrack1v2DS() { + await super.retryExuiEvent( + async () => { + await this.processClaimant1DetailsPages(); + await this.processNoAddAnotherClaimantPage(); + await this.processDefendant1DetailsPages(); + await this.processDefendantSolicitor1Pages(); + await this.processDefendant2DetailsPages(); + await this.processDefendant2RepresentedPages(); + + const { sameLegalRepresentativePage } = this.createClaimPageFactory; + await sameLegalRepresentativePage.verifyContent(); + await sameLegalRepresentativePage.selectNo(); + await sameLegalRepresentativePage.submit(); + + const { secondDefendantSolicitorOrganisationPage } = this.createClaimPageFactory; + await secondDefendantSolicitorOrganisationPage.verifyContent(); + await secondDefendantSolicitorOrganisationPage.selectOrganisation(); + await secondDefendantSolicitorOrganisationPage.submit(); + + const { secondDefendantSolicitorServiceAddressPage } = this.createClaimPageFactory; + await secondDefendantSolicitorServiceAddressPage.verifyContent(); + await secondDefendantSolicitorServiceAddressPage.selectYesAndEnterAddress(); + await secondDefendantSolicitorServiceAddressPage.submit(); + + const { secondDefendantSolicitorReferencePage } = this.createClaimPageFactory; + await secondDefendantSolicitorReferencePage.verifyContent(); + await secondDefendantSolicitorReferencePage.enterReference(); + await secondDefendantSolicitorReferencePage.submit(); + + const { secondDefendantSolicitorEmailPage } = this.createClaimPageFactory; + await secondDefendantSolicitorEmailPage.verifyContent(); + await secondDefendantSolicitorEmailPage.enterEmail(); + await secondDefendantSolicitorEmailPage.submit(); + + await this.processClaimDetails(); + await this.processSmallTrackClaimPages(); + await this.processFinalPages(); + }, + ccdEvents.CREATE_CLAIM, + claimantSolicitorUser, + { verifySuccessEvent: false }, + ); + } + + private async processClaimant1DetailsPages() { + const { caseFilterPage } = this.createClaimPageFactory; + await caseFilterPage.verifyContent(); + await caseFilterPage.chooseUnSpec(); + await caseFilterPage.submit(); + + const { eligibilityPage } = this.createClaimPageFactory; + await eligibilityPage.verifyContent(); + await eligibilityPage.submit(); + + const { referencesPage } = this.createClaimPageFactory; + await referencesPage.verifyContent(); + await referencesPage.enterReferences(); + await referencesPage.submit(); + + const { courtPage } = this.createClaimPageFactory; + await courtPage.verifyContent(); + await courtPage.chooseCourtLocation(); + await courtPage.selectYesForRemoteHearing(); + await courtPage.submit(); + + const { claimantPage } = this.createClaimPageFactory; + await claimantPage.verifyContent(); + await claimantPage.chooseIndividualAndEnterDetails(); + await claimantPage.submit(); + + const { claimantLitigationFriendPage } = this.createClaimPageFactory; + await claimantLitigationFriendPage.verifyContent(); + await claimantLitigationFriendPage.selectYes(); + await claimantLitigationFriendPage.enterLitigationFriendDetails(); + await claimantLitigationFriendPage.submit(); + + const { notificationsPage } = this.createClaimPageFactory; + await notificationsPage.verifyContent(); + await notificationsPage.selectNo(); + await notificationsPage.submit(); + + const { claimantSolicitorOrganisationPage } = this.createClaimPageFactory; + await claimantSolicitorOrganisationPage.verifyContent(); + await claimantSolicitorOrganisationPage.selectOrganisation(); + await claimantSolicitorOrganisationPage.submit(); + + const { claimantSolicitorServiceAddressPage } = this.createClaimPageFactory; + await claimantSolicitorServiceAddressPage.verifyContent(); + await claimantSolicitorServiceAddressPage.selectYesAndEnterAddress(); + await claimantSolicitorServiceAddressPage.submit(); + } + + private async processNoAddAnotherClaimantPage() { + const { addAnotherClaimantPage } = this.createClaimPageFactory; + await addAnotherClaimantPage.verifyContent(); + await addAnotherClaimantPage.selectNo(); + await addAnotherClaimantPage.submit(); + } + + private async processDefendant1DetailsPages() { + const { defendantPage } = this.createClaimPageFactory; + await defendantPage.verifyContent(); + await defendantPage.chooseIndividualAndEnterDetails(); + await defendantPage.submit(); + } + + private async processDefendantSolicitor1Pages() { + const { legalRepresentationPage } = this.createClaimPageFactory; + await legalRepresentationPage.verifyContent(); + await legalRepresentationPage.selectYes(); + await legalRepresentationPage.submit(); + + const { defendantSolicitorOrganisationPage } = this.createClaimPageFactory; + await defendantSolicitorOrganisationPage.verifyContent(); + await defendantSolicitorOrganisationPage.selectOrganisation(); + await defendantSolicitorOrganisationPage.submit(); + + const { defendantSolicitorServiceAddressPage } = this.createClaimPageFactory; + await defendantSolicitorServiceAddressPage.verifyContent(); + await defendantSolicitorServiceAddressPage.selectYesAndEnterAddress(); + await defendantSolicitorServiceAddressPage.submit(); + + const { defendantSolicitorEmailPage } = this.createClaimPageFactory; + await defendantSolicitorEmailPage.verifyContent(); + await defendantSolicitorEmailPage.enterEmail(); + await defendantSolicitorEmailPage.submit(); + } + + private async processNoDefendant2Page() { + const { addAnotherDefendantPage } = this.createClaimPageFactory; + await addAnotherDefendantPage.verifyContent(); + await addAnotherDefendantPage.selectNo(); + await addAnotherDefendantPage.submit(); + } + + private async processDefendant2DetailsPages() { + const { addAnotherDefendantPage } = this.createClaimPageFactory; + await addAnotherDefendantPage.verifyContent(); + await addAnotherDefendantPage.selectYes(); + await addAnotherDefendantPage.submit(); + + const { secondDefendantPage } = this.createClaimPageFactory; + await secondDefendantPage.verifyContent(); + await secondDefendantPage.chooseIndividualAndEnterDetails(); + await secondDefendantPage.submit(); + } + + private async processDefendant2RepresentedPages() { + const { secondDefendantLegalRepresentationPage } = this.createClaimPageFactory; + await secondDefendantLegalRepresentationPage.verifyContent(); + await secondDefendantLegalRepresentationPage.selectYes(); + await secondDefendantLegalRepresentationPage.submit(); + } + + private async processClaimDetails() { + const { claimTypePage } = this.createClaimPageFactory; + await claimTypePage.verifyContent(); + await claimTypePage.selectPersonalInjury(); + await claimTypePage.submit(); + + const { personalInjuryType } = this.createClaimPageFactory; + await personalInjuryType.verifyContent(); + await personalInjuryType.selectRoadAccident(); + await personalInjuryType.submit(); + + const { detailsPage } = this.createClaimPageFactory; + await detailsPage.verifyContent(); + await detailsPage.enterDetails(); + await detailsPage.submit(); + + const { uploadParticularsOfClaimPage } = this.createClaimPageFactory; + await uploadParticularsOfClaimPage.verifyContent(); + await uploadParticularsOfClaimPage.selectNo(); + await uploadParticularsOfClaimPage.submit(); + } + + private async processSmallTrackClaimPages() { + const { claimValuePage } = this.createClaimPageFactory; + await claimValuePage.verifyContent(); + await claimValuePage.enterClaimDetailsSmallTrack(); + await claimValuePage.submit(); + + const { pbaNumberPage } = this.createClaimPageFactory; + await pbaNumberPage.verifyContent(); + await pbaNumberPage.submit(); + } + + private async processFastTrackClaimPages() { + const { claimValuePage } = this.createClaimPageFactory; + await claimValuePage.verifyContent(); + await claimValuePage.enterClaimDetailsFastTrack(); + await claimValuePage.submit(); + + const { pbaNumberPage } = this.createClaimPageFactory; + await pbaNumberPage.verifyContent(); + await pbaNumberPage.submit(); + } + + private async processFinalPages() { + const { statementOfTruthCreateClaimPage } = this.createClaimPageFactory; + await statementOfTruthCreateClaimPage.verifyContent(); + await statementOfTruthCreateClaimPage.enterDetails(); + await statementOfTruthCreateClaimPage.submit(); + + const { submitCreateClaimPage } = this.createClaimPageFactory; + await submitCreateClaimPage.verifyContent(); + await submitCreateClaimPage.submit(); + + const { confirmCreateClaimPage } = this.createClaimPageFactory; + await confirmCreateClaimPage.verifyContent(); + await confirmCreateClaimPage.submit(); + } } diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/defendant-response-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/defendant-response-steps.ts index 2048b373bf..39a1cbc3c2 100644 --- a/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/defendant-response-steps.ts +++ b/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/defendant-response-steps.ts @@ -1,5 +1,4 @@ import BaseExuiSteps from '../../../../../base/base-exui-steps'; -import BaseSteps from '../../../../../base/base-steps'; import { AllMethodsStep } from '../../../../../decorators/test-steps'; import TestData from '../../../../../models/test-data'; import ExuiDashboardPageFactory from '../../../../../pages/exui/exui-dashboard/exui-dashboard-page-factory'; diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/lr-spec/mediation-availability/mediation-availability-content.ts b/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/lr-spec/mediation-availability/mediation-availability-content.ts deleted file mode 100644 index c4333debd3..0000000000 --- a/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/lr-spec/mediation-availability/mediation-availability-content.ts +++ /dev/null @@ -1,99 +0,0 @@ -export const heading = 'Mediation availability'; - -export const yesNoRadioButtons = { - text: { - question: - 'Are there any dates in the next 3 months when you or your client cannot attend a mediation appointment?', - hint: 'These should only be the dates of important events like medical appointments, other court hearings, or holidays that are already booked. If the mediation appointment is not attended, your client may face a penalty. The Small Claims Mediation Service operates Monday to Friday from 8am to 5pm, except bank holidays', - }, - radioYes: { - text: 'Yes', - selector: '#resp1MediationAvailability_isMediationUnavailablityExists_Yes', - }, - radioNo: { - text: 'No', - selector: '#resp1MediationAvailability_isMediationUnavailablityExists_No', - }, -}; - -export const addNew = 'Add new'; - -export const remove = 'Remove'; - -export const singleDateOrDateRangeRadioButton = { - text: { - label: 'Add a single date or date range', - warning: 'Add a single date or date range is required', - }, - options: (dateEntry: number) => [ - { - text: 'Single date', - selector: `#resp1MediationAvailability_unavailableDatesForMediation_${dateEntry}_unavailableDateType-SINGLE_DATE`, - }, - { - text: 'Date range', - selector: `#resp1MediationAvailability_unavailableDatesForMediation_${dateEntry}_unavailableDateType-DATE_RANGE`, - }, - ], -}; - -export const unavailableSingleDate = { - text: { - label: 'Unavailable date', - hint: 'This date cannot be in the past and must not be more than three months in the future', - }, - day: { - label: 'Day', - input: '#date-day', - }, - month: { - label: 'Month', - input: '#date-month', - }, - year: { - label: 'Year', - input: '#date-year', - }, -}; - -export const unavailableDateRange = { - text: { - label: 'Unavailable date range', - }, - dateFrom: { - text: { - label: 'Date from', - hint: 'This date cannot be in the past and must not be more than three months in the future', - }, - day: { - label: 'Day', - input: '#fromDate-day', - }, - month: { - label: 'Month', - input: '#fromDate-month', - }, - year: { - label: 'Year', - input: '#fromDate-year', - }, - }, - dateTo: { - text: { - label: 'Date to', - hint: 'This date cannot be in the past and must not be more than three months in the future', - }, - day: { - label: 'Day', - input: '#toDate-day', - }, - month: { - label: 'Month', - input: '#toDate-month', - }, - year: { - label: 'Year', - input: '#toDate-year', - }, - }, -}; diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-details-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-details-steps.ts index 907bab4c74..72fd505c10 100644 --- a/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-details-steps.ts +++ b/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-details-steps.ts @@ -41,4 +41,145 @@ export default class NotifyClaimDetailsSteps extends BaseExuiSteps { claimantSolicitorUser, ); } + + async NotifyClaimDetails2v1() { + await this.retryExuiEvent( + async () => { + const { uploadNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await uploadNotifyClaimDetailsPage.verifyContent(this.ccdCaseData); + await uploadNotifyClaimDetailsPage.uploadDocuments(); + await uploadNotifyClaimDetailsPage.submit(); + + const { submitNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await submitNotifyClaimDetailsPage.verifyContent(this.ccdCaseData); + await submitNotifyClaimDetailsPage.submit(); + + const { confirmNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await confirmNotifyClaimDetailsPage.verifyContent(); + await confirmNotifyClaimDetailsPage.submit(); + }, + ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM_DETAILS, + claimantSolicitorUser, + ); + } + + async NotifyClaimDetails1v2SS() { + await this.retryExuiEvent( + async () => { + const { uploadNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await uploadNotifyClaimDetailsPage.verifyContent(this.ccdCaseData); + await uploadNotifyClaimDetailsPage.uploadDocuments(); + await uploadNotifyClaimDetailsPage.submit(); + + const { submitNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await submitNotifyClaimDetailsPage.verifyContent(this.ccdCaseData); + await submitNotifyClaimDetailsPage.submit(); + + const { confirmNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await confirmNotifyClaimDetailsPage.verifyContent(); + await confirmNotifyClaimDetailsPage.submit(); + }, + ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM_DETAILS, + claimantSolicitorUser, + ); + } + + async NotifyClaimDetails1v2DS() { + await this.retryExuiEvent( + async () => { + const { selectDefendantSolicitorPage } = this.notifyClaimDetailsPageFactory; + await selectDefendantSolicitorPage.verifyContent(this.ccdCaseData); + await selectDefendantSolicitorPage.selectBoth(); + await selectDefendantSolicitorPage.submit(); + + const { uploadNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await uploadNotifyClaimDetailsPage.verifyContent(this.ccdCaseData); + await uploadNotifyClaimDetailsPage.uploadDocuments(); + await uploadNotifyClaimDetailsPage.submit(); + + const { submitNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await submitNotifyClaimDetailsPage.verifyContent(this.ccdCaseData); + await submitNotifyClaimDetailsPage.submit(); + + const { confirmNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await confirmNotifyClaimDetailsPage.verifyContent(); + await confirmNotifyClaimDetailsPage.submit(); + }, + ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM_DETAILS, + claimantSolicitorUser, + ); + } + + async NotifyClaimDetails1v1LIP() { + await this.retryExuiEvent( + async () => { + const { certificateOfService1NotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await certificateOfService1NotifyClaimDetailsPage.verifyContent(); + await certificateOfService1NotifyClaimDetailsPage.fillDetails(); + await certificateOfService1NotifyClaimDetailsPage.submit(); + + const { submitNotifyClaimDetailsLIPPage } = this.notifyClaimDetailsPageFactory; + await submitNotifyClaimDetailsLIPPage.verifyContent(this.ccdCaseData); + await submitNotifyClaimDetailsLIPPage.submit(); + + const { confirmNotifyClaimDetailsCOSPage } = this.notifyClaimDetailsPageFactory; + await confirmNotifyClaimDetailsCOSPage.verifyContent(); + await confirmNotifyClaimDetailsCOSPage.submit(); + }, + ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM_DETAILS, + claimantSolicitorUser, + ); + } + + async NotifyClaimDetails1v2LIPS() { + await this.retryExuiEvent( + async () => { + const { certificateOfService1NotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await certificateOfService1NotifyClaimDetailsPage.verifyContent(); + await certificateOfService1NotifyClaimDetailsPage.fillDetails(); + await certificateOfService1NotifyClaimDetailsPage.submit(); + + const { certificateOfService2NotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await certificateOfService2NotifyClaimDetailsPage.verifyContent(this.ccdCaseData); + await certificateOfService2NotifyClaimDetailsPage.fillDetails(); + await certificateOfService2NotifyClaimDetailsPage.submit(); + + const { submitNotifyClaimDetailsCOSPage } = this.notifyClaimDetailsPageFactory; + await submitNotifyClaimDetailsCOSPage.verifyContent(this.ccdCaseData); + await submitNotifyClaimDetailsCOSPage.submit(); + + const { confirmNotifyClaimDetailsCOSPage } = this.notifyClaimDetailsPageFactory; + await confirmNotifyClaimDetailsCOSPage.verifyContent(); + await confirmNotifyClaimDetailsCOSPage.submit(); + }, + ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM_DETAILS, + claimantSolicitorUser, + ); + } + + async NotifyClaimDetails1v2LIPLR() { + await this.retryExuiEvent( + async () => { + const { uploadNotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await uploadNotifyClaimDetailsPage.verifyContent(this.ccdCaseData); + await uploadNotifyClaimDetailsPage.uploadDocuments(); + await uploadNotifyClaimDetailsPage.submit(); + + const { certificateOfService2NotifyClaimDetailsPage } = this.notifyClaimDetailsPageFactory; + await certificateOfService2NotifyClaimDetailsPage.verifyContent(this.ccdCaseData); + await certificateOfService2NotifyClaimDetailsPage.fillDetails(); + await certificateOfService2NotifyClaimDetailsPage.submit(); + + const { submitNotifyClaimDetailsLIPLRPage } = this.notifyClaimDetailsPageFactory; + await submitNotifyClaimDetailsLIPLRPage.verifyContent(this.ccdCaseData); + await submitNotifyClaimDetailsLIPLRPage.submit(); + + const { confirmNotifyClaimDetailsCOSPage } = this.notifyClaimDetailsPageFactory; + await confirmNotifyClaimDetailsCOSPage.verifyContent(); + await confirmNotifyClaimDetailsCOSPage.submit(); + }, + ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM_DETAILS, + claimantSolicitorUser, + ); + } } diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-steps.ts index 4afa7ca2a3..0d4695677e 100644 --- a/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-steps.ts +++ b/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-steps.ts @@ -114,9 +114,9 @@ export default class NotifyClaimSteps extends BaseExuiSteps { await certificateOfService1NotifyClaimPage.fillDetails(); await certificateOfService1NotifyClaimPage.submit(); - const { submitNotifyClaimCOSPage } = this.notifyClaimPageFactory; - await submitNotifyClaimCOSPage.verifyContent(this.ccdCaseData); - await submitNotifyClaimCOSPage.submit(); + const { submitNotifyClaimPage } = this.notifyClaimPageFactory; + await submitNotifyClaimPage.verifyContent(this.ccdCaseData); + await submitNotifyClaimPage.submit(); const { confirmNotifyClaimCOSPage } = this.notifyClaimPageFactory; await confirmNotifyClaimCOSPage.verifyContent(this.ccdCaseData); diff --git a/playwright-e2e/tests/Login.spec.ts b/playwright-e2e/tests/Login.spec.ts index b8a12ec428..1dff6ec062 100644 --- a/playwright-e2e/tests/Login.spec.ts +++ b/playwright-e2e/tests/Login.spec.ts @@ -1,41 +1,43 @@ -import { civilAdminUser } from '../config/users/exui-users'; -import ccdEvents from '../constants/ccd-events'; import { test } from '../playwright-fixtures/index'; -test('Testing Login', async ({ - IdamSteps, - ExuiDashboardSteps, - ApiUserSteps, - ApiDataSteps, - _requestsFactory, - _exuiDashboardPageFactory, - _notifyClaimPageFactory, -}) => { - // await ApiUserSteps.SetupUserData(civilAdminUser); - // await ApiDataSteps.SetupBankHolidaysData(); - await IdamSteps.ClaimantSolicitorLogin(); - await ExuiDashboardSteps.GoToCaseList(); +test( + 'Testing Login', + { tag: '@debug' }, + async ({ + IdamSteps, + ExuiDashboardSteps, + ApiUserSteps, + ApiDataSteps, + _requestsFactory, + _exuiDashboardPageFactory, + _notifyClaimPageFactory, + }) => { + // await ApiUserSteps.SetupUserData(civilAdminUser); + // await ApiDataSteps.SetupBankHolidaysData(); + await IdamSteps.ClaimantSolicitorLogin(); + await ExuiDashboardSteps.GoToCaseDetails(); - // const { ccdRequests } = _requestsFactory; - // const ccdCaseData = await ccdRequests.fetchCCDCaseData(1732120625619001, civilAdminUser); + // const { ccdRequests } = _requestsFactory; + // const ccdCaseData = await ccdRequests.fetchCCDCaseData(1732120625619001, civilAdminUser); - // const { caseDetailsPage } = _exuiDashboardPageFactory; - // await caseDetailsPage.goToCaseDetails(1732120625619001); - // await caseDetailsPage.verifyContent(ccdCaseData); - // await caseDetailsPage.retryChooseNextStep(ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM); + // const { caseDetailsPage } = _exuiDashboardPageFactory; + // await caseDetailsPage.goToCaseDetails(1732120625619001); + // await caseDetailsPage.verifyContent(ccdCaseData); + // await caseDetailsPage.retryChooseNextStep(ccdEvents.NOTIFY_DEFENDANT_OF_CLAIM); - // const { certificateOfService1NotifyClaimPage } = _notifyClaimPageFactory; - // await certificateOfService1NotifyClaimPage.verifyContent(ccdCaseData); - // await certificateOfService1NotifyClaimPage.fillDetails(); - // await certificateOfService1NotifyClaimPage.submit(); + // const { certificateOfService1NotifyClaimPage } = _notifyClaimPageFactory; + // await certificateOfService1NotifyClaimPage.verifyContent(ccdCaseData); + // await certificateOfService1NotifyClaimPage.fillDetails(); + // await certificateOfService1NotifyClaimPage.submit(); - // const { certificateOfService2NotifyClaimPage } = _notifyClaimPageFactory; - // await certificateOfService2NotifyClaimPage.verifyContent(ccdCaseData); - // await certificateOfService2NotifyClaimPage.fillDetails(); - // await certificateOfService2NotifyClaimPage.submit(); + // const { certificateOfService2NotifyClaimPage } = _notifyClaimPageFactory; + // await certificateOfService2NotifyClaimPage.verifyContent(ccdCaseData); + // await certificateOfService2NotifyClaimPage.fillDetails(); + // await certificateOfService2NotifyClaimPage.submit(); - // const { notifyClaimCOSSubmitPage } = _notifyClaimPageFactory; - // await notifyClaimCOSSubmitPage.verifyContent(ccdCaseData); + // const { notifyClaimCOSSubmitPage } = _notifyClaimPageFactory; + // await notifyClaimCOSSubmitPage.verifyContent(ccdCaseData); - // await notifyClaimDetailsCOSSubmitPage.submit(); -}); + // await notifyClaimDetailsCOSSubmitPage.submit(); + }, +); diff --git a/playwright.config.ts b/playwright.config.ts index 0828f6abf8..6fa6613d67 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -43,7 +43,7 @@ export default defineConfig({ video: { mode: 'retain-on-failure' }, screenshot: { mode: 'only-on-failure', fullPage: true }, launchOptions: { - slowMo: process.env.CI ? 200 : 500, + // slowMo: process.env.CI ? 200 : 500, }, }, projects: [