Skip to content

Commit

Permalink
update steps
Browse files Browse the repository at this point in the history
  • Loading branch information
kdaHMCTS committed Feb 5, 2025
1 parent a2545cb commit 5268f91
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 121 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
129 changes: 10 additions & 119 deletions playwright-e2e/tests/Example.spec.ts
Original file line number Diff line number Diff line change
@@ -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();
Expand Down

0 comments on commit 5268f91

Please sign in to comment.