From f2d8880bfe16cb74e422b7591f232de692e9132d Mon Sep 17 00:00:00 2001 From: "Chak Shing, Lo" Date: Wed, 9 Apr 2025 16:15:37 +0100 Subject: [PATCH 1/8] additional application pba payment --- .../AdditionalApplicationPayment.json | 214 ++++++++++++++++++ .../upload-c2/PBAPayment.json | 9 +- 2 files changed, 219 insertions(+), 4 deletions(-) create mode 100644 ccd-definition/AuthorisationComplexType/caseDocuments/AdditionalApplicationPayment.json diff --git a/ccd-definition/AuthorisationComplexType/caseDocuments/AdditionalApplicationPayment.json b/ccd-definition/AuthorisationComplexType/caseDocuments/AdditionalApplicationPayment.json new file mode 100644 index 00000000000..4bc36b62eaa --- /dev/null +++ b/ccd-definition/AuthorisationComplexType/caseDocuments/AdditionalApplicationPayment.json @@ -0,0 +1,214 @@ +[ + { + "LiveFrom": "01/01/2017", + "CaseTypeID": "CARE_SUPERVISION_EPO", + "CaseFieldID": "temporaryPbaPayment", + "ListElementCode": "usePbaPayment", + "AccessControl": [ + { + "UserRoles": [ + "caseworker-publiclaw-courtadmin" + ], + "CRUD": "CRUD" + }, + { + "UserRoles": [ + "[SOLICITOR]", + "[SOLICITORA]", + "[SOLICITORB]", + "[SOLICITORC]", + "[SOLICITORD]", + "[SOLICITORE]", + "[SOLICITORF]", + "[SOLICITORG]", + "[SOLICITORH]", + "[SOLICITORI]", + "[SOLICITORJ]", + "[CHILDSOLICITORA]", + "[CHILDSOLICITORB]", + "[CHILDSOLICITORC]", + "[CHILDSOLICITORD]", + "[CHILDSOLICITORE]", + "[CHILDSOLICITORF]", + "[CHILDSOLICITORG]", + "[CHILDSOLICITORH]", + "[CHILDSOLICITORI]", + "[CHILDSOLICITORJ]", + "[CHILDSOLICITORK]", + "[CHILDSOLICITORL]", + "[CHILDSOLICITORM]", + "[CHILDSOLICITORN]", + "[CHILDSOLICITORO]", + "[CAFCASSSOLICITOR]", + "[LASOLICITOR]", + "[LASHARED]", + "[LAMANAGING]", + "[LABARRISTER]", + "[EPSMANAGING]", + "[BARRISTER]", + "caseworker-publiclaw-cafcass" + ], + "CRUD": "CR" + } + ] + }, + { + "LiveFrom": "01/01/2017", + "CaseTypeID": "CARE_SUPERVISION_EPO", + "CaseFieldID": "temporaryPbaPayment", + "ListElementCode": "pbaNumber", + "AccessControl": [ + { + "UserRoles": [ + "caseworker-publiclaw-courtadmin" + ], + "CRUD": "CRUD" + }, + { + "UserRoles": [ + "[SOLICITOR]", + "[SOLICITORA]", + "[SOLICITORB]", + "[SOLICITORC]", + "[SOLICITORD]", + "[SOLICITORE]", + "[SOLICITORF]", + "[SOLICITORG]", + "[SOLICITORH]", + "[SOLICITORI]", + "[SOLICITORJ]", + "[CHILDSOLICITORA]", + "[CHILDSOLICITORB]", + "[CHILDSOLICITORC]", + "[CHILDSOLICITORD]", + "[CHILDSOLICITORE]", + "[CHILDSOLICITORF]", + "[CHILDSOLICITORG]", + "[CHILDSOLICITORH]", + "[CHILDSOLICITORI]", + "[CHILDSOLICITORJ]", + "[CHILDSOLICITORK]", + "[CHILDSOLICITORL]", + "[CHILDSOLICITORM]", + "[CHILDSOLICITORN]", + "[CHILDSOLICITORO]", + "[CAFCASSSOLICITOR]", + "[LASOLICITOR]", + "[LASHARED]", + "[LAMANAGING]", + "[LABARRISTER]", + "[EPSMANAGING]", + "[BARRISTER]", + "caseworker-publiclaw-cafcass" + ], + "CRUD": "CRU" + } + ] + }, + { + "LiveFrom": "01/01/2017", + "CaseTypeID": "CARE_SUPERVISION_EPO", + "CaseFieldID": "temporaryPbaPayment", + "ListElementCode": "clientCode", + "AccessControl": [ + { + "UserRoles": [ + "caseworker-publiclaw-courtadmin" + ], + "CRUD": "CRUD" + }, + { + "UserRoles": [ + "[SOLICITOR]", + "[SOLICITORA]", + "[SOLICITORB]", + "[SOLICITORC]", + "[SOLICITORD]", + "[SOLICITORE]", + "[SOLICITORF]", + "[SOLICITORG]", + "[SOLICITORH]", + "[SOLICITORI]", + "[SOLICITORJ]", + "[CHILDSOLICITORA]", + "[CHILDSOLICITORB]", + "[CHILDSOLICITORC]", + "[CHILDSOLICITORD]", + "[CHILDSOLICITORE]", + "[CHILDSOLICITORF]", + "[CHILDSOLICITORG]", + "[CHILDSOLICITORH]", + "[CHILDSOLICITORI]", + "[CHILDSOLICITORJ]", + "[CHILDSOLICITORK]", + "[CHILDSOLICITORL]", + "[CHILDSOLICITORM]", + "[CHILDSOLICITORN]", + "[CHILDSOLICITORO]", + "[CAFCASSSOLICITOR]", + "[LASOLICITOR]", + "[LASHARED]", + "[LAMANAGING]", + "[LABARRISTER]", + "[EPSMANAGING]", + "[BARRISTER]", + "caseworker-publiclaw-cafcass" + ], + "CRUD": "CRU" + } + ] + }, + { + "LiveFrom": "01/01/2017", + "CaseTypeID": "CARE_SUPERVISION_EPO", + "CaseFieldID": "temporaryPbaPayment", + "ListElementCode": "fileReference", + "AccessControl": [ + { + "UserRoles": [ + "caseworker-publiclaw-courtadmin" + ], + "CRUD": "CRUD" + }, + { + "UserRoles": [ + "[SOLICITOR]", + "[SOLICITORA]", + "[SOLICITORB]", + "[SOLICITORC]", + "[SOLICITORD]", + "[SOLICITORE]", + "[SOLICITORF]", + "[SOLICITORG]", + "[SOLICITORH]", + "[SOLICITORI]", + "[SOLICITORJ]", + "[CHILDSOLICITORA]", + "[CHILDSOLICITORB]", + "[CHILDSOLICITORC]", + "[CHILDSOLICITORD]", + "[CHILDSOLICITORE]", + "[CHILDSOLICITORF]", + "[CHILDSOLICITORG]", + "[CHILDSOLICITORH]", + "[CHILDSOLICITORI]", + "[CHILDSOLICITORJ]", + "[CHILDSOLICITORK]", + "[CHILDSOLICITORL]", + "[CHILDSOLICITORM]", + "[CHILDSOLICITORN]", + "[CHILDSOLICITORO]", + "[CAFCASSSOLICITOR]", + "[LASOLICITOR]", + "[LASHARED]", + "[LAMANAGING]", + "[LABARRISTER]", + "[EPSMANAGING]", + "[BARRISTER]", + "caseworker-publiclaw-cafcass" + ], + "CRUD": "CRU" + } + ] + } +] \ No newline at end of file diff --git a/ccd-definition/CaseEventToComplexTypes/upload-c2/PBAPayment.json b/ccd-definition/CaseEventToComplexTypes/upload-c2/PBAPayment.json index 75b80909aa5..b5e89686102 100644 --- a/ccd-definition/CaseEventToComplexTypes/upload-c2/PBAPayment.json +++ b/ccd-definition/CaseEventToComplexTypes/upload-c2/PBAPayment.json @@ -7,7 +7,8 @@ "DisplayContext": "MANDATORY", "ListElementCode": "usePbaPayment", "FieldDisplayOrder": "1", - "FieldShowCondition": "displayAmountToPay=\"Yes\"" + "FieldShowCondition": "displayAmountToPay=\"Yes\"", + "DefaultValue": "Yes" }, { "LiveFrom": "01/01/2017", @@ -17,7 +18,7 @@ "DisplayContext": "MANDATORY", "ListElementCode": "pbaNumber", "FieldDisplayOrder": "2", - "FieldShowCondition": "temporaryPbaPayment.usePbaPayment=\"Yes\"" + "FieldShowCondition": "displayAmountToPay=\"Yes\" AND temporaryPbaPayment.usePbaPayment=\"Yes\"" }, { "LiveFrom": "01/01/2017", @@ -27,7 +28,7 @@ "DisplayContext": "OPTIONAL", "ListElementCode": "clientCode", "FieldDisplayOrder": "3", - "FieldShowCondition": "temporaryPbaPayment.usePbaPayment=\"Yes\"" + "FieldShowCondition": "displayAmountToPay=\"Yes\" AND temporaryPbaPayment.usePbaPayment=\"Yes\"" }, { "LiveFrom": "01/01/2017", @@ -37,6 +38,6 @@ "DisplayContext": "MANDATORY", "ListElementCode": "fileReference", "FieldDisplayOrder": "4", - "FieldShowCondition": "temporaryPbaPayment.usePbaPayment=\"Yes\"" + "FieldShowCondition": "displayAmountToPay=\"Yes\" AND temporaryPbaPayment.usePbaPayment=\"Yes\"" } ] From 21d9b14905eff1d686efcfea5b058b47769d5fe5 Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Tue, 22 Apr 2025 15:44:57 +0100 Subject: [PATCH 2/8] DFPL-2670 --- .../pages/additional-applications.ts | 28 +- .../tests/additional-applications.spec.ts | 295 ++++++++++-------- 2 files changed, 177 insertions(+), 146 deletions(-) diff --git a/playwright-e2e/pages/additional-applications.ts b/playwright-e2e/pages/additional-applications.ts index f6c08e4bb75..61d1ef115db 100644 --- a/playwright-e2e/pages/additional-applications.ts +++ b/playwright-e2e/pages/additional-applications.ts @@ -16,12 +16,17 @@ export class AdditionalApplications extends BasePage { readonly acknowledgeC2ApplicationForm: Locator; readonly sameDay: Locator; readonly within2Days: Locator; + readonly selectApplicant: Locator; + readonly selectApplication: Locator; + readonly checkbox: Locator; + readonly paymentPbaNumber: Locator; + readonly typeOfC2Application: Locator; public constructor(page: Page) { super(page); this.otherSpecificOrder = page.getByText('Other specific order - including C1 and C100 orders, and supplements'); this.c2Order = page.getByText('C2 - to add or remove someone on a case, or for a specific request to the judge'); - this.confidentialC2Order = page.locator('[for="isC2Confidential_Yes"]'); + this.confidentialC2Order = page.getByLabel('Yes') this.nonConfidentialC2Order = page.locator('[for="isC2Confidential_No"]'); this.applicant = page.getByLabel('Select applicant'); this.c1ApplicationType = page.getByLabel('Select application'); @@ -31,19 +36,24 @@ export class AdditionalApplications extends BasePage { this.acknowledgeC2ApplicationForm = page.locator('[name="temporaryC2Document_documentAcknowledge"]'); this.sameDay = page.getByText('On the same day'); this.within2Days = page.getByText('Within 2 days'); + this.selectApplicant = page.getByLabel('Select applicant'); + this.selectApplication = page.getByLabel('What type of C2 application?'); + this.checkbox = page.getByLabel('Yes'); + this.paymentPbaNumber = page.getByLabel('Payment by account (PBA)'); + this.typeOfC2Application = page.getByLabel('Application with notice.'); } public async chooseOtherApplicationType() { await this.otherSpecificOrder.click(); - await this.applicant.selectOption('Swansea City Council, Applicant'); + await this.selectApplicant.selectOption('1: applicant'); await this.clickContinue(); } public async chooseC2ApplicationType() { await this.c2Order.click(); - await this.applicant.selectOption('Swansea City Council, Applicant'); - await this.page.getByText('Application by consent. Parties will be notified of this application.').click(); - await this.nonConfidentialC2Order.click(); + await this.typeOfC2Application.click(); + await this.confidentialC2Order.click(); + await this.selectApplicant.selectOption('3: 5c578fcc-7e41-45b0-82f7-46c38a769cb3'); await this.clickContinue(); } @@ -59,7 +69,7 @@ export class AdditionalApplications extends BasePage { await this.c2Order.click(); await this.otherSpecificOrder.click(); await this.applicant.selectOption('Swansea City Council, Applicant'); - await this.page.getByText('Application by consent. Parties will be notified of this application.').click(); + await this.typeOfC2Application.click(); await this.nonConfidentialC2Order.click(); await this.clickContinue(); } @@ -103,7 +113,7 @@ export class AdditionalApplications extends BasePage { // add new draft order if required if (uploadDraftOrder) { - await this.uploadDraftOrder(); + await this.uploadDraftOrder(); } await this.clickContinue(); @@ -139,8 +149,8 @@ export class AdditionalApplications extends BasePage { } public async payForApplication() { - await this.page.locator('[for="temporaryPbaPayment_usePbaPayment_Yes"]').check(); - await this.page.getByLabel('Payment by account (PBA) number').fill('PBA1234567'); + //await this.page.locator('[for="temporaryPbaPayment_usePbaPayment_Yes"]').check(); + await this.paymentPbaNumber.fill('PBA1234567'); await this.page.getByLabel('Customer reference').fill('Customer reference'); await this.clickContinue(); } diff --git a/playwright-e2e/tests/additional-applications.spec.ts b/playwright-e2e/tests/additional-applications.spec.ts index 96c310604c6..e01ebbe47a1 100644 --- a/playwright-e2e/tests/additional-applications.spec.ts +++ b/playwright-e2e/tests/additional-applications.spec.ts @@ -1,23 +1,24 @@ import { test } from '../fixtures/create-fixture'; import { createRequire } from 'node:module'; const require = createRequire(import.meta.url); -import { newSwanseaLocalAuthorityUserOne, judgeWalesUser, CTSCUser, HighCourtAdminUser } from '../settings/user-credentials'; +import { newSwanseaLocalAuthorityUserOne, judgeWalesUser, CTSCUser, HighCourtAdminUser, privateSolicitorOrgUser } from '../settings/user-credentials'; import { expect } from "@playwright/test"; import { testConfig } from '../settings/test-config'; import caseData from '../caseData/mandatorySubmissionFieldsWithoutAdditionalApp.json' assert { type: "json" }; +import caseWithResSolicitor from '../caseData/caseWithRespondentSolicitor.json' assert { type: "json" }; import { setHighCourt } from '../utils/update-case-details'; -import { createCase, updateCase } from "../utils/api-helper"; +import { createCase, giveAccessToCase, updateCase } from "../utils/api-helper"; test.describe('Upload additional applications', () => { const dateTime = new Date().toISOString(); let caseNumber: string; let caseName: string; - test.beforeEach(async () => { + test.beforeEach(async () => { caseNumber = await createCase('e2e case', newSwanseaLocalAuthorityUserOne); }); - //mark test as slow to give extra timeout - test.slow(); + //mark test as slow to give extra timeout + test.slow(); test('LA uploads a C1 application', async ({ page, signInPage, additionalApplications }) => { @@ -34,9 +35,7 @@ test.describe('Upload additional applications', () => { // Payment details await expect(page.getByText('£263.00')).toBeVisible(); await additionalApplications.payForApplication(); - await additionalApplications.checkYourAnsAndSubmit(); - await additionalApplications.tabNavigation('Other applications'); // can see some basic properties of the application @@ -59,7 +58,7 @@ test.describe('Upload additional applications', () => { // Assign and complete the task await page.getByText('Assign to me').click(); await page.getByText('Mark as done').click(); - await page.getByRole('button', {name: "Mark as done"}).click(); + await page.getByRole('button', { name: "Mark as done" }).click(); // Should be no more tasks on the page await expect(page.getByText('View Additional Applications')).toHaveCount(0); @@ -81,9 +80,8 @@ test.describe('Upload additional applications', () => { // Payment details await expect(page.getByText('£263.00')).toBeVisible(); await additionalApplications.payForApplication(); - await additionalApplications.checkYourAnsAndSubmit(); - }); + }); test('LA uploads combined Other and C2 applications', async ({ page, signInPage, additionalApplications }) => { @@ -100,9 +98,7 @@ test.describe('Upload additional applications', () => { await expect(page.getByText('£263.00')).toBeVisible(); await additionalApplications.payForApplication(); - await additionalApplications.checkYourAnsAndSubmit(); - await additionalApplications.tabNavigation('Other applications'); // can see some basic properties of the application @@ -116,129 +112,154 @@ test.describe('Upload additional applications', () => { await expect(page.getByText('Draft order title')).toBeVisible(); }); - test('LA uploads a confidential C2 application with draft order', - async ({ page, signInPage, additionalApplications }) => { - caseName = 'LA uploads a confidential C2 application with draft order ' + dateTime.slice(0, 10); - await updateCase(caseName, caseNumber, caseData); - await signInPage.visit(); - await signInPage.login(newSwanseaLocalAuthorityUserOne.email, newSwanseaLocalAuthorityUserOne.password); - - await signInPage.navigateTOCaseDetails(caseNumber); - await additionalApplications.gotoNextStep('Upload additional applications'); - await additionalApplications.chooseConfidentialC2ApplicationType(); - await additionalApplications.fillC2ApplicationDetails(); - - // Payment details - await expect(page.getByText('£263.00')).toBeVisible(); - await additionalApplications.payForApplication(); - - await additionalApplications.checkYourAnsAndSubmit(); - - await additionalApplications.tabNavigation('Other applications'); - - // can see some basic properties of the application - await expect(page.getByText('PBA1234567')).toBeVisible(); - await expect(page.getByText('Change surname or remove from jurisdiction.')).toBeVisible(); - await expect(page.getByText('Within 2 days')).toBeVisible(); - - // can see the draft order to be approved - await additionalApplications.tabNavigation('Draft orders'); - await expect(page.getByText('Draft order title')).toBeVisible(); - - await additionalApplications.clickSignOut(); - await signInPage.visit(); - await signInPage.login(CTSCUser.email, CTSCUser.password); - await signInPage.navigateTOCaseDetails(caseNumber); - - // CTSC can see some basic properties of the application - await additionalApplications.tabNavigation('Other applications'); - await expect(page.getByText('PBA1234567')).toBeVisible(); - await expect(page.getByText('Change surname or remove from jurisdiction.')).toBeVisible(); - await expect(page.getByText('Within 2 days')).toBeVisible(); - - // CTSC can see the draft order to be approved - await additionalApplications.tabNavigation('Draft orders'); - await expect(page.getByText('Draft order title')).toBeVisible(); - }); - - test('CTSC uploads a confidential C2 application with draft order', - async ({ page, signInPage, additionalApplications }) => { - caseName = 'CTSC uploads a confidential C2 application with draft order ' + dateTime.slice(0, 10); - await updateCase(caseName, caseNumber, caseData); - await signInPage.visit(); - await signInPage.login(CTSCUser.email, CTSCUser.password); - await signInPage.navigateTOCaseDetails(caseNumber); - - await additionalApplications.gotoNextStep('Upload additional applications'); - await additionalApplications.chooseConfidentialC2ApplicationType(); - await additionalApplications.fillC2ApplicationDetails(); - - // Payment details - await expect(page.getByText('£263.00')).toBeVisible(); - await additionalApplications.payForApplication(); - - await additionalApplications.checkYourAnsAndSubmit(); - - await additionalApplications.tabNavigation('Other applications'); - - // can see some basic properties of the application - await expect(page.getByText('PBA1234567')).toBeVisible(); - await expect(page.getByText('Change surname or remove from jurisdiction.')).toBeVisible(); - await expect(page.getByText('Within 2 days')).toBeVisible(); - - // can see the draft order to be approved - await additionalApplications.tabNavigation('Draft orders'); - await expect(page.getByText('Draft order title')).toBeVisible(); - - await additionalApplications.clickSignOut(); - await signInPage.visit(); - await signInPage.login(newSwanseaLocalAuthorityUserOne.email, newSwanseaLocalAuthorityUserOne.password); - await signInPage.navigateTOCaseDetails(caseNumber); - - // LA cannot see some basic properties of the application - await additionalApplications.tabNavigation('Other applications'); - await expect(page.getByText('This is a confidential application and restricted viewing applies')).toBeVisible(); - - // LA cannot see the draft order to be approved - await additionalApplications.tabNavigation('Draft orders'); - await expect(page.getByText('This is a confidential draft order and restricted viewing applies')).toBeVisible(); - }); - - test('Failed Payment High Court WA task', async ({ page, signInPage, additionalApplications, caseFileView }) => { - caseName = 'Failed Payment High Court WA task ' + dateTime.slice(0, 10); - setHighCourt(caseData); - await updateCase(caseName, caseNumber, caseData); - await signInPage.visit(); - await signInPage.login(newSwanseaLocalAuthorityUserOne.email, newSwanseaLocalAuthorityUserOne.password); - await signInPage.navigateTOCaseDetails(caseNumber); - await additionalApplications.uploadBasicC2Application(false); - - // Check CFV - await caseFileView.goToCFVTab(); - await caseFileView.openFolder('Application'); - await caseFileView.openFolder('C2 applications'); - await expect(page.getByRole('tree')).toContainText('testPdf.pdf'); - - // If WA is enabled - if (testConfig.waEnabled) { - console.log('WA testing'); - await additionalApplications.clickSignOut(); - await signInPage.visit(); - await signInPage.login(HighCourtAdminUser.email, HighCourtAdminUser.password); - - await signInPage.navigateTOCaseDetails(caseNumber); - - // Judge in Wales should see this Welsh case task + be able to assign it to themselves - await additionalApplications.tabNavigation('Tasks'); - await additionalApplications.waitForTask('Failed Payment (High Court)'); - - // Assign and complete the task - await page.getByText('Assign to me').click(); - await page.getByText('Mark as done').click(); - await page.getByRole('button', { name: "Mark as done" }).click(); - - // Should be no more tasks on the page - await expect(page.getByText('Failed Payment (High Court)')).toHaveCount(0); - } + test('LA uploads a confidential C2 application with draft order', + async ({ page, signInPage, additionalApplications }) => { + caseName = 'LA uploads a confidential C2 application with draft order ' + dateTime.slice(0, 10); + await updateCase(caseName, caseNumber, caseData); + await signInPage.visit(); + await signInPage.login(newSwanseaLocalAuthorityUserOne.email, newSwanseaLocalAuthorityUserOne.password); + + await signInPage.navigateTOCaseDetails(caseNumber); + await additionalApplications.gotoNextStep('Upload additional applications'); + await additionalApplications.chooseConfidentialC2ApplicationType(); + await additionalApplications.fillC2ApplicationDetails(); + + // Payment details + await expect(page.getByText('£263.00')).toBeVisible(); + await additionalApplications.payForApplication(); + await additionalApplications.checkYourAnsAndSubmit(); + await additionalApplications.tabNavigation('Other applications'); + + // can see some basic properties of the application + await expect(page.getByText('PBA1234567')).toBeVisible(); + await expect(page.getByText('Change surname or remove from jurisdiction.')).toBeVisible(); + await expect(page.getByText('Within 2 days')).toBeVisible(); + + // can see the draft order to be approved + await additionalApplications.tabNavigation('Draft orders'); + await expect(page.getByText('Draft order title')).toBeVisible(); + + await additionalApplications.clickSignOut(); + await signInPage.visit(); + await signInPage.login(CTSCUser.email, CTSCUser.password); + await signInPage.navigateTOCaseDetails(caseNumber); + + // CTSC can see some basic properties of the application + await additionalApplications.tabNavigation('Other applications'); + await expect(page.getByText('PBA1234567')).toBeVisible(); + await expect(page.getByText('Change surname or remove from jurisdiction.')).toBeVisible(); + await expect(page.getByText('Within 2 days')).toBeVisible(); + + // CTSC can see the draft order to be approved + await additionalApplications.tabNavigation('Draft orders'); + await expect(page.getByText('Draft order title')).toBeVisible(); }); -}); + + test('CTSC uploads a confidential C2 application with draft order', + async ({ page, signInPage, additionalApplications }) => { + caseName = 'CTSC uploads a confidential C2 application with draft order ' + dateTime.slice(0, 10); + await updateCase(caseName, caseNumber, caseData); + await signInPage.visit(); + await signInPage.login(CTSCUser.email, CTSCUser.password); + await signInPage.navigateTOCaseDetails(caseNumber); + + await additionalApplications.gotoNextStep('Upload additional applications'); + await additionalApplications.chooseConfidentialC2ApplicationType(); + await additionalApplications.fillC2ApplicationDetails(); + + // Payment details + await expect(page.getByText('£263.00')).toBeVisible(); + await additionalApplications.payForApplication(); + await additionalApplications.checkYourAnsAndSubmit(); + await additionalApplications.tabNavigation('Other applications'); + + // can see some basic properties of the application + await expect(page.getByText('PBA1234567')).toBeVisible(); + await expect(page.getByText('Change surname or remove from jurisdiction.')).toBeVisible(); + await expect(page.getByText('Within 2 days')).toBeVisible(); + + // can see the draft order to be approved + await additionalApplications.tabNavigation('Draft orders'); + await expect(page.getByText('Draft order title')).toBeVisible(); + + await additionalApplications.clickSignOut(); + await signInPage.visit(); + await signInPage.login(newSwanseaLocalAuthorityUserOne.email, newSwanseaLocalAuthorityUserOne.password); + await signInPage.navigateTOCaseDetails(caseNumber); + + // LA cannot see some basic properties of the application + await additionalApplications.tabNavigation('Draft orders'); + await expect(page.getByText('This is a confidential draft order and restricted viewing applies')).toBeVisible(); + + // LA cannot see the draft order to be approved + await additionalApplications.tabNavigation('Draft orders'); + await expect(page.getByText('This is a confidential draft order and restricted viewing applies')).toBeVisible(); + }); + + test('Respondent Solicitor Uploads additional applications', + async ({ page, signInPage, additionalApplications }) => { + caseName = 'Respondent solicitor Uploads additional application ' + dateTime.slice(0, 10); + await updateCase(caseName, caseNumber, caseWithResSolicitor); + await giveAccessToCase(caseNumber, privateSolicitorOrgUser, '[SOLICITORA]'); + await signInPage.visit(); + await signInPage.login(privateSolicitorOrgUser.email, privateSolicitorOrgUser.password); + await signInPage.navigateTOCaseDetails(caseNumber); + + await additionalApplications.gotoNextStep('Upload additional applications'); + await additionalApplications.chooseConfidentialC2ApplicationType(); + await additionalApplications.fillC2ApplicationDetails(); + + // Payment details + await expect(page.getByText('£263.00')).toBeVisible(); + await additionalApplications.payForApplication(); + await additionalApplications.checkYourAnsAndSubmit(); + await additionalApplications.tabNavigation('Other applications'); + + await additionalApplications.clickSignOut(); + await signInPage.visit(); + await signInPage.login(privateSolicitorOrgUser.email, privateSolicitorOrgUser.password); + await signInPage.navigateTOCaseDetails(caseNumber); + + // Assertion + await additionalApplications.tabNavigation('Other applications'); + await expect(page.getByText('This is a confidential application and restricted viewing applies')).toBeVisible(); + }); + + test('Failed Payment High Court WA task', async ({ page, signInPage, additionalApplications, caseFileView }) => { + caseName = 'Failed Payment High Court WA task ' + dateTime.slice(0, 10); + setHighCourt(caseData); + await updateCase(caseName, caseNumber, caseData); + await signInPage.visit(); + await signInPage.login(newSwanseaLocalAuthorityUserOne.email, newSwanseaLocalAuthorityUserOne.password); + await signInPage.navigateTOCaseDetails(caseNumber); + await additionalApplications.uploadBasicC2Application(false); + + // Check CFV + await caseFileView.goToCFVTab(); + await caseFileView.openFolder('Application'); + await caseFileView.openFolder('C2 applications'); + await expect(page.getByRole('tree')).toContainText('testPdf.pdf'); + + // If WA is enabled + if (testConfig.waEnabled) { + console.log('WA testing'); + await additionalApplications.clickSignOut(); + await signInPage.visit(); + await signInPage.login(HighCourtAdminUser.email, HighCourtAdminUser.password); + + await signInPage.navigateTOCaseDetails(caseNumber); + + // Judge in Wales should see this Welsh case task + be able to assign it to themselves + await additionalApplications.tabNavigation('Tasks'); + await additionalApplications.waitForTask('Failed Payment (High Court)'); + + // Assign and complete the task + await page.getByText('Assign to me').click(); + await page.getByText('Mark as done').click(); + await page.getByRole('button', { name: "Mark as done" }).click(); + + // Should be no more tasks on the page + await expect(page.getByText('Failed Payment (High Court)')).toHaveCount(0); + } + }); +}) From 985c831c034f4a620b28a14c444a5d5ed5fb050f Mon Sep 17 00:00:00 2001 From: "Chak Shing, Lo" Date: Wed, 23 Apr 2025 10:26:49 +0100 Subject: [PATCH 3/8] update question wordings --- ccd-definition/ComplexTypes/CareSupervision/1_PBAPayment.json | 2 +- .../ComplexTypes/CareSupervision/4_C2DocumentBundle.json | 2 +- .../CareSupervision/4_C2DocumentBundleConfidential.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ccd-definition/ComplexTypes/CareSupervision/1_PBAPayment.json b/ccd-definition/ComplexTypes/CareSupervision/1_PBAPayment.json index d9d5aac4da8..1d76c6dd7f2 100644 --- a/ccd-definition/ComplexTypes/CareSupervision/1_PBAPayment.json +++ b/ccd-definition/ComplexTypes/CareSupervision/1_PBAPayment.json @@ -4,7 +4,7 @@ "ID": "PBAPayment", "ListElementCode": "usePbaPayment", "FieldType": "YesOrNo", - "ElementLabel": "Paid with PBA", + "ElementLabel": "Do you want to enter PBA details?", "SecurityClassification": "Public" }, { diff --git a/ccd-definition/ComplexTypes/CareSupervision/4_C2DocumentBundle.json b/ccd-definition/ComplexTypes/CareSupervision/4_C2DocumentBundle.json index 2f1ce59b7dc..5937117b031 100644 --- a/ccd-definition/ComplexTypes/CareSupervision/4_C2DocumentBundle.json +++ b/ccd-definition/ComplexTypes/CareSupervision/4_C2DocumentBundle.json @@ -73,7 +73,7 @@ "ID": "C2DocumentBundle", "ListElementCode": "usePbaPayment", "FieldType": "YesOrNo", - "ElementLabel": "Paid with PBA", + "ElementLabel": "Do you want to enter PBA details?", "SecurityClassification": "Public" }, { diff --git a/ccd-definition/ComplexTypes/CareSupervision/4_C2DocumentBundleConfidential.json b/ccd-definition/ComplexTypes/CareSupervision/4_C2DocumentBundleConfidential.json index 678063bdcf7..f3e2d94af45 100644 --- a/ccd-definition/ComplexTypes/CareSupervision/4_C2DocumentBundleConfidential.json +++ b/ccd-definition/ComplexTypes/CareSupervision/4_C2DocumentBundleConfidential.json @@ -73,7 +73,7 @@ "ID": "C2DocumentBundleConfidential", "ListElementCode": "usePbaPayment", "FieldType": "YesOrNo", - "ElementLabel": "Paid with PBA", + "ElementLabel": "Do you want to enter PBA details?", "SecurityClassification": "Public" }, { From 3784372be112de5038265bcd0eb38703bc389fa2 Mon Sep 17 00:00:00 2001 From: "Chak Shing, Lo" Date: Wed, 23 Apr 2025 14:39:11 +0100 Subject: [PATCH 4/8] fix permission --- .../caseDocuments/AdditionalApplicationPayment.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ccd-definition/AuthorisationComplexType/caseDocuments/AdditionalApplicationPayment.json b/ccd-definition/AuthorisationComplexType/caseDocuments/AdditionalApplicationPayment.json index 4bc36b62eaa..83929ef492c 100644 --- a/ccd-definition/AuthorisationComplexType/caseDocuments/AdditionalApplicationPayment.json +++ b/ccd-definition/AuthorisationComplexType/caseDocuments/AdditionalApplicationPayment.json @@ -48,7 +48,7 @@ "[BARRISTER]", "caseworker-publiclaw-cafcass" ], - "CRUD": "CR" + "CRUD": "C" } ] }, From 2d27bdf85d1951fa9d84011eaaabce9cdf5cd921 Mon Sep 17 00:00:00 2001 From: "Chak Shing, Lo" Date: Wed, 30 Apr 2025 16:25:55 +0100 Subject: [PATCH 5/8] Update PBAPayment.json --- .../CaseEventToComplexTypes/upload-c2/PBAPayment.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ccd-definition/CaseEventToComplexTypes/upload-c2/PBAPayment.json b/ccd-definition/CaseEventToComplexTypes/upload-c2/PBAPayment.json index b5e89686102..f0ad5a1b8cd 100644 --- a/ccd-definition/CaseEventToComplexTypes/upload-c2/PBAPayment.json +++ b/ccd-definition/CaseEventToComplexTypes/upload-c2/PBAPayment.json @@ -8,7 +8,7 @@ "ListElementCode": "usePbaPayment", "FieldDisplayOrder": "1", "FieldShowCondition": "displayAmountToPay=\"Yes\"", - "DefaultValue": "Yes" + "DefaultValue": "Yes" }, { "LiveFrom": "01/01/2017", @@ -18,7 +18,7 @@ "DisplayContext": "MANDATORY", "ListElementCode": "pbaNumber", "FieldDisplayOrder": "2", - "FieldShowCondition": "displayAmountToPay=\"Yes\" AND temporaryPbaPayment.usePbaPayment=\"Yes\"" + "FieldShowCondition": "displayAmountToPay=\"Yes\" AND temporaryPbaPayment.usePbaPayment!=\"No\"" }, { "LiveFrom": "01/01/2017", @@ -28,7 +28,7 @@ "DisplayContext": "OPTIONAL", "ListElementCode": "clientCode", "FieldDisplayOrder": "3", - "FieldShowCondition": "displayAmountToPay=\"Yes\" AND temporaryPbaPayment.usePbaPayment=\"Yes\"" + "FieldShowCondition": "displayAmountToPay=\"Yes\" AND temporaryPbaPayment.usePbaPayment!=\"No\"" }, { "LiveFrom": "01/01/2017", @@ -38,6 +38,6 @@ "DisplayContext": "MANDATORY", "ListElementCode": "fileReference", "FieldDisplayOrder": "4", - "FieldShowCondition": "displayAmountToPay=\"Yes\" AND temporaryPbaPayment.usePbaPayment=\"Yes\"" + "FieldShowCondition": "displayAmountToPay=\"Yes\" AND temporaryPbaPayment.usePbaPayment!=\"No\"" } ] From 63bd5ff7f6f3ff88de6bd6c0efaea58c8324d0a7 Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Tue, 6 May 2025 14:58:09 +0100 Subject: [PATCH 6/8] DFPL-2670 --- playwright-e2e/pages/additional-applications.ts | 4 +--- playwright-e2e/pages/other-people-in-the-case.ts | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/playwright-e2e/pages/additional-applications.ts b/playwright-e2e/pages/additional-applications.ts index 61d1ef115db..afdbd7c749f 100644 --- a/playwright-e2e/pages/additional-applications.ts +++ b/playwright-e2e/pages/additional-applications.ts @@ -39,7 +39,7 @@ export class AdditionalApplications extends BasePage { this.selectApplicant = page.getByLabel('Select applicant'); this.selectApplication = page.getByLabel('What type of C2 application?'); this.checkbox = page.getByLabel('Yes'); - this.paymentPbaNumber = page.getByLabel('Payment by account (PBA)'); + this.paymentPbaNumber = page.getByLabel('Payment by account (PBA) number'); this.typeOfC2Application = page.getByLabel('Application with notice.'); } @@ -124,7 +124,6 @@ export class AdditionalApplications extends BasePage { await this.page.locator('#temporaryC2Document_draftOrdersBundle_0_title').fill('Draft order title'); await this.page.locator('#temporaryC2Document_draftOrdersBundle_0_document').setInputFiles(config.testWordFile); await this.expectAllUploadsCompleted(); - // added hard wait due to EXUI-1194 await this.page.waitForTimeout(6000); await this.page.locator('#temporaryC2Document_draftOrdersBundle_0_documentAcknowledge-ACK_RELATED_TO_CASE').check(); @@ -149,7 +148,6 @@ export class AdditionalApplications extends BasePage { } public async payForApplication() { - //await this.page.locator('[for="temporaryPbaPayment_usePbaPayment_Yes"]').check(); await this.paymentPbaNumber.fill('PBA1234567'); await this.page.getByLabel('Customer reference').fill('Customer reference'); await this.clickContinue(); diff --git a/playwright-e2e/pages/other-people-in-the-case.ts b/playwright-e2e/pages/other-people-in-the-case.ts index b0829a1540b..2b7aebfaa84 100644 --- a/playwright-e2e/pages/other-people-in-the-case.ts +++ b/playwright-e2e/pages/other-people-in-the-case.ts @@ -43,7 +43,7 @@ export class OtherPeopleInCase extends BasePage { await this.placeOfBirth.fill("London"); await this.currentAddress.getByLabel('No').check(); await this.reasonUnknownAddress.selectOption('1: No fixed abode'); - await this.telephoneNumber.fill("0123456789") + await this.telephoneNumber.fill("0123456789"); await this.relationshipToChild.fill("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam fermentum augue velit, eget bibendum est viverra vel. Sed id urna mollis") await this.contactDetailsHidden.getByLabel('No').check(); await this.page.getByLabel('Don\'t know').check(); From bd5768a17887890a29037230d362573ea9ce3556 Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Wed, 7 May 2025 10:06:50 +0100 Subject: [PATCH 7/8] DFPL-2670 Change to firefox browser --- playwright.config.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright.config.ts b/playwright.config.ts index e9bd60d4b3c..65fe6fa1a5e 100644 --- a/playwright.config.ts +++ b/playwright.config.ts @@ -55,7 +55,7 @@ export default defineConfig({ }, { name: "preview", - use: { ...devices["Desktop Chrome"] }, + use: { ...devices["Desktop Firefox"] }, retries: 3, timeout: 3*60*1000, expect: { timeout: 1*60*1000 }, From c53900f5a06f73eef75663562c793e95e721ec2f Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Thu, 8 May 2025 09:51:30 +0100 Subject: [PATCH 8/8] DFPL-5937 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ddbb07d59dc..8c637dcedcc 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "test:functional-firefox": "yarn playwright install firefox && yarn playwright test --project=firefox", "test:functional-ipadPro11": " yarn playwright install webkit && yarn playwright test --project=ipadPro11 ", "test:functional-galaxyS4": " yarn playwright install chromium && yarn playwright test --project=GalaxyS4 ", - "test:functional-nightly-preview": "yarn playwright install chromium && yarn playwright test --project=preview", + "test:functional-nightly-preview": "yarn playwright install firefox && yarn playwright test --project=preview", "test:smoke": "yarn npm audit --recursive --environment production && MOCHAWESOME_REPORTFILENAME=smoke REPORT_DIR=test-results/smokeTest REPORT_FILE=test-results/smokeTest/results.xml codeceptjs run --grep '@smoke-tests' --reporter mocha-multi --verbose", "test:local": "yarn playwright test --project=chromium --headed --repeat-each=1", "prepare": "husky install",