-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* DFR-3447: Tests and supporting files to check that applicantInRefugeQuestion populated and correctly reflected on CYA
- Loading branch information
Showing
11 changed files
with
233 additions
and
23 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
154 changes: 154 additions & 0 deletions
154
playwright-e2e/functional/contested/create_case/create_case_caseworker.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,154 @@ | ||
import { test, expect } from '../../../fixtures/fixtures'; | ||
import config from '../../../config/config'; | ||
import { RadioEnum } from '../../../pages/helpers/enums/Refuge'; | ||
|
||
test( | ||
'Create Case - Contested FormA Submission', | ||
{ tag: ['@accessibility'] }, | ||
async ( | ||
{ | ||
loginPage, | ||
manageCaseDashboardPage, | ||
createCasePage, | ||
startPage, | ||
solicitorDetailsPage, | ||
divorceDetailsPage, | ||
applicantDetailsPage, | ||
respondentDetailsPage, | ||
respondentRepresentedPage, | ||
natureOfApplicationPage, | ||
propertyAdjustmentPage, | ||
periodicalPaymentsPage, | ||
writtenAgreementPage, | ||
fastTrackProcedurePage, | ||
financialAssetsPage, | ||
financialRemedyCourtPage, | ||
miamQuestionPage, | ||
miamDetailsPage, | ||
uploadOrderDocumentsPage, | ||
createCaseCheckYourAnswersPage, | ||
caseDetailsPage, | ||
makeAxeBuilder | ||
}, | ||
testInfo | ||
) => { | ||
// Sign in | ||
await manageCaseDashboardPage.visit() | ||
await loginPage.login(config.caseWorker.email, config.caseWorker.password); | ||
|
||
// Manage/Create case | ||
await createCasePage.startCase( | ||
config.jurisdiction.familyDivorce, | ||
config.caseType.contested, | ||
config.eventType.formA | ||
); | ||
|
||
await startPage.navigateContinue(); | ||
|
||
// Select whether the applicant is represented or not. Then enter applicant details | ||
await solicitorDetailsPage.setApplicantRepresentation(true); | ||
await solicitorDetailsPage.selectOrganisation(config.organisationNames.finRem1Org); | ||
await solicitorDetailsPage.enterSolicitorDetails('Test App Sol', config.applicant_solicitor.email); | ||
await solicitorDetailsPage.enterSolicitorsFirm('Finrem-1-Org'); | ||
await solicitorDetailsPage.enterReferenceNumber('123456'); | ||
await solicitorDetailsPage.enterUKaddress(); | ||
await solicitorDetailsPage.setEmailConsent(config.caseType.contested); | ||
await solicitorDetailsPage.navigateContinue(); | ||
|
||
// Enter Divorce / Dissolution Details | ||
await divorceDetailsPage.enterDivorceDetailsContested('LV12D12345', config.divorceStage.petitionIssued); | ||
await divorceDetailsPage.navigateContinue(); | ||
|
||
//applicant details | ||
const keepPrivate: boolean = true; | ||
const applicantInRefuge: RadioEnum = RadioEnum.YES; | ||
await applicantDetailsPage.enterApplicantDetailsContested('App First Name', 'App Last Name', keepPrivate, applicantInRefuge); | ||
await applicantDetailsPage.navigateContinue(); | ||
|
||
//respondent details | ||
await respondentDetailsPage.enterRespondentNames('Resp First Name', 'Resp Last Name'); | ||
await respondentDetailsPage.navigateContinue(); | ||
|
||
await respondentRepresentedPage.selectRespondentRepresentedContested(true); | ||
await respondentRepresentedPage.selectOrganisation( | ||
config.organisationNames.finRem2Org | ||
); | ||
await respondentRepresentedPage.enterSolicitorsDetails('Test Respondent', config.applicant_solicitor.email); | ||
await respondentRepresentedPage.navigateContinue(); | ||
|
||
// Nature of App | ||
await natureOfApplicationPage.selectNatureOfApplication(); | ||
await natureOfApplicationPage.navigateContinue(); | ||
|
||
// Property Adjustment Order | ||
await propertyAdjustmentPage.propertyAdjustmentOrder(); | ||
await propertyAdjustmentPage.addAdditionalPropertyAdjustment(true); | ||
await propertyAdjustmentPage.navigateContinue(); | ||
|
||
// Periodical Payments | ||
await periodicalPaymentsPage.selectPeriodicalPaymentsContested(true); | ||
await periodicalPaymentsPage.navigateContinue(); | ||
|
||
// Written Agreement | ||
await writtenAgreementPage.selectWrittenAgreement(false); | ||
await writtenAgreementPage.navigateContinue(); | ||
|
||
//Fast track procedure | ||
await fastTrackProcedurePage.selectFastTrack(true); | ||
await fastTrackProcedurePage.navigateContinue(); | ||
|
||
//Financial assets | ||
await financialAssetsPage.selectComplexityList('Yes'); | ||
await financialAssetsPage.selectAssetsValue('Under £250,000'); | ||
await financialAssetsPage.insertFamilyHomeValue('125,000'); | ||
await financialAssetsPage.checkPotentialIssueNotApplicableCheckbox(); | ||
await financialAssetsPage.navigateContinue(); | ||
|
||
// Financial Remedies Court | ||
await financialRemedyCourtPage.selectCourtZoneDropDown(); | ||
await financialRemedyCourtPage.selectHighCourtJudgeLevel(true); | ||
await financialRemedyCourtPage.enterSpecialFacilities(); | ||
await financialRemedyCourtPage.enterSpecialArrangements(); | ||
await financialRemedyCourtPage.selectShouldNotProceedApplicantHomeCourt(true); | ||
await financialRemedyCourtPage.enterFrcReason(); | ||
await financialRemedyCourtPage.navigateContinue(); | ||
|
||
// Has attended miam | ||
await miamQuestionPage.selectHasAttendedMiam(true); | ||
await miamQuestionPage.navigateContinue(); | ||
|
||
// Miam details | ||
await miamDetailsPage.enterMediatorRegistrationNumber(); | ||
await miamDetailsPage.enterFamilyMediatorServiceName(); | ||
await miamDetailsPage.enterSoleTraderName(); | ||
await miamDetailsPage.uploadMiamDoc(); | ||
await miamDetailsPage.navigateContinue(); | ||
|
||
// Upload variation Order Document | ||
await uploadOrderDocumentsPage.uploadVariationOrderDoc(); | ||
await uploadOrderDocumentsPage.selectUploadAdditionalDocs(false); | ||
await uploadOrderDocumentsPage.selectUrgentCaseQuestionRadio(false); | ||
await uploadOrderDocumentsPage.navigateContinue(); | ||
|
||
//Continue about to submit and check your answers | ||
await createCaseCheckYourAnswersPage.navigateContinue(); | ||
|
||
await createCaseCheckYourAnswersPage.checkApplicantInRefugeQuestion(applicantInRefuge); | ||
|
||
await createCaseCheckYourAnswersPage.navigateSubmit(); | ||
|
||
await caseDetailsPage.checkHasBeenCreated(); | ||
|
||
// Note: Financial Assets page produces accessibility issues | ||
if (config.run_accessibility) { | ||
const accessibilityScanResults = await makeAxeBuilder().analyze(); | ||
|
||
await testInfo.attach('accessibility-scan-results', { | ||
body: JSON.stringify(accessibilityScanResults, null, 2), | ||
contentType: 'application/json' | ||
}); | ||
|
||
expect(accessibilityScanResults.violations).toEqual([]); | ||
} | ||
} | ||
); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
playwright-e2e/pages/events/create-case/CreateCaseCheckYourAnswersPage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { Page, expect, Locator } from "playwright/test"; | ||
import { BaseJourneyPage } from "../../BaseJourneyPage"; | ||
import { RadioEnum } from "../../helpers/enums/Refuge"; | ||
|
||
export class CreateCaseCheckYourAnswersPage extends BaseJourneyPage{ | ||
|
||
private readonly applicantInRefugeAnswer: Locator; | ||
|
||
public constructor(page: Page){ | ||
super(page) | ||
this.applicantInRefugeAnswer = page.getByRole('row', { name: 'Is the Applicant currently a' }).locator('span').nth(1); | ||
} | ||
|
||
async checkApplicantInRefugeQuestion(answer: RadioEnum) { | ||
await expect(this.applicantInRefugeAnswer).toHaveText(answer); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export enum RadioEnum { | ||
YES = 'Yes', | ||
NO = 'No', | ||
BLANK = '', | ||
} |