From 180da5d26403b501caacf293bdf7144cdaa094d0 Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Mon, 16 Dec 2024 14:54:50 +0000 Subject: [PATCH 01/14] DFPL-2566 --- .../caseData/mandatorySubmissionFields.json | 2 +- playwright-e2e/fixtures/create-fixture.ts | 8 +- .../pages/manage-la-transfer-to-courts.ts | 72 ++++++++++++++++++ .../manage-la-transfer-to-courts.spec.ts | 73 +++++++++++++++++++ 4 files changed, 153 insertions(+), 2 deletions(-) create mode 100644 playwright-e2e/pages/manage-la-transfer-to-courts.ts create mode 100644 playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts diff --git a/playwright-e2e/caseData/mandatorySubmissionFields.json b/playwright-e2e/caseData/mandatorySubmissionFields.json index be6ffe40beb..175c7808e59 100644 --- a/playwright-e2e/caseData/mandatorySubmissionFields.json +++ b/playwright-e2e/caseData/mandatorySubmissionFields.json @@ -201,7 +201,7 @@ "familyManCaseNumber": "SW24C51337", "localAuthorityPolicy": { "Organisation": { - "OrganisationID": "ORGSA", + "OrganisationID": "W9V61CP", "OrganisationName": "Swansea City Council" }, "OrgPolicyCaseAssignedRole": "[LASOLICITOR]" diff --git a/playwright-e2e/fixtures/create-fixture.ts b/playwright-e2e/fixtures/create-fixture.ts index fa3686ef0f1..49799f9a171 100644 --- a/playwright-e2e/fixtures/create-fixture.ts +++ b/playwright-e2e/fixtures/create-fixture.ts @@ -37,7 +37,8 @@ import { ReturnApplication } from "../pages/return-application"; import { Orders } from "../pages/orders"; import { CaseProgressionReport } from "../pages/case-progression-report"; import { LogExpertReport } from "../pages/log-expert-report"; -import { ChangeCaseName} from "../pages/change-case-name"; +import { ChangeCaseName } from "../pages/change-case-name"; +import { ManageLaTransferToCourts } from "../pages/manage-la-transfer-to-courts"; type CreateFixtures = { signInPage: SignInPage; @@ -79,6 +80,7 @@ type CreateFixtures = { changeCaseName: ChangeCaseName; caseProgressionReport: CaseProgressionReport; orders: Orders; + manageLaTransferToCourts: ManageLaTransferToCourts }; @@ -238,4 +240,8 @@ export const test = base.extend({ caseProgressionReport: async ({ page }, use) => { await use(new CaseProgressionReport(page)); }, + + manageLaTransferToCourts: async ({ page }, use) => { + await use(new ManageLaTransferToCourts(page)); + }, }); diff --git a/playwright-e2e/pages/manage-la-transfer-to-courts.ts b/playwright-e2e/pages/manage-la-transfer-to-courts.ts new file mode 100644 index 00000000000..3a2c0a485a8 --- /dev/null +++ b/playwright-e2e/pages/manage-la-transfer-to-courts.ts @@ -0,0 +1,72 @@ +import { type Page, type Locator, expect } from "@playwright/test"; +import { BasePage } from "./base-page"; + +export class ManageLaTransferToCourts extends BasePage { + readonly manageLaTransferToCourts: Locator; + readonly caseType: Locator; + readonly transferAnotherCourt: Locator; + readonly selectNewCourt: Locator; + readonly giveAccessToAnotherLa: Locator; + readonly selectLocalAuthority: Locator; + readonly localAuthorityToTransfer: Locator; + readonly removeAccess: Locator; + readonly transferToAnotherLa: Locator; + readonly fullName: Locator; + readonly email: Locator; + readonly courtTransfer: Locator; + readonly saveAndContinueButton: Locator; + + constructor(page: Page) { + super(page); + this.manageLaTransferToCourts = page.getByRole('heading', { name: 'Manage LAs / Transfer to court', exact: true }); + this.caseType = page.getByLabel('Case type'); + this.transferAnotherCourt = page.getByLabel('Transfer to another Court'); + this.selectNewCourt = page.getByLabel('Select new court'); + this.giveAccessToAnotherLa = page.getByRole('radio', { name: 'Give case access to another' }); + this.selectLocalAuthority = page.getByLabel('Select local authority'); + this.localAuthorityToTransfer = page.getByLabel('Select local authority to'); + this.removeAccess = page.getByRole('radio', { name: 'Remove case access from local' }); + this.transferToAnotherLa = page.getByLabel('Transfer the case to another'); + this.fullName = page.getByRole('textbox', { name: 'Full name' }); + this.email = page.getByLabel('Email', { exact: true }); + this.courtTransfer = page.getByRole('group', { name: 'Is the case transferring to a different court' }); + this.saveAndContinueButton = page.getByRole("button", {name: "Save and continue"}); + } + public async updateManageLaTransferToCourts() { + await expect(this.manageLaTransferToCourts).toBeVisible(); + await this.transferAnotherCourt.click(); + await this.continueButton.click(); + await this.selectNewCourt.selectOption('Central Family Court'); + await this.continueButton.click(); + await this.saveAndContinue.click(); + } + public async updateCourtAccess() { + await expect(this.manageLaTransferToCourts).toBeVisible(); + await this.giveAccessToAnotherLa.click(); + await this.selectLocalAuthority.selectOption('London Borough Hillingdon'); + await this.continueButton.click(); + await this.continueButton.click(); + await this.saveAndContinue.click(); + } + public async updateRemoveAccess() { + await expect(this.manageLaTransferToCourts).toBeVisible(); + await this.removeAccess.click(); + await this.continueButton.click(); + await this.continueButton.click(); + await this.saveAndContinue.click(); + } + public async updateTranferToLa() { + await expect(this.manageLaTransferToCourts).toBeVisible(); + await this.transferToAnotherLa.click(); + await this.continueButton.click(); + await this.localAuthorityToTransfer.selectOption('4: HN'); + await this.continueButton.click(); + await this.fullName.fill('Sam Hill'); + await this.email.fill('sam@hillingdon.gov.uk'); + await this.continueButton.click(); + await this.courtTransfer.getByLabel('Yes').check(); + await this.selectNewCourt.selectOption('2: 332'); + await this.continueButton.click(); + await this.saveAndContinue.click(); + } +} \ No newline at end of file diff --git a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts new file mode 100644 index 00000000000..661a376e600 --- /dev/null +++ b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts @@ -0,0 +1,73 @@ +import { test } from '../fixtures/create-fixture'; +import { createCase, updateCase } from "../utils/api-helper"; +import caseData from '../caseData/mandatorySubmissionFields.json' assert { type: "json" }; +import { CTSCTeamLeadUser, newSwanseaLocalAuthorityUserOne, HighCourtAdminUser, CTSCUser } from "../settings/user-credentials"; +import { expect } from "@playwright/test"; + +test.describe('Manage LAs / Transfer to court', () => { + const dateTime = new Date().toISOString(); + let caseNumber: string; + let caseName: string; + test.beforeEach(async () => { + caseNumber = await createCase('e2e case', newSwanseaLocalAuthorityUserOne); + }); + + test('CTSC transfer to a new court and submit case', + async ({ page, signInPage, manageLaTransferToCourts }) => { + caseName = 'CTSC transfers case' + dateTime.slice(0, 10); + await updateCase(caseName, caseNumber, caseData); + await signInPage.visit(); + await signInPage.login(CTSCTeamLeadUser.email, CTSCTeamLeadUser.password); + await signInPage.navigateTOCaseDetails(caseNumber); + + await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); + await manageLaTransferToCourts.updateManageLaTransferToCourts(); + await manageLaTransferToCourts.tabNavigation('People in the case'); + await expect(page.getByText('Designated local authority')).toBeVisible(); + + }) + test('CTSC gives access to another local authority', + async ({ page, signInPage, manageLaTransferToCourts }) => { + caseName = 'CTSC gives access to another Local authority' + dateTime.slice(0, 10); + await updateCase(caseName, caseNumber, caseData); + await signInPage.visit(); + await signInPage.login(CTSCTeamLeadUser.email, CTSCTeamLeadUser.password); + await signInPage.navigateTOCaseDetails(caseNumber); + + await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); + await manageLaTransferToCourts.updateCourtAccess(); + await manageLaTransferToCourts.tabNavigation('People in the case'); + await expect(page.getByText('Applicant 2')).toBeVisible(); + + }) + test('CTSC removes access', + async ({ page, signInPage, manageLaTransferToCourts }) => { + caseName = 'CTSC removed access' + dateTime.slice(0, 10); + await updateCase(caseName, caseNumber, caseData); + await signInPage.visit(); + await signInPage.login(CTSCTeamLeadUser.email, CTSCTeamLeadUser.password); + await signInPage.navigateTOCaseDetails(caseNumber); + await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); + await manageLaTransferToCourts.updateCourtAccess(); + await manageLaTransferToCourts.tabNavigation('People in the case'); + await expect(page.getByText('Applicant 1')).toBeVisible(); + + await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); + await manageLaTransferToCourts.updateRemoveAccess(); + await manageLaTransferToCourts.tabNavigation('People in the case'); + await expect(page.getByText('Applicant 1')).toBeVisible(); + }) + test('CTSC tranfers to another local authority', + async ({ page, signInPage, manageLaTransferToCourts }) => { + caseName = 'CTSC transfers to another local authority' + dateTime.slice(0, 10); + await updateCase(caseName, caseNumber, caseData); + await signInPage.visit(); + await signInPage.login(CTSCTeamLeadUser.email, CTSCTeamLeadUser.password); + await signInPage.navigateTOCaseDetails(caseNumber); + + await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); + await manageLaTransferToCourts.updateTranferToLa(); + await manageLaTransferToCourts.tabNavigation('People in the case'); + await expect(page.getByText('Designated local authority')).toBeVisible(); + }) +}); From 01fa52e5b69a44c2608ae0d45ee6f36672344b47 Mon Sep 17 00:00:00 2001 From: Braimah101 <41795070+Braimah101@users.noreply.github.com> Date: Mon, 16 Dec 2024 16:45:02 +0000 Subject: [PATCH 02/14] Update create-fixture.ts Adjusted code --- playwright-e2e/fixtures/create-fixture.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playwright-e2e/fixtures/create-fixture.ts b/playwright-e2e/fixtures/create-fixture.ts index cd6e7cad1bc..40409258e62 100644 --- a/playwright-e2e/fixtures/create-fixture.ts +++ b/playwright-e2e/fixtures/create-fixture.ts @@ -41,7 +41,7 @@ import { LogExpertReport } from "../pages/log-expert-report"; import { ChangeCaseName } from "../pages/change-case-name"; import { ManageLaTransferToCourts } from "../pages/manage-la-transfer-to-courts"; import { ManageRepresentatives } from "../pages/manage-representatives"; -import { ChangeCaseName} from "../pages/change-case-name"; +import { ChangeCaseName } from "../pages/change-case-name"; type CreateFixtures = { signInPage: SignInPage; From f5004ca960cae611898ea6a345c4a465452731c6 Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Tue, 17 Dec 2024 10:39:00 +0000 Subject: [PATCH 03/14] DFPL-2566 --- playwright-e2e/fixtures/create-fixture.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/playwright-e2e/fixtures/create-fixture.ts b/playwright-e2e/fixtures/create-fixture.ts index 40409258e62..882f2f45948 100644 --- a/playwright-e2e/fixtures/create-fixture.ts +++ b/playwright-e2e/fixtures/create-fixture.ts @@ -41,7 +41,6 @@ import { LogExpertReport } from "../pages/log-expert-report"; import { ChangeCaseName } from "../pages/change-case-name"; import { ManageLaTransferToCourts } from "../pages/manage-la-transfer-to-courts"; import { ManageRepresentatives } from "../pages/manage-representatives"; -import { ChangeCaseName } from "../pages/change-case-name"; type CreateFixtures = { signInPage: SignInPage; From bf31bec3b8eeae61e5149708fc0aa79e7027e245 Mon Sep 17 00:00:00 2001 From: prabhamuthu15 Date: Tue, 17 Dec 2024 11:53:35 +0000 Subject: [PATCH 04/14] UpdateRemoveLAFromCase --- .../mandatorySubmissionWithTwoLAFields.json | 309 ++++++++++++++++++ .../manage-la-transfer-to-courts.spec.ts | 8 +- 2 files changed, 311 insertions(+), 6 deletions(-) create mode 100644 playwright-e2e/caseData/mandatorySubmissionWithTwoLAFields.json diff --git a/playwright-e2e/caseData/mandatorySubmissionWithTwoLAFields.json b/playwright-e2e/caseData/mandatorySubmissionWithTwoLAFields.json new file mode 100644 index 00000000000..f0af7e0be98 --- /dev/null +++ b/playwright-e2e/caseData/mandatorySubmissionWithTwoLAFields.json @@ -0,0 +1,309 @@ + + { + "state": "SUBMITTED", + "caseData": { + "caseName": "e2e test new case", + "orders": { + "orderType": [ + "CARE_ORDER" + ] + }, + "grounds": { + "thresholdReason": [ + "noCare" + ], + "thresholdDetails": "mock threshold details" + }, + "hearing": { + "reason": "test reason", + "timeFrame": "Same day" + }, + "children1": [ + { + "id": "5c578fcc-7e41-45b0-82f7-46c38a769cb3", + "value": { + "party": { + "gender": "Boy", + "lastName": "Jones", + "firstName": "Timothy", + "dateOfBirth": "2015-08-01" + } + } + }, + { + "id": "cc792469-47f1-4cc8-8979-6b36bcf6b0a6", + "value": { + "party": { + "gender": "Boy", + "lastName": "Black", + "firstName": "John", + "dateOfBirth": "2016-09-02" + } + } + }, + { + "id": "d56b23ee-ca80-42cc-bf9f-2e65cec00985", + "value": { + "party": { + "gender": "Boy", + "lastName": "Black", + "firstName": "William", + "dateOfBirth": "2017-10-01" + } + } + }, + { + "id": "2135caa3-62d1-4692-99a9-3524397c6b05", + "value": { + "party": { + "gender": "Girl", + "lastName": "Black", + "firstName": "Sarah", + "dateOfBirth": "2010-05-02" + } + } + } + ], + "solicitor": { + "dx": "160010 Kingsway 7", + "name": "John Smith", + "email": "solicitor@email.com", + "mobile": "07000000000", + "reference": "reference", + "telephone": "00000000000" + }, + "applicants": [ + { + "id": "583fe873-f0f2-4b38-bc8b-825c07ebdd41", + "value": { + "party": { + "email": { + "email": "swansea@test.com" + }, + "address": { + "County": "United Kingdom", + "PostCode": "CR0 2GE", + "PostTown": "London", + "AddressLine1": "Flat 12, Pinnacle Apartments", + "AddressLine2": "Saffron Central Square 11" + }, + "partyId": "a77f0692-60c8-44e1-aae7-f067851bbc89", + "jobTitle": "Legal adviser", + "partyType": "ORGANISATION", + "pbaNumber": "PBA0082848", + "clientCode": "8888", + "mobileNumber": { + "telephoneNumber": "07000000000" + }, + "telephoneNumber": { + "telephoneNumber": "00000000000", + "contactDirection": "Jonathon Walker" + }, + "organisationName": "Swansea City Council", + "customerReference": "Example reference" + }, + "leadApplicantIndicator": "Yes" + } + } + ], + "sendToCtsc": "Yes", + "localAuthorities": [ + { + "id": "048aa1fd-e3a5-4651-99b0-53776bd03773", + "value": { + "name": "Swansea City Council", + "email": "test@test.com", + "phone": "02027725772", + "address": { + "County": "Swansea", + "Country": "United Kingdom", + "PostCode": "CR0 2GE", + "PostTown": "Swansea", + "AddressLine1": "Flat 1, Swansea Apartments", + "AddressLine2": "Swansea Central Square 11", + "AddressLine3": "40 Fleet street" + }, + "pbaNumber": "PBA1234567", + "colleagues": [ + { + "id": "1a44928d-6dcd-4943-86c6-5dca0f6ba376", + "value": { + "role": "SOLICITOR", + "email": "test@test.com", + "fullName": "Solicitor 1", + "notificationRecipient": "Yes" + } + } + ], + "designated": "Yes" + } + }, + { + "id": "a1f9f864-672c-4f5f-9ae7-a7eebcff2afe", + "value": { + "address": { + "AddressLine2": "Hillingdon Central Square 1", + "AddressLine1": "Flat 1, Hillingdon Apartments", + "PostTown": "London", + "PostCode": "CR0 2GE" + }, + "designated": "No", + "phone": null, + "pbaNumber": null, + "clientCode": null, + "legalTeamManager": null, + "colleagues": [], + "customerReference": null, + "name": "London Borough Hillingdon", + "id": "Y3CSW9I", + "email": "FamilyPublicLaw+hn@gmail.com" + } + } + + ], + "respondents1": [ + { + "id": "6e3b4492-3a0d-4eb8-8a18-a4a42a7b158a", + "value": { + "party": { + "gender": "Male", + "address": { + "County": "", + "Country": "United Kingdom", + "PostCode": "RG4 7AA", + "PostTown": "Reading", + "AddressLine1": "Flat 2", + "AddressLine2": "Caversham House 15-17", + "AddressLine3": "Church Road" + }, + "lastName": "Bloggs", + "firstName": "Joe", + "dateOfBirth": "1980-01-01", + "placeOfBirth": "London", + "telephoneNumber": { + "telephoneNumber": "00000 000000" + }, + "relationshipToChild": "Uncle" + } + } + } + ], + "skeletonArgumentList": [ + { + "id": "87ac3aa1-5183-4cd3-8d02-3af704c994e4", + "value": { + "document": { + "document_url": "${TEST_DOCUMENT_URL}", + "document_filename": "Test.txt", + "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" + }, + "uploaderType": "HMCTS", + "uploaderCaseRoles": [], + "markAsConfidential": "No", + "documentAcknowledge": [ + "ACK_RELATED_TO_CASE" + ], + "hasConfidentialAddress": "No" + } + } + ], + "dateSubmitted": "TO BE FILLED WITH VALID DATA", + "submittedForm": { + "document_url": "${TEST_DOCUMENT_URL}", + "document_filename": "c110a.pdf", + "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" + }, + "submissionConsent": [ + "agree" + ], + "allocationProposal": { + "proposal": "District judge" + }, + "caseLocalAuthority": "SA", + "familyManCaseNumber": "SW24C51337", + "sharedLocalAuthorityPolicy": { + "OrgPolicyCaseAssignedRole": "[LASHARED]", + "Organisation": { + "OrganisationID": "Y3CSW9I", + "OrganisationName": "London Borough Hillingdon" + } + }, + "localAuthorityPolicy": { + "Organisation": { + "OrganisationID": "W9V61CP", + "OrganisationName": "Swansea City Council" + }, + "OrgPolicyCaseAssignedRole": "[LASOLICITOR]" + }, + "caseLocalAuthorityName": "Swansea City Council", + "displayAmountToPay": "Yes", + "temporaryApplicationDocuments": [ + { + "id": "681458fa-9c6b-4c25-a275-77b23a3375aa", + "value": { + "document": { + "document_url": "${TEST_DOCUMENT_URL}", + "document_filename": "solicitor-role-tech.docx", + "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" + }, + "uploadedBy": null, + "documentName": null, + "documentType": "THRESHOLD", + "includedInSWET": null, + "dateTimeUploaded": null + } + } + ], + "allocatedJudge": { + "judgeTitle": "HER_HONOUR_JUDGE", + "judgeLastName": "Moley", + "judgeEmailAddress": "moley@example.com" + }, + "additionalApplicationsBundle": [ + { + "id": "4ae96392-b71d-40a6-9e59-a66d3fd279a5", + "value": { + "author": "HMCTS", + "pbaPayment": { + "usePbaPayment": "No" + }, + "c2DocumentBundle": { + "id": "2c3d7329-8206-44a1-b1b4-7502ab253b0f", + "type": "WITHOUT_NOTICE", + "author": "HMCTS", + "document": { + "document_url": "${TEST_DOCUMENT_URL}", + "document_filename": "Test.txt", + "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" + }, + "uploadedDateTime": "25 March 2021, 3:16pm", + "supplementsBundle": [], + "supportingEvidenceLA": [], + "supportingEvidenceNC": [], + "supportingEvidenceBundle": [], + "c2AdditionalOrdersRequested": [ + "CHANGE_SURNAME_OR_REMOVE_JURISDICTION" + ] + }, + "uploadedDateTime": "25 March 2021, 3:16pm", + "otherApplicationsBundle": { + "id": "85bb3a49-e178-4a3a-ad73-165005d8c4bf", + "author": "HMCTS", + "document": { + "document_url": "${TEST_DOCUMENT_URL}", + "document_filename": "Test.txt", + "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" + }, + "applicationType": "C100_CHILD_ARRANGEMENTS", + "uploadedDateTime": "25 March 2021, 3:16pm", + "supplementsBundle": [], + "supportingEvidenceLA": [], + "supportingEvidenceNC": [], + "supportingEvidenceBundle": [] + } + } + } + ] + } +} + diff --git a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts index 661a376e600..26a83314c97 100644 --- a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts +++ b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts @@ -1,6 +1,7 @@ import { test } from '../fixtures/create-fixture'; import { createCase, updateCase } from "../utils/api-helper"; import caseData from '../caseData/mandatorySubmissionFields.json' assert { type: "json" }; +import caseDataWithTwoLA from '../caseData/mandatorySubmissionWithTwoLAFields.json' assert { type: "json" }; import { CTSCTeamLeadUser, newSwanseaLocalAuthorityUserOne, HighCourtAdminUser, CTSCUser } from "../settings/user-credentials"; import { expect } from "@playwright/test"; @@ -43,15 +44,10 @@ test.describe('Manage LAs / Transfer to court', () => { test('CTSC removes access', async ({ page, signInPage, manageLaTransferToCourts }) => { caseName = 'CTSC removed access' + dateTime.slice(0, 10); - await updateCase(caseName, caseNumber, caseData); + await updateCase(caseName, caseNumber, caseDataWithTwoLA); await signInPage.visit(); await signInPage.login(CTSCTeamLeadUser.email, CTSCTeamLeadUser.password); await signInPage.navigateTOCaseDetails(caseNumber); - await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); - await manageLaTransferToCourts.updateCourtAccess(); - await manageLaTransferToCourts.tabNavigation('People in the case'); - await expect(page.getByText('Applicant 1')).toBeVisible(); - await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateRemoveAccess(); await manageLaTransferToCourts.tabNavigation('People in the case'); From 3c07d5911342a999452a53b4f381d6f63934990e Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:33:19 +0000 Subject: [PATCH 05/14] DFPL-2566 madeChangesToCode --- .../mandatorySubmissionWithTwoLAFields.json | 556 +++++++++--------- .../manage-la-transfer-to-courts.spec.ts | 11 +- 2 files changed, 284 insertions(+), 283 deletions(-) diff --git a/playwright-e2e/caseData/mandatorySubmissionWithTwoLAFields.json b/playwright-e2e/caseData/mandatorySubmissionWithTwoLAFields.json index f0af7e0be98..0d558f9ffe2 100644 --- a/playwright-e2e/caseData/mandatorySubmissionWithTwoLAFields.json +++ b/playwright-e2e/caseData/mandatorySubmissionWithTwoLAFields.json @@ -1,309 +1,309 @@ - { - "state": "SUBMITTED", - "caseData": { - "caseName": "e2e test new case", - "orders": { - "orderType": [ - "CARE_ORDER" - ] - }, - "grounds": { - "thresholdReason": [ - "noCare" - ], - "thresholdDetails": "mock threshold details" - }, - "hearing": { - "reason": "test reason", - "timeFrame": "Same day" - }, - "children1": [ - { - "id": "5c578fcc-7e41-45b0-82f7-46c38a769cb3", - "value": { - "party": { - "gender": "Boy", - "lastName": "Jones", - "firstName": "Timothy", - "dateOfBirth": "2015-08-01" - } - } +{ + "state": "SUBMITTED", + "caseData": { + "caseName": "e2e test new case", + "orders": { + "orderType": [ + "CARE_ORDER" + ] }, - { - "id": "cc792469-47f1-4cc8-8979-6b36bcf6b0a6", - "value": { - "party": { - "gender": "Boy", - "lastName": "Black", - "firstName": "John", - "dateOfBirth": "2016-09-02" - } - } + "grounds": { + "thresholdReason": [ + "noCare" + ], + "thresholdDetails": "mock threshold details" }, - { - "id": "d56b23ee-ca80-42cc-bf9f-2e65cec00985", - "value": { - "party": { - "gender": "Boy", - "lastName": "Black", - "firstName": "William", - "dateOfBirth": "2017-10-01" + "hearing": { + "reason": "test reason", + "timeFrame": "Same day" + }, + "children1": [ + { + "id": "5c578fcc-7e41-45b0-82f7-46c38a769cb3", + "value": { + "party": { + "gender": "Boy", + "lastName": "Jones", + "firstName": "Timothy", + "dateOfBirth": "2015-08-01" + } + } + }, + { + "id": "cc792469-47f1-4cc8-8979-6b36bcf6b0a6", + "value": { + "party": { + "gender": "Boy", + "lastName": "Black", + "firstName": "John", + "dateOfBirth": "2016-09-02" + } + } + }, + { + "id": "d56b23ee-ca80-42cc-bf9f-2e65cec00985", + "value": { + "party": { + "gender": "Boy", + "lastName": "Black", + "firstName": "William", + "dateOfBirth": "2017-10-01" + } + } + }, + { + "id": "2135caa3-62d1-4692-99a9-3524397c6b05", + "value": { + "party": { + "gender": "Girl", + "lastName": "Black", + "firstName": "Sarah", + "dateOfBirth": "2010-05-02" + } } } + ], + "solicitor": { + "dx": "160010 Kingsway 7", + "name": "John Smith", + "email": "solicitor@email.com", + "mobile": "07000000000", + "reference": "reference", + "telephone": "00000000000" }, - { - "id": "2135caa3-62d1-4692-99a9-3524397c6b05", - "value": { - "party": { - "gender": "Girl", - "lastName": "Black", - "firstName": "Sarah", - "dateOfBirth": "2010-05-02" + "applicants": [ + { + "id": "583fe873-f0f2-4b38-bc8b-825c07ebdd41", + "value": { + "party": { + "email": { + "email": "swansea@test.com" + }, + "address": { + "County": "United Kingdom", + "PostCode": "CR0 2GE", + "PostTown": "London", + "AddressLine1": "Flat 12, Pinnacle Apartments", + "AddressLine2": "Saffron Central Square 11" + }, + "partyId": "a77f0692-60c8-44e1-aae7-f067851bbc89", + "jobTitle": "Legal adviser", + "partyType": "ORGANISATION", + "pbaNumber": "PBA0082848", + "clientCode": "8888", + "mobileNumber": { + "telephoneNumber": "07000000000" + }, + "telephoneNumber": { + "telephoneNumber": "00000000000", + "contactDirection": "Jonathon Walker" + }, + "organisationName": "Swansea City Council", + "customerReference": "Example reference" + }, + "leadApplicantIndicator": "Yes" } } - } - ], - "solicitor": { - "dx": "160010 Kingsway 7", - "name": "John Smith", - "email": "solicitor@email.com", - "mobile": "07000000000", - "reference": "reference", - "telephone": "00000000000" - }, - "applicants": [ - { - "id": "583fe873-f0f2-4b38-bc8b-825c07ebdd41", - "value": { - "party": { - "email": { - "email": "swansea@test.com" - }, + ], + "sendToCtsc": "Yes", + "localAuthorities": [ + { + "id": "048aa1fd-e3a5-4651-99b0-53776bd03773", + "value": { + "name": "Swansea City Council", + "email": "test@test.com", + "phone": "02027725772", "address": { - "County": "United Kingdom", + "County": "Swansea", + "Country": "United Kingdom", "PostCode": "CR0 2GE", - "PostTown": "London", - "AddressLine1": "Flat 12, Pinnacle Apartments", - "AddressLine2": "Saffron Central Square 11" - }, - "partyId": "a77f0692-60c8-44e1-aae7-f067851bbc89", - "jobTitle": "Legal adviser", - "partyType": "ORGANISATION", - "pbaNumber": "PBA0082848", - "clientCode": "8888", - "mobileNumber": { - "telephoneNumber": "07000000000" - }, - "telephoneNumber": { - "telephoneNumber": "00000000000", - "contactDirection": "Jonathon Walker" + "PostTown": "Swansea", + "AddressLine1": "Flat 1, Swansea Apartments", + "AddressLine2": "Swansea Central Square 11", + "AddressLine3": "40 Fleet street" }, - "organisationName": "Swansea City Council", - "customerReference": "Example reference" - }, - "leadApplicantIndicator": "Yes" - } - } - ], - "sendToCtsc": "Yes", - "localAuthorities": [ - { - "id": "048aa1fd-e3a5-4651-99b0-53776bd03773", - "value": { - "name": "Swansea City Council", - "email": "test@test.com", - "phone": "02027725772", - "address": { - "County": "Swansea", - "Country": "United Kingdom", - "PostCode": "CR0 2GE", - "PostTown": "Swansea", - "AddressLine1": "Flat 1, Swansea Apartments", - "AddressLine2": "Swansea Central Square 11", - "AddressLine3": "40 Fleet street" - }, - "pbaNumber": "PBA1234567", - "colleagues": [ - { - "id": "1a44928d-6dcd-4943-86c6-5dca0f6ba376", - "value": { - "role": "SOLICITOR", - "email": "test@test.com", - "fullName": "Solicitor 1", - "notificationRecipient": "Yes" + "pbaNumber": "PBA1234567", + "colleagues": [ + { + "id": "1a44928d-6dcd-4943-86c6-5dca0f6ba376", + "value": { + "role": "SOLICITOR", + "email": "test@test.com", + "fullName": "Solicitor 1", + "notificationRecipient": "Yes" + } } - } - ], - "designated": "Yes" - } - }, - { - "id": "a1f9f864-672c-4f5f-9ae7-a7eebcff2afe", - "value": { - "address": { - "AddressLine2": "Hillingdon Central Square 1", - "AddressLine1": "Flat 1, Hillingdon Apartments", - "PostTown": "London", - "PostCode": "CR0 2GE" - }, - "designated": "No", - "phone": null, - "pbaNumber": null, - "clientCode": null, - "legalTeamManager": null, - "colleagues": [], - "customerReference": null, - "name": "London Borough Hillingdon", - "id": "Y3CSW9I", - "email": "FamilyPublicLaw+hn@gmail.com" - } - } - - ], - "respondents1": [ - { - "id": "6e3b4492-3a0d-4eb8-8a18-a4a42a7b158a", - "value": { - "party": { - "gender": "Male", + ], + "designated": "Yes" + } + }, + { + "id": "a1f9f864-672c-4f5f-9ae7-a7eebcff2afe", + "value": { "address": { - "County": "", - "Country": "United Kingdom", - "PostCode": "RG4 7AA", - "PostTown": "Reading", - "AddressLine1": "Flat 2", - "AddressLine2": "Caversham House 15-17", - "AddressLine3": "Church Road" - }, - "lastName": "Bloggs", - "firstName": "Joe", - "dateOfBirth": "1980-01-01", - "placeOfBirth": "London", - "telephoneNumber": { - "telephoneNumber": "00000 000000" + "AddressLine2": "Hillingdon Central Square 1", + "AddressLine1": "Flat 1, Hillingdon Apartments", + "PostTown": "London", + "PostCode": "CR0 2GE" }, - "relationshipToChild": "Uncle" + "designated": "No", + "phone": null, + "pbaNumber": null, + "clientCode": null, + "legalTeamManager": null, + "colleagues": [], + "customerReference": null, + "name": "London Borough Hillingdon", + "id": "Y3CSW9I", + "email": "FamilyPublicLaw+hn@gmail.com" } } - } - ], - "skeletonArgumentList": [ - { - "id": "87ac3aa1-5183-4cd3-8d02-3af704c994e4", - "value": { - "document": { - "document_url": "${TEST_DOCUMENT_URL}", - "document_filename": "Test.txt", - "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" - }, - "uploaderType": "HMCTS", - "uploaderCaseRoles": [], - "markAsConfidential": "No", - "documentAcknowledge": [ - "ACK_RELATED_TO_CASE" - ], - "hasConfidentialAddress": "No" - } - } - ], - "dateSubmitted": "TO BE FILLED WITH VALID DATA", - "submittedForm": { - "document_url": "${TEST_DOCUMENT_URL}", - "document_filename": "c110a.pdf", - "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" - }, - "submissionConsent": [ - "agree" - ], - "allocationProposal": { - "proposal": "District judge" - }, - "caseLocalAuthority": "SA", - "familyManCaseNumber": "SW24C51337", - "sharedLocalAuthorityPolicy": { - "OrgPolicyCaseAssignedRole": "[LASHARED]", - "Organisation": { - "OrganisationID": "Y3CSW9I", - "OrganisationName": "London Borough Hillingdon" - } - }, - "localAuthorityPolicy": { - "Organisation": { - "OrganisationID": "W9V61CP", - "OrganisationName": "Swansea City Council" - }, - "OrgPolicyCaseAssignedRole": "[LASOLICITOR]" - }, - "caseLocalAuthorityName": "Swansea City Council", - "displayAmountToPay": "Yes", - "temporaryApplicationDocuments": [ - { - "id": "681458fa-9c6b-4c25-a275-77b23a3375aa", - "value": { - "document": { - "document_url": "${TEST_DOCUMENT_URL}", - "document_filename": "solicitor-role-tech.docx", - "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" - }, - "uploadedBy": null, - "documentName": null, - "documentType": "THRESHOLD", - "includedInSWET": null, - "dateTimeUploaded": null + + ], + "respondents1": [ + { + "id": "6e3b4492-3a0d-4eb8-8a18-a4a42a7b158a", + "value": { + "party": { + "gender": "Male", + "address": { + "County": "", + "Country": "United Kingdom", + "PostCode": "RG4 7AA", + "PostTown": "Reading", + "AddressLine1": "Flat 2", + "AddressLine2": "Caversham House 15-17", + "AddressLine3": "Church Road" + }, + "lastName": "Bloggs", + "firstName": "Joe", + "dateOfBirth": "1980-01-01", + "placeOfBirth": "London", + "telephoneNumber": { + "telephoneNumber": "00000 000000" + }, + "relationshipToChild": "Uncle" + } + } } - } - ], - "allocatedJudge": { - "judgeTitle": "HER_HONOUR_JUDGE", - "judgeLastName": "Moley", - "judgeEmailAddress": "moley@example.com" - }, - "additionalApplicationsBundle": [ - { - "id": "4ae96392-b71d-40a6-9e59-a66d3fd279a5", + ], + "skeletonArgumentList": [ + { + "id": "87ac3aa1-5183-4cd3-8d02-3af704c994e4", "value": { - "author": "HMCTS", - "pbaPayment": { - "usePbaPayment": "No" - }, - "c2DocumentBundle": { - "id": "2c3d7329-8206-44a1-b1b4-7502ab253b0f", - "type": "WITHOUT_NOTICE", - "author": "HMCTS", "document": { "document_url": "${TEST_DOCUMENT_URL}", "document_filename": "Test.txt", "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" }, - "uploadedDateTime": "25 March 2021, 3:16pm", - "supplementsBundle": [], - "supportingEvidenceLA": [], - "supportingEvidenceNC": [], - "supportingEvidenceBundle": [], - "c2AdditionalOrdersRequested": [ - "CHANGE_SURNAME_OR_REMOVE_JURISDICTION" - ] - }, - "uploadedDateTime": "25 March 2021, 3:16pm", - "otherApplicationsBundle": { - "id": "85bb3a49-e178-4a3a-ad73-165005d8c4bf", - "author": "HMCTS", + "uploaderType": "HMCTS", + "uploaderCaseRoles": [], + "markAsConfidential": "No", + "documentAcknowledge": [ + "ACK_RELATED_TO_CASE" + ], + "hasConfidentialAddress": "No" + } + } + ], + "dateSubmitted": "TO BE FILLED WITH VALID DATA", + "submittedForm": { + "document_url": "${TEST_DOCUMENT_URL}", + "document_filename": "c110a.pdf", + "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" + }, + "submissionConsent": [ + "agree" + ], + "allocationProposal": { + "proposal": "District judge" + }, + "caseLocalAuthority": "SA", + "familyManCaseNumber": "SW24C51337", + "sharedLocalAuthorityPolicy": { + "OrgPolicyCaseAssignedRole": "[LASHARED]", + "Organisation": { + "OrganisationID": "Y3CSW9I", + "OrganisationName": "London Borough Hillingdon" + } + }, + "localAuthorityPolicy": { + "Organisation": { + "OrganisationID": "W9V61CP", + "OrganisationName": "Swansea City Council" + }, + "OrgPolicyCaseAssignedRole": "[LASOLICITOR]" + }, + "caseLocalAuthorityName": "Swansea City Council", + "displayAmountToPay": "Yes", + "temporaryApplicationDocuments": [ + { + "id": "681458fa-9c6b-4c25-a275-77b23a3375aa", + "value": { "document": { "document_url": "${TEST_DOCUMENT_URL}", - "document_filename": "Test.txt", + "document_filename": "solicitor-role-tech.docx", "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" }, - "applicationType": "C100_CHILD_ARRANGEMENTS", + "uploadedBy": null, + "documentName": null, + "documentType": "THRESHOLD", + "includedInSWET": null, + "dateTimeUploaded": null + } + } + ], + "allocatedJudge": { + "judgeTitle": "HER_HONOUR_JUDGE", + "judgeLastName": "Moley", + "judgeEmailAddress": "moley@example.com" + }, + "additionalApplicationsBundle": [ + { + "id": "4ae96392-b71d-40a6-9e59-a66d3fd279a5", + "value": { + "author": "HMCTS", + "pbaPayment": { + "usePbaPayment": "No" + }, + "c2DocumentBundle": { + "id": "2c3d7329-8206-44a1-b1b4-7502ab253b0f", + "type": "WITHOUT_NOTICE", + "author": "HMCTS", + "document": { + "document_url": "${TEST_DOCUMENT_URL}", + "document_filename": "Test.txt", + "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" + }, + "uploadedDateTime": "25 March 2021, 3:16pm", + "supplementsBundle": [], + "supportingEvidenceLA": [], + "supportingEvidenceNC": [], + "supportingEvidenceBundle": [], + "c2AdditionalOrdersRequested": [ + "CHANGE_SURNAME_OR_REMOVE_JURISDICTION" + ] + }, "uploadedDateTime": "25 March 2021, 3:16pm", - "supplementsBundle": [], - "supportingEvidenceLA": [], - "supportingEvidenceNC": [], - "supportingEvidenceBundle": [] + "otherApplicationsBundle": { + "id": "85bb3a49-e178-4a3a-ad73-165005d8c4bf", + "author": "HMCTS", + "document": { + "document_url": "${TEST_DOCUMENT_URL}", + "document_filename": "Test.txt", + "document_binary_url": "${TEST_DOCUMENT_BINARY_URL}" + }, + "applicationType": "C100_CHILD_ARRANGEMENTS", + "uploadedDateTime": "25 March 2021, 3:16pm", + "supplementsBundle": [], + "supportingEvidenceLA": [], + "supportingEvidenceNC": [], + "supportingEvidenceBundle": [] + } } } - } - ] + ] + } } -} - + \ No newline at end of file diff --git a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts index 26a83314c97..781286bd23d 100644 --- a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts +++ b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts @@ -23,8 +23,8 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateManageLaTransferToCourts(); - await manageLaTransferToCourts.tabNavigation('People in the case'); - await expect(page.getByText('Designated local authority')).toBeVisible(); + await manageLaTransferToCourts.tabNavigation('Summary'); + await expect(page.getByText('Family Court sitting at Central Family Court')).toBeVisible(); }) test('CTSC gives access to another local authority', @@ -38,7 +38,7 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateCourtAccess(); await manageLaTransferToCourts.tabNavigation('People in the case'); - await expect(page.getByText('Applicant 2')).toBeVisible(); + await expect(page.getByText('London Borough Hillingdon')).toBeVisible(); }) test('CTSC removes access', @@ -48,10 +48,11 @@ test.describe('Manage LAs / Transfer to court', () => { await signInPage.visit(); await signInPage.login(CTSCTeamLeadUser.email, CTSCTeamLeadUser.password); await signInPage.navigateTOCaseDetails(caseNumber); + await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateRemoveAccess(); await manageLaTransferToCourts.tabNavigation('People in the case'); - await expect(page.getByText('Applicant 1')).toBeVisible(); + await expect(page.getByText('Colleague 1')).toBeVisible(); }) test('CTSC tranfers to another local authority', async ({ page, signInPage, manageLaTransferToCourts }) => { @@ -64,6 +65,6 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateTranferToLa(); await manageLaTransferToCourts.tabNavigation('People in the case'); - await expect(page.getByText('Designated local authority')).toBeVisible(); + await expect(page.getByText('London Borough Hillingdon')).toBeVisible(); }) }); From fedc2cf60170df501e03965cfd02fe5dd589faa8 Mon Sep 17 00:00:00 2001 From: Braimah101 <41795070+Braimah101@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:17:39 +0000 Subject: [PATCH 06/14] Update manage-la-transfer-to-courts.spec.ts --- playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts index 781286bd23d..8d62f4c3f96 100644 --- a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts +++ b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts @@ -52,7 +52,8 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateRemoveAccess(); await manageLaTransferToCourts.tabNavigation('People in the case'); - await expect(page.getByText('Colleague 1')).toBeVisible(); + await expect(page.getByText('Applicant 2')).toBeHidden(); + await expect(page.getByText('London Borough Hillingdon')).toBeHidden(); }) test('CTSC tranfers to another local authority', async ({ page, signInPage, manageLaTransferToCourts }) => { From 7ab96c206ff44889301713fd70240f450d7a954a Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Tue, 17 Dec 2024 16:20:07 +0000 Subject: [PATCH 07/14] DFPL-2566 --- playwright-e2e/settings/user-credentials.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playwright-e2e/settings/user-credentials.ts b/playwright-e2e/settings/user-credentials.ts index bf89a83efda..3038995ef72 100644 --- a/playwright-e2e/settings/user-credentials.ts +++ b/playwright-e2e/settings/user-credentials.ts @@ -1,9 +1,9 @@ import dotenv from "dotenv"; dotenv.config(); -const e2ePw = process.env.E2E_TEST_PASSWORD || ''; -const defaultPwd = process.env.SYSTEM_UPDATE_USER_PASSWORD || ''; -const judgePwd = process.env.E2E_TEST_JUDGE_PASSWORD || ''; +const e2ePw = process.env.E2E_TEST_PASSWORD || 'Password1234'; +const defaultPwd = process.env.SYSTEM_UPDATE_USER_PASSWORD || 'Password12'; +const judgePwd = process.env.E2E_TEST_JUDGE_PASSWORD || 'Hmcts1234'; export const newSwanseaLocalAuthorityUserOne = { From 126775a7dafaa915fa4969d00251d6fcee77c65d Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Thu, 2 Jan 2025 09:46:07 +0000 Subject: [PATCH 08/14] DFPL-2566 --- playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts index 8d62f4c3f96..9dcaa582a3a 100644 --- a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts +++ b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts @@ -23,8 +23,8 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateManageLaTransferToCourts(); - await manageLaTransferToCourts.tabNavigation('Summary'); - await expect(page.getByText('Family Court sitting at Central Family Court')).toBeVisible(); + await manageLaTransferToCourts.tabNavigation('People in the case'); + await expect(page.getByText('Applicant 1')).toBeVisible(); }) test('CTSC gives access to another local authority', From e2275b72891e9468e2c6cb4279faf27af9fc9c41 Mon Sep 17 00:00:00 2001 From: Braimah101 <41795070+Braimah101@users.noreply.github.com> Date: Tue, 7 Jan 2025 07:12:58 +0000 Subject: [PATCH 09/14] Update user-credentials.ts --- playwright-e2e/settings/user-credentials.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/playwright-e2e/settings/user-credentials.ts b/playwright-e2e/settings/user-credentials.ts index 3038995ef72..bf89a83efda 100644 --- a/playwright-e2e/settings/user-credentials.ts +++ b/playwright-e2e/settings/user-credentials.ts @@ -1,9 +1,9 @@ import dotenv from "dotenv"; dotenv.config(); -const e2ePw = process.env.E2E_TEST_PASSWORD || 'Password1234'; -const defaultPwd = process.env.SYSTEM_UPDATE_USER_PASSWORD || 'Password12'; -const judgePwd = process.env.E2E_TEST_JUDGE_PASSWORD || 'Hmcts1234'; +const e2ePw = process.env.E2E_TEST_PASSWORD || ''; +const defaultPwd = process.env.SYSTEM_UPDATE_USER_PASSWORD || ''; +const judgePwd = process.env.E2E_TEST_JUDGE_PASSWORD || ''; export const newSwanseaLocalAuthorityUserOne = { From fcaa672889f0299f0675f8eed6351c9ce1d0c959 Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Wed, 8 Jan 2025 09:29:24 +0000 Subject: [PATCH 10/14] DFPL-5790 Added more assertions --- playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts index 9dcaa582a3a..2e8ecbc37fa 100644 --- a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts +++ b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts @@ -25,6 +25,7 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.updateManageLaTransferToCourts(); await manageLaTransferToCourts.tabNavigation('People in the case'); await expect(page.getByText('Applicant 1')).toBeVisible(); + await expect(page.getByText('London Borough Hillingdon')).toBeVisible(); }) test('CTSC gives access to another local authority', @@ -38,6 +39,7 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateCourtAccess(); await manageLaTransferToCourts.tabNavigation('People in the case'); + await expect(page.getByText('Applicant 2')).toBeVisible(); await expect(page.getByText('London Borough Hillingdon')).toBeVisible(); }) @@ -66,6 +68,7 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateTranferToLa(); await manageLaTransferToCourts.tabNavigation('People in the case'); + await expect(page.getByText('Applicant 2')).toBeVisible(); await expect(page.getByText('London Borough Hillingdon')).toBeVisible(); }) }); From 1419d96d122b6c6300ee1f0e3789011aed8ecc88 Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:54:24 +0000 Subject: [PATCH 11/14] DFPL-2566 --- .../tests/manage-la-transfer-to-courts.spec.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts index 2e8ecbc37fa..892b5b43621 100644 --- a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts +++ b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts @@ -23,9 +23,9 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateManageLaTransferToCourts(); - await manageLaTransferToCourts.tabNavigation('People in the case'); - await expect(page.getByText('Applicant 1')).toBeVisible(); - await expect(page.getByText('London Borough Hillingdon')).toBeVisible(); + await manageLaTransferToCourts.tabNavigation('Summary'); + await expect(page.getByText('Family Court sitting at Swansea')).toBeHidden(); + await expect(page.getByText('Central Family Court')).toBeVisible(); }) test('CTSC gives access to another local authority', @@ -67,8 +67,8 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.gotoNextStep('Manage LAs / Transfer to court'); await manageLaTransferToCourts.updateTranferToLa(); - await manageLaTransferToCourts.tabNavigation('People in the case'); - await expect(page.getByText('Applicant 2')).toBeVisible(); - await expect(page.getByText('London Borough Hillingdon')).toBeVisible(); + await manageLaTransferToCourts.tabNavigation('Summary'); + await expect(page.getByText('Family Court sitting at Swansea')).toBeHidden(); + await expect(page.getByText('Family Court sitting at West London')).toBeVisible(); }) }); From a87f4229ba280960ab15ef508dcec39970ed4ca8 Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:14:42 +0000 Subject: [PATCH 12/14] DFPL-2566 --- playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts index 892b5b43621..795797c4477 100644 --- a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts +++ b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts @@ -70,5 +70,9 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.tabNavigation('Summary'); await expect(page.getByText('Family Court sitting at Swansea')).toBeHidden(); await expect(page.getByText('Family Court sitting at West London')).toBeVisible(); - }) + await manageLaTransferToCourts.tabNavigation('People in the case'); + await expect(page.getByText('Swansea City Council')).toBeHidden(); + await expect(page.getByText('London Borough Hillingdon')).toBeVisible(); + + }) }); From 80bad5562cf7ff6f423cce910531c8028dfecebb Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Wed, 8 Jan 2025 16:18:06 +0000 Subject: [PATCH 13/14] DFPL-2566 Added code --- playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts index 795797c4477..a1827afe65a 100644 --- a/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts +++ b/playwright-e2e/tests/manage-la-transfer-to-courts.spec.ts @@ -73,6 +73,5 @@ test.describe('Manage LAs / Transfer to court', () => { await manageLaTransferToCourts.tabNavigation('People in the case'); await expect(page.getByText('Swansea City Council')).toBeHidden(); await expect(page.getByText('London Borough Hillingdon')).toBeVisible(); - - }) + }) }); From 90d30f3bb52b3be1e5cd68268f375efc2d231638 Mon Sep 17 00:00:00 2001 From: Charles Braimah <41795070+Braimah101@users.noreply.github.com> Date: Thu, 9 Jan 2025 12:12:30 +0000 Subject: [PATCH 14/14] DFPL-2566 --- playwright-e2e/pages/manage-la-transfer-to-courts.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/playwright-e2e/pages/manage-la-transfer-to-courts.ts b/playwright-e2e/pages/manage-la-transfer-to-courts.ts index 3a2c0a485a8..baf69208c34 100644 --- a/playwright-e2e/pages/manage-la-transfer-to-courts.ts +++ b/playwright-e2e/pages/manage-la-transfer-to-courts.ts @@ -59,13 +59,13 @@ export class ManageLaTransferToCourts extends BasePage { await expect(this.manageLaTransferToCourts).toBeVisible(); await this.transferToAnotherLa.click(); await this.continueButton.click(); - await this.localAuthorityToTransfer.selectOption('4: HN'); + await this.localAuthorityToTransfer.selectOption('London Borough Hillingdon'); await this.continueButton.click(); await this.fullName.fill('Sam Hill'); await this.email.fill('sam@hillingdon.gov.uk'); await this.continueButton.click(); await this.courtTransfer.getByLabel('Yes').check(); - await this.selectNewCourt.selectOption('2: 332'); + await this.selectNewCourt.selectOption('Family Court sitting at West London'); await this.continueButton.click(); await this.saveAndContinue.click(); }