diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-steps.ts index b522f389c4..0998d3c0be 100644 --- a/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-steps.ts +++ b/playwright-e2e/steps/ui/exui/solicitor-events/claimant-response/claimant-response-steps.ts @@ -124,7 +124,6 @@ export default class ClaimantResponseSteps extends BaseExuiSteps { @Step(classKey) async SmallClaimIntentToProceed1v2DS() { - await super.fetchAndSetCCDCaseData(civilAdminUser, 1738766651688403); await this.retryExuiEvent( async () => { await this.processRespondentResponse1v2Pages(); diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/defendant-response-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/defendant-response-steps.ts index 6fcffdb90a..a8e88fb5bc 100644 --- a/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/defendant-response-steps.ts +++ b/playwright-e2e/steps/ui/exui/solicitor-events/defendant-response/defendant-response-steps.ts @@ -110,6 +110,34 @@ export default class DefendantResponseSteps extends BaseExuiSteps { ); } + @Step(classKey) + async SmallTrackFullDefence1v2SS() { + await this.retryExuiEvent( + async () => { + await this.processConfirmDetailsPage(); + await this.processSingleResponsePage(); + await this.processRespondentResponseTypeDefendant1Page(); + await this.processSolicitorReferencesDefendantResponseDefendant1Page(); + await this.processUploadDefendantResponseDefendant1Page(); + await this.processExpertsDefendant1Page(); + await this.processWitnessesDefendant1Page(); + await this.processLanguageDefendant1Page(); + await this.processHearingDefendant1Page(); + await this.processDraftDirectionsDefendant1Page(); + await this.processRequestedCourtDefendant1Page(); + await this.processHearingSupportDefendant1Page(); + await this.processVulnerabilityQuestionsDefendant1Page(); + await this.processFurtherInformationDefendant1Page(); + await this.processStatementOfTruthDefendantResponseDefendant1Page(); + await this.processSubmitDefendantResponsePage(); + await this.processConfirmDefendantResponsePage(); + }, + ccdEvents.DEFENDANT_RESPONSE, + defendantSolicitor1User, + { retries: 0 }, + ); + } + @Step(classKey) async SmallTrackFullDefence1v2DSDefendant1() { await this.retryExuiEvent( @@ -170,6 +198,13 @@ export default class DefendantResponseSteps extends BaseExuiSteps { await confirmDetailsPage.submit(); } + private async processSingleResponsePage() { + const { singleResponsePage } = this.defendantResponsePageFactory; + await singleResponsePage.verifyContent(this.ccdCaseData); + await singleResponsePage.selectYes(); + await singleResponsePage.submit(); + } + private async processRespondentResponseTypeDefendant1Page() { const { respondentResponseTypeDefendant1Page } = this.defendantResponsePageFactory; await respondentResponseTypeDefendant1Page.verifyContent(this.ccdCaseData); diff --git a/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-steps.ts b/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-steps.ts index 4da1fbc6eb..067f3f2da8 100644 --- a/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-steps.ts +++ b/playwright-e2e/steps/ui/exui/solicitor-events/notify-claim-steps.ts @@ -52,7 +52,6 @@ export default class NotifyClaimSteps extends BaseExuiSteps { async NotifyClaim1v2SS() { await this.retryExuiEvent( async () => { - await this.processDefendantSolicitorToNotifyPage(); await this.processAccessGrantedWarningPage(); await this.processSubmitNotifyClaimPage(); await this.processConfirmNotifyClaimPage(); diff --git a/playwright-e2e/tests/Example.spec.ts b/playwright-e2e/tests/Example.spec.ts index d2599435b1..b76136323e 100644 --- a/playwright-e2e/tests/Example.spec.ts +++ b/playwright-e2e/tests/Example.spec.ts @@ -1,145 +1,36 @@ import { test } from '../playwright-fixtures/index'; -test( - 'Unspec Test 1v1 Example', - { tag: '@debug' }, - async ({ - CreateClaimSteps, - ApiServiceRequestsSteps, - NotifyClaimSteps, - NotifyClaimDetailsSteps, - ApiCaseRoleAssignmentSteps, - IdamSteps, - DefendantResponseSteps, - ClaimantResponseSteps, - }) => { - // await IdamSteps.ClaimantSolicitorLogin(); - // await CreateClaimSteps.SmallTrack1v2DS(); - // await ApiServiceRequestsSteps.MakePaymentForClaimIssue(); - // await NotifyClaimSteps.NotifyClaim1v2DS(); - // await ApiCaseRoleAssignmentSteps.AssignDefendantCaseRoles1v2DS(); - // await NotifyClaimDetailsSteps.NotifyClaimDetails1v2DS(); - await IdamSteps.DefendantSolicitor1Login(); - await DefendantResponseSteps.SmallTrackFullDefence1v2DSDefendant1(); - await IdamSteps.DefendantSolicitor2Login(); - await DefendantResponseSteps.SmallTrackFullDefence1v2DSDefendant2(); - await IdamSteps.ClaimantSolicitorLogin(); - await ClaimantResponseSteps.SmallClaim1v2DS(); - }, -); - -test( - 'Unspec Test 1v2DS Example', - { tag: '@debug' }, - async ({ - CreateClaimSteps, - ApiServiceRequestsSteps, - NotifyClaimSteps, - NotifyClaimDetailsSteps, - ApiCaseRoleAssignmentSteps, - IdamSteps, - DefendantResponseSteps, - ClaimantResponseSteps, - }) => { - // await IdamSteps.ClaimantSolicitorLogin(); - // await CreateClaimSteps.SmallTrack1v1(); - // await ApiServiceRequestsSteps.MakePaymentForClaimIssue(); - // await NotifyClaimSteps.NotifyClaim1v1(); - // await ApiCaseRoleAssignmentSteps.AssignDefendantCaseRoles1v2DS(); - // await NotifyClaimDetailsSteps.NotifyClaimDetails1v1(); - await IdamSteps.DefendantSolicitor1Login(); - await DefendantResponseSteps.SmallTrackFullDefenceDefendant1(); - await IdamSteps.ClaimantSolicitorLogin(); - await ClaimantResponseSteps.SmallClaim1v1(); - }, -); - -test('Api Unspec Test Example', async ({ - ApiCreateClaimSteps, +test('Unspec Test 1v1 Example', async ({ + CreateClaimSteps, ApiServiceRequestsSteps, - IdamSteps, NotifyClaimSteps, - ApiCaseRoleAssignmentSteps, NotifyClaimDetailsSteps, -}) => { - await ApiCreateClaimSteps.Create1v1Claim(); - await ApiServiceRequestsSteps.MakePaymentForClaimIssue(); - await IdamSteps.ClaimantSolicitorLogin(); - await NotifyClaimSteps.NotifyClaim1v1(); - await ApiCaseRoleAssignmentSteps.AssignDefendantCaseRoles1v1(); - await NotifyClaimDetailsSteps.NotifyClaimDetails1v1(); - await IdamSteps.DefendantSolicitor1Login(); -}); - -test('Unspec with Defendant Response 1v1', async ({ - ApiCreateClaimSteps, - ApiServiceRequestsSteps, - IdamSteps, - NotifyClaimSteps, ApiCaseRoleAssignmentSteps, - NotifyClaimDetailsSteps, + IdamSteps, DefendantResponseSteps, + ClaimantResponseSteps, }) => { - await ApiCreateClaimSteps.Create1v1Claim(); - await ApiServiceRequestsSteps.MakePaymentForClaimIssue(); await IdamSteps.ClaimantSolicitorLogin(); + await CreateClaimSteps.SmallTrack1v1(); + await ApiServiceRequestsSteps.MakePaymentForClaimIssue(); await NotifyClaimSteps.NotifyClaim1v1(); await ApiCaseRoleAssignmentSteps.AssignDefendantCaseRoles1v1(); await NotifyClaimDetailsSteps.NotifyClaimDetails1v1(); await IdamSteps.DefendantSolicitor1Login(); - await DefendantResponseSteps.SmallTrackFullDefenceDefendant1(); -}); - -test('Unspec with Defendant Response 1V2 Different Solicitor', async ({ - ApiCreateClaimSteps, - ApiServiceRequestsSteps, - IdamSteps, - NotifyClaimSteps, - ApiCaseRoleAssignmentSteps, - NotifyClaimDetailsSteps, - DefendantResponseSteps, -}) => { - await ApiCreateClaimSteps.Create1v2Claim(); - await ApiServiceRequestsSteps.MakePaymentForClaimIssue(); - await IdamSteps.ClaimantSolicitorLogin(); - await NotifyClaimSteps.NotifyClaim1v2DS(); - await ApiCaseRoleAssignmentSteps.AssignDefendantCaseRoles1v2DS(); - await NotifyClaimDetailsSteps.NotifyClaimDetails1v2DS(); - await IdamSteps.DefendantSolicitor1Login(); - await DefendantResponseSteps.SmallTrackFullDefence1v2DSDefendant1(); - await IdamSteps.DefendantSolicitor2Login(); - await DefendantResponseSteps.SmallTrackFullDefence1v2DSDefendant2(); -}); - -test('Unspec with Defendant Response 1V2 Same Solicitor', async ({ - ApiCreateClaimSteps, - ApiServiceRequestsSteps, - IdamSteps, - NotifyClaimSteps, - ApiCaseRoleAssignmentSteps, - NotifyClaimDetailsSteps, - DefendantResponseSteps, -}) => { - await ApiCreateClaimSteps.Create1v2Claim(); - await ApiServiceRequestsSteps.MakePaymentForClaimIssue(); + await DefendantResponseSteps.SmallTrackFullDefence1v1(); await IdamSteps.ClaimantSolicitorLogin(); - await NotifyClaimSteps.NotifyClaim1v2SS(); - await ApiCaseRoleAssignmentSteps.AssignDefendantCaseRoles1v2SS(); - await NotifyClaimDetailsSteps.NotifyClaimDetails1v2SS(); - await IdamSteps.DefendantSolicitor1Login(); - await DefendantResponseSteps.SmallTrackFullDefence1v2DSDefendant1(); + await ClaimantResponseSteps.SmallClaimIntentToProceed1v1(); }); -test('Unspec with Defendant Response 2V1', async ({ +test('Api Unspec Test Example', async ({ ApiCreateClaimSteps, ApiServiceRequestsSteps, IdamSteps, NotifyClaimSteps, ApiCaseRoleAssignmentSteps, NotifyClaimDetailsSteps, - DefendantResponseSteps, }) => { - await ApiCreateClaimSteps.Create2v1Claim(); + await ApiCreateClaimSteps.SmallTrack1v1(); await ApiServiceRequestsSteps.MakePaymentForClaimIssue(); await IdamSteps.ClaimantSolicitorLogin(); await NotifyClaimSteps.NotifyClaim1v1();