From 5456249f97d32b2bd82755ea76dd2840704f2bb4 Mon Sep 17 00:00:00 2001 From: filippo-possenti-version1 <109352283+filippo-possenti-version1@users.noreply.github.com> Date: Thu, 16 Mar 2023 22:52:04 +0000 Subject: [PATCH] CIV-6955 pbav3 fix (#2378) Co-authored-by: miguelMolina3691 Co-authored-by: Kurt Plaschke Co-authored-by: skhajuria --- e2e/api/steps.js | 16 ++++---- e2e/api/steps_LRspec.js | 8 ++-- e2e/api/steps_LRspecFast.js | 7 ++-- e2e/api/steps_LRspecSmall.js | 6 +-- e2e/fixtures/events/createClaim.js | 31 +++++++++++----- e2e/fixtures/events/createClaimSpec.js | 31 +++++++++++++--- e2e/fixtures/events/createClaimSpecFast.js | 22 +++++++++-- e2e/fixtures/events/createClaimSpecSmall.js | 25 ++++++++++--- e2e/pages/createClaim/pbaNumber.page.js | 4 ++ e2e/steps_file.js | 29 ++++++++++++++- e2e/steps_file_LRspec.js | 41 ++++++++++++++++++--- 11 files changed, 172 insertions(+), 48 deletions(-) diff --git a/e2e/api/steps.js b/e2e/api/steps.js index d378d60e64..4b830928d9 100644 --- a/e2e/api/steps.js +++ b/e2e/api/steps.js @@ -32,7 +32,7 @@ const {removeFlagsFieldsFromFixture} = require('../helpers/caseFlagsFeatureHelpe const data = { INITIATE_GENERAL_APPLICATION: genAppClaimData.createGAData('Yes', null, '27500','FEE0442'), - CREATE_CLAIM: (mpScenario, claimAmount) => claimData.createClaim(mpScenario, claimAmount), + CREATE_CLAIM: (mpScenario, claimAmount, pbaV3) => claimData.createClaim(mpScenario, claimAmount, pbaV3), CREATE_CLAIM_RESPONDENT_LIP: claimData.createClaimLitigantInPerson, CREATE_CLAIM_RESPONDENT_LR_LIP: claimData.createClaimLRLIP, CREATE_CLAIM_RESPONDENT_LIP_LIP: claimData.createClaimLIPLIP, @@ -144,8 +144,8 @@ module.exports = { caseId = null; caseData = {}; mpScenario = multipartyScenario; - - let createClaimData = data.CREATE_CLAIM(mpScenario, claimAmount); + const pbaV3 = await checkToggleEnabled(PBAv3); + let createClaimData = data.CREATE_CLAIM(mpScenario, claimAmount, pbaV3); // Remove after court location toggle is removed createClaimData = await replaceWithCourtNumberIfCourtLocationDynamicListIsNotEnabled(createClaimData); createClaimData = await replaceLitigantFriendIfHNLFlagDisabled(createClaimData); @@ -171,7 +171,7 @@ module.exports = { null, 'Case data validation failed'); } - const pbaV3 = await checkToggleEnabled(PBAv3); + console.log('Is PBAv3 toggle on?: ' + pbaV3); @@ -211,7 +211,7 @@ module.exports = { mpScenario = multipartyScenario; await apiRequest.setupTokens(user); await apiRequest.startEvent(eventName); - + const pbaV3 = await checkToggleEnabled(PBAv3); let createClaimData; switch (mpScenario){ case 'ONE_V_ONE': @@ -224,6 +224,7 @@ module.exports = { createClaimData = data.CREATE_CLAIM_RESPONDENT_LIP_LIP; break; } + // Remove after court location toggle is removed createClaimData = await replaceWithCourtNumberIfCourtLocationDynamicListIsNotEnabled(createClaimData); createClaimData = await replaceLitigantFriendIfHNLFlagDisabled(createClaimData); @@ -234,7 +235,9 @@ module.exports = { removeHNLFieldsFromUnspecClaimData(createClaimData); } //============================================================== - + if (pbaV3) { + createClaimData.valid.ClaimValue.paymentTypePBA = 'PBAv3'; + } await validateEventPages(createClaimData); let noCToggleEnabled = await checkNoCToggleEnabled(); @@ -249,7 +252,6 @@ module.exports = { }); await waitForFinishedBusinessProcess(caseId); - const pbaV3 = await checkToggleEnabled(PBAv3); console.log('Is PBAv3 toggle on?: ' + pbaV3); diff --git a/e2e/api/steps_LRspec.js b/e2e/api/steps_LRspec.js index 908880c839..f4533fe37b 100644 --- a/e2e/api/steps_LRspec.js +++ b/e2e/api/steps_LRspec.js @@ -28,7 +28,7 @@ let caseId, eventName; let caseData = {}; const data = { - CREATE_CLAIM: (scenario) => claimData.createClaim(scenario), + CREATE_CLAIM: (scenario, pbaV3) => claimData.createClaim(scenario, pbaV3), DEFENDANT_RESPONSE: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec.js').respondToClaim(response, camundaEvent), DEFENDANT_RESPONSE2: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec.js').respondToClaim2(response, camundaEvent), DEFENDANT_RESPONSE_1v2: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec1v2.js').respondToClaim(response, camundaEvent), @@ -133,14 +133,14 @@ module.exports = { * @return {Promise} */ createClaimWithRepresentedRespondent: async (user, scenario = 'ONE_V_ONE') => { - + const pbaV3 = await checkToggleEnabled(PBAv3); eventName = 'CREATE_CLAIM_SPEC'; caseId = null; caseData = {}; let createClaimData = {}; - createClaimData = data.CREATE_CLAIM(scenario); + createClaimData = data.CREATE_CLAIM(scenario, pbaV3); // ToDo: Remove and delete function after hnl uplift released const hnlEnabled = await checkToggleEnabled('hearing-and-listing-sdo'); @@ -171,7 +171,7 @@ module.exports = { } await waitForFinishedBusinessProcess(caseId); - const pbaV3 = await checkToggleEnabled(PBAv3); + console.log('Is PBAv3 toggle on?: ' + pbaV3); diff --git a/e2e/api/steps_LRspecFast.js b/e2e/api/steps_LRspecFast.js index 2b7e8622be..08eba6efb0 100644 --- a/e2e/api/steps_LRspecFast.js +++ b/e2e/api/steps_LRspecFast.js @@ -23,11 +23,12 @@ const {assertCaseFlags} = require('../helpers/assertions/caseFlagsAssertions'); const {addAndAssertCaseFlag, getPartyFlags, getDefinedCaseFlagLocations, updateAndAssertCaseFlag} = require('./caseFlagsHelper'); const {CASE_FLAGS} = require('../fixtures/caseFlags'); + let caseId, eventName; let caseData = {}; const data = { - CREATE_CLAIM: (scenario) => claimData.createClaim(scenario), + CREATE_CLAIM: (scenario, pbaV3) => claimData.createClaim(scenario, pbaV3), DEFENDANT_RESPONSE: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec.js').respondToClaim(response, camundaEvent), DEFENDANT_RESPONSE_1v2: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec1v2Fast.js').respondToClaim(response, camundaEvent), DEFENDANT_RESPONSE_2v1: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec2v1Fast.js').respondToClaim(response, camundaEvent), @@ -116,7 +117,8 @@ module.exports = { let createClaimData = {}; - createClaimData = data.CREATE_CLAIM(scenario); + const pbaV3 = await checkToggleEnabled(PBAv3); + createClaimData = data.CREATE_CLAIM(scenario, pbaV3); // ToDo: Remove and delete function after hnl uplift released const hnlEnabled = await checkToggleEnabled('hearing-and-listing-sdo'); @@ -133,7 +135,6 @@ module.exports = { await assertSubmittedEvent('PENDING_CASE_ISSUED'); - const pbaV3 = await checkToggleEnabled(PBAv3); await waitForFinishedBusinessProcess(caseId); console.log('Is PBAv3 toggle on?: ' + pbaV3); diff --git a/e2e/api/steps_LRspecSmall.js b/e2e/api/steps_LRspecSmall.js index 5cfdaa5d83..2240a714f4 100644 --- a/e2e/api/steps_LRspecSmall.js +++ b/e2e/api/steps_LRspecSmall.js @@ -25,7 +25,7 @@ let caseId, eventName; let caseData = {}; const data = { - CREATE_CLAIM: (scenario) => claimData.createClaim(scenario), + CREATE_CLAIM: (scenario, pbaV3) => claimData.createClaim(scenario, pbaV3), DEFENDANT_RESPONSE: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpecSmall.js').respondToClaim(response, camundaEvent), DEFENDANT_RESPONSE_1v2: (response, camundaEvent) => require('../fixtures/events/defendantResponseSpec1v2.js').respondToClaim(response, camundaEvent), CLAIMANT_RESPONSE: (mpScenario) => require('../fixtures/events/claimantResponseSpecSmall.js').claimantResponse(mpScenario), @@ -69,9 +69,10 @@ module.exports = { caseId = null; caseData = {}; + const pbaV3 = await checkToggleEnabled(PBAv3); let createClaimData = {}; - createClaimData = data.CREATE_CLAIM(scenario); + createClaimData = data.CREATE_CLAIM(scenario, pbaV3); // ToDo: Remove and delete function after hnl uplift released const hnlEnabled = await checkToggleEnabled(''); @@ -89,7 +90,6 @@ module.exports = { await assertSubmittedEvent('PENDING_CASE_ISSUED'); await waitForFinishedBusinessProcess(caseId); - const pbaV3 = await checkToggleEnabled(PBAv3); console.log('Is PBAv3 toggle on?: ' + pbaV3); diff --git a/e2e/fixtures/events/createClaim.js b/e2e/fixtures/events/createClaim.js index 63f50a34d3..085c888d6b 100644 --- a/e2e/fixtures/events/createClaim.js +++ b/e2e/fixtures/events/createClaim.js @@ -71,7 +71,7 @@ let selectedPba = listElement('PBA0088192'); const validPba = listElement('PBA0088192'); const invalidPba = listElement('PBA0078095'); -const createClaimData = (legalRepresentation, useValidPba, mpScenario, claimAmount = '30000') => { +const createClaimData = (pbaV3, legalRepresentation, useValidPba, mpScenario, claimAmount = '30000') => { selectedPba = useValidPba ? validPba : invalidPba; const claimData = { References: { @@ -200,7 +200,10 @@ const createClaimData = (legalRepresentation, useValidPba, mpScenario, claimAmou claimValue: { statementOfValueInPennies: JSON.stringify(claimAmount * 100) }, - claimFee: getClaimFee(claimAmount) + claimFee: getClaimFee(claimAmount), + ...isPBAv3(pbaV3) ? { + paymentTypePBA: 'PBAv3' + } : {}, }, PbaNumber: { applicantSolicitor1PbaAccounts: { @@ -210,7 +213,7 @@ const createClaimData = (legalRepresentation, useValidPba, mpScenario, claimAmou ], value: selectedPba - } + }, }, PaymentReference: { claimIssuedPaymentDetails: { @@ -344,8 +347,13 @@ const hasRespondent2 = (mpScenario) => { || mpScenario === 'ONE_V_TWO_LIPS'; }; +const isPBAv3 = (pbaV3) => { + console.log( 'Pba value in create claim' + pbaV3); + return pbaV3; +}; + module.exports = { - createClaim: (mpScenario = 'ONE_V_ONE', claimAmount) => { + createClaim: (mpScenario = 'ONE_V_ONE', claimAmount, pbaV3) => { return { midEventData: { ClaimValue: { @@ -363,7 +371,10 @@ module.exports = { respondent1: respondent1WithPartyName, ...hasRespondent2(mpScenario) ? { respondent2: respondent2WithPartyName - } : {} + } : {}, + ...isPBAv3(pbaV3) ? { + paymentTypePBA: 'PBAv3' + } : {}, }, ClaimantLitigationFriend: { applicant1: applicant1WithPartyName, @@ -378,7 +389,7 @@ module.exports = { } }, valid: { - ...createClaimData('Yes', true, mpScenario, claimAmount), + ...createClaimData(pbaV3,'Yes', true, mpScenario, claimAmount), }, invalid: { Upload: { @@ -413,16 +424,16 @@ module.exports = { }, createClaimLitigantInPerson: { - valid: createClaimData('No', true, 'ONE_V_ONE') + valid: createClaimData(false,'No', true, 'ONE_V_ONE') }, createClaimLRLIP: { - valid: createClaimData('Yes', true, 'ONE_V_TWO_ONE_LEGAL_REP_ONE_LIP') + valid: createClaimData(false,'Yes', true, 'ONE_V_TWO_ONE_LEGAL_REP_ONE_LIP') }, createClaimLIPLIP: { - valid: createClaimData('No', true, 'ONE_V_TWO_LIPS') + valid: createClaimData(false,'No', true, 'ONE_V_TWO_LIPS') }, createClaimWithTerminatedPBAAccount: { - valid: createClaimData('Yes', false) + valid: createClaimData(false,'Yes', false) }, createClaimRespondentSolFirmNotInMyHmcts: { valid: { diff --git a/e2e/fixtures/events/createClaimSpec.js b/e2e/fixtures/events/createClaimSpec.js index 6e92315720..ae71bbe125 100644 --- a/e2e/fixtures/events/createClaimSpec.js +++ b/e2e/fixtures/events/createClaimSpec.js @@ -27,6 +27,10 @@ const applicant1WithPartyName = { partyTypeDisplayValue: 'Company', }; +const isPBAv3 = (pbaV3) => { + return pbaV3; +}; + const solicitor1Email = 'hmcts.civil+organisation.1.solicitor.1@gmail.com'; const claimAmount = '150000'; @@ -34,7 +38,7 @@ const validPba = listElement('PBA0088192'); const invalidPba = listElement('PBA0078095'); module.exports = { - createClaim: (mpScenario) => { + createClaim: (mpScenario, pbaV3) => { const userData = { userInput: { References: { @@ -131,7 +135,10 @@ module.exports = { InterestSummary: { claimIssuedPaymentDetails: { customerReference: 'Applicant reference' - } + }, + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, }, PbaNumber: { applicantSolicitor1PbaAccounts: { @@ -165,6 +172,9 @@ module.exports = { InterestSummary: { totalInterest: 0, applicantSolicitor1PbaAccountsIsEmpty: 'No', + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, } }, @@ -192,7 +202,10 @@ module.exports = { calculatedAmountInPence: 'string', code: 'string', version: 'string' - } + }, + ...isPBAv3 (pbaV3) ? { + paymentTypePBASpec: 'string' + } : {}, } } }; @@ -258,7 +271,10 @@ module.exports = { InterestSummary: { claimIssuedPaymentDetails: { customerReference: 'Applicant reference' - } + }, + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, }, }; @@ -375,7 +391,7 @@ module.exports = { return userData; }, - createClaimDataByPage: (mpScenario) => { + createClaimDataByPage: (mpScenario, pbaV3) => { let userData = { References: { userInput: { @@ -527,11 +543,14 @@ module.exports = { userInput: { claimIssuedPaymentDetails: { customerReference: 'Applicant reference' - } + }, }, expected: { totalInterest: 0, applicantSolicitor1PbaAccountsIsEmpty: 'No', + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, }, generated: { applicantSolicitor1PbaAccounts: { diff --git a/e2e/fixtures/events/createClaimSpecFast.js b/e2e/fixtures/events/createClaimSpecFast.js index ffd2c362fb..4af664fe4d 100644 --- a/e2e/fixtures/events/createClaimSpecFast.js +++ b/e2e/fixtures/events/createClaimSpecFast.js @@ -25,6 +25,10 @@ const applicant1WithPartyName = { partyName: 'Test Inc', partyTypeDisplayValue: 'Company', }; +const isPBAv3 = (pbaV3) => { + return pbaV3; +}; + const solicitor1Email = 'hmcts.civil+organisation.1.solicitor.1@gmail.com'; const claimAmount = '1500000'; @@ -33,7 +37,7 @@ const validPba = listElement('PBA0088192'); const invalidPba = listElement('PBA0078095'); module.exports = { - createClaim: (mpScenario) => { + createClaim: (mpScenario, pbaV3) => { const userData = { userInput: { References: { @@ -131,6 +135,9 @@ module.exports = { claimIssuedPaymentDetails: { customerReference: 'Applicant reference' }, + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, }, PbaNumber: { applicantSolicitor1PbaAccounts: { @@ -164,6 +171,9 @@ module.exports = { InterestSummary: { totalInterest: 0, applicantSolicitor1PbaAccountsIsEmpty: 'No', + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, } }, @@ -191,7 +201,10 @@ module.exports = { calculatedAmountInPence: 'string', code: 'string', version: 'string' - } + }, + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, } } }; @@ -258,7 +271,10 @@ module.exports = { InterestSummary: { claimIssuedPaymentDetails: { customerReference: 'Applicant reference' - } + }, + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, }, }; diff --git a/e2e/fixtures/events/createClaimSpecSmall.js b/e2e/fixtures/events/createClaimSpecSmall.js index f3b5c8305d..969e1c6dca 100644 --- a/e2e/fixtures/events/createClaimSpecSmall.js +++ b/e2e/fixtures/events/createClaimSpecSmall.js @@ -1,6 +1,7 @@ const {listElement, buildAddress} = require('../../api/dataHelper'); const config = require('../../config.js'); + const respondent1 = { type: 'INDIVIDUAL', individualFirstName: 'John', @@ -26,6 +27,10 @@ const applicant1WithPartyName = { partyTypeDisplayValue: 'Company', }; +const isPBAv3 = (pbaV3) => { + return pbaV3; +}; + const solicitor1Email = 'hmcts.civil+organisation.1.solicitor.1@gmail.com'; const claimAmount = '85000'; @@ -34,7 +39,7 @@ const invalidPba = listElement('PBA0078095'); module.exports = { - createClaim: (mpScenario) => { + createClaim: (mpScenario, pbaV3) => { const userData = { userInput: { References: { @@ -130,7 +135,10 @@ module.exports = { InterestSummary: { claimIssuedPaymentDetails: { customerReference: 'Applicant reference' - } + }, + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, }, PbaNumber: { applicantSolicitor1PbaAccounts: { @@ -164,7 +172,10 @@ module.exports = { InterestSummary: { totalInterest: 0, applicantSolicitor1PbaAccountsIsEmpty: 'No', - } + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'PBAv3' + } : {}, + }, }, midEventGeneratedData: { @@ -191,8 +202,12 @@ module.exports = { calculatedAmountInPence: 'string', code: 'string', version: 'string' - } - } + }, + ...isPBAv3(pbaV3) ? { + paymentTypePBASpec: 'string' + } : {}, + }, + } }; diff --git a/e2e/pages/createClaim/pbaNumber.page.js b/e2e/pages/createClaim/pbaNumber.page.js index e0704e43fa..3734656419 100644 --- a/e2e/pages/createClaim/pbaNumber.page.js +++ b/e2e/pages/createClaim/pbaNumber.page.js @@ -16,6 +16,10 @@ module.exports = { await I.runAccessibilityTest(); I.selectOption(this.fields.pbaNumber.id, this.fields.pbaNumber.options.activeAccount); await I.clickContinue(); + }, + + async clickContinue() { + await I.clickContinue(); } }; diff --git a/e2e/steps_file.js b/e2e/steps_file.js index 26479d7077..0fca42dbc8 100644 --- a/e2e/steps_file.js +++ b/e2e/steps_file.js @@ -134,6 +134,8 @@ const specifiedDefaultJudmentPage = require('./pages/defaultJudgment/requestDefa const createCaseFlagPage = require('./pages/caseFlags/createCaseFlags.page'); const manageCaseFlagsPage = require('./pages/caseFlags/manageCaseFlags.page'); const noticeOfChange = require('./pages/noticeOfChange.page'); +const {checkToggleEnabled} = require('./api/testingSupport'); +const {PBAv3} = require('./fixtures/featureKeys'); const SIGNED_IN_SELECTOR = 'exui-header'; const SIGNED_OUT_SELECTOR = '#global-header'; @@ -279,7 +281,28 @@ module.exports = function () { const twoVOneScenario = claimant1 && claimant2; await createCasePage.createCase(config.definition.jurisdiction); - await this.triggerStepsWithScreenshot([ + const pbaV3 = await checkToggleEnabled(PBAv3); + + let steps = pbaV3 ? [ + () => continuePage.continue(), + () => solicitorReferencesPage.enterReferences(), + () => chooseCourtPage.selectCourt(), + ...firstClaimantSteps(), + ...secondClaimantSteps(claimant2), + ...firstDefendantSteps(respondent1), + ...secondDefendantSteps(respondent2, respondent1.represented, twoVOneScenario), + () => claimTypePage.selectClaimType(), + () => personalInjuryTypePage.selectPersonalInjuryType(), + () => detailsOfClaimPage.enterDetailsOfClaim(), + () => uploadParticularsOfClaimQuestion.chooseYesUploadParticularsOfClaim(), + () => uploadParticularsOfClaim.upload(TEST_FILE_PATH), + () => claimValuePage.enterClaimValue(claimValue), + () => pbaNumberPage.clickContinue(), + () => statementOfTruth.enterNameAndRole('claim'), + () => event.submit('Submit', + shouldStayOnline ? CONFIRMATION_MESSAGE.online : CONFIRMATION_MESSAGE.offline), + () => event.returnToCaseDetails(), + ] : [ () => continuePage.continue(), () => solicitorReferencesPage.enterReferences(), () => chooseCourtPage.selectCourt(), @@ -299,7 +322,9 @@ module.exports = function () { () => event.submit('Submit', shouldStayOnline ? CONFIRMATION_MESSAGE.online : CONFIRMATION_MESSAGE.offline), () => event.returnToCaseDetails(), - ]); + ]; + + await this.triggerStepsWithScreenshot(steps); caseId = (await this.grabCaseNumber()).split('-').join('').substring(1); }, diff --git a/e2e/steps_file_LRspec.js b/e2e/steps_file_LRspec.js index 91199af5d7..0e204dffcd 100644 --- a/e2e/steps_file_LRspec.js +++ b/e2e/steps_file_LRspec.js @@ -88,6 +88,8 @@ const sdoOrderTypePage = require('./pages/selectSDO/sdoOrderType.page'); const smallClaimsSDOOrderDetailsPage = require('./pages/selectSDO/unspecClaimsSDOOrderDetails.page'); const {takeCaseOffline} = require('./pages/caseProceedsInCaseman/takeCaseOffline.page'); const createCaseFlagPage = require('./pages/caseFlags/createCaseFlags.page'); +const {checkToggleEnabled} = require('./api/testingSupport'); +const {PBAv3} = require('./fixtures/featureKeys'); const SIGNED_IN_SELECTOR = 'exui-header'; const SIGNED_OUT_SELECTOR = '#global-header'; @@ -314,8 +316,9 @@ module.exports = function () { eventName = 'Create claim - Specified'; //const twoVOneScenario = claimant1 && claimant2; + const pbaV3 = await checkToggleEnabled(PBAv3); await specCreateCasePage.createCaseSpecified(config.definition.jurisdiction); - await this.triggerStepsWithScreenshot([ + let steps = pbaV3 ? [ () => this.clickContinue(), () => this.clickContinue(), () => solicitorReferencesPage.enterReferences(), @@ -338,13 +341,41 @@ module.exports = function () { () => specInterestDateStartPage.selectInterestDateStart(), () => specInterestDateEndPage.selectInterestDateEnd(), () => this.clickContinue(), - () => pbaNumberPage.selectPbaNumber(), - () => paymentReferencePage.updatePaymentReference(), + () => pbaNumberPage.clickContinue(), () => statementOfTruth.enterNameAndRole('claim'), () => event.submit('Submit',CONFIRMATION_MESSAGE.online), () => event.returnToCaseDetails(), - ]); - + ] : [ + () => this.clickContinue(), + () => this.clickContinue(), + () => solicitorReferencesPage.enterReferences(), + ...firstClaimantSteps(), + ...secondClaimantSteps(claimant2), + ...firstDefendantSteps(respondent1), + ...conditionalSteps(claimant2 == null, [ + () => addAnotherDefendant.enterAddAnotherDefendant(respondent2), + ]), + ...secondDefendantSteps(respondent2, respondent1.represented), + () => detailsOfClaimPage.enterDetailsOfClaim(mpScenario), + () => specTimelinePage.addManually(), + () => specAddTimelinePage.addTimeline(), + () => specListEvidencePage.addEvidence(), + () => specClaimAmountPage.addClaimItem(claimAmount), + () => this.clickContinue(), + () => specInterestPage.addInterest(), + () => specInterestValuePage.selectInterest(), + () => specInterestRatePage.selectInterestRate(), + () => specInterestDateStartPage.selectInterestDateStart(), + () => specInterestDateEndPage.selectInterestDateEnd(), + () => this.clickContinue(), + () => pbaNumberPage.selectPbaNumber(), + () => paymentReferencePage.updatePaymentReference(), + () => statementOfTruth.enterNameAndRole('claim'), + () => event.submit('Submit',CONFIRMATION_MESSAGE.online), + () => event.returnToCaseDetails(), + ]; + + await this.triggerStepsWithScreenshot(steps); caseId = (await this.grabCaseNumber()).split('-').join('').substring(1); },