-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CIV-6416 evidence-upload-e2e (#2023)
* Feat/civ 5977 evidence upload (#1701) * evidence upload screens * EVIDENCE upload screen 1 (multiselect) * EVIDENCE upload screen 2 (documents) * Evidences screens page 2 * evidence upload small claims * evidence upload small claims * Refactored config for evidence upload screens, due to issues with populating change your answers * updated permissions * Made text field into dynamiclist * datefield to trigger notifications * removed dynamiclists * Text style changes * updated access * evidence upload config for respondents * evidence upload config for other parties * evidence upload config for other parties Updated permissions to use access-profiles changed Authorities to Authorities and Costs" * spelling * update to mid event callback names some checkstyle updates Co-authored-by: Mark Drummond <[email protected]> Co-authored-by: drummondjm <[email protected]> * Evidence upload notification changes * camunda changes for respondent solicitors * Feat/civ 5977 (#1741) * refactoring evidence upload * Marker commit Co-authored-by: Filippo Possenti <[email protected]> * Removed handler for evidence other party Further refactoring to simplify * Removed handler for evidence other party Further refactoring to simplify * remove camunda process for notification (#1756) * remove camunda process for notification * remove additional profile * Added condition to enable evidence upload events * rebasing * Feat/6208 mp evidence upload (#1849) * multiparty for evidence upload * initial * multiparty evidence upload * checkstyle * Update values.preview.template.yaml * Update values.preview.template.yaml to test * Update UserEvents-SDO-nonprod.json * testing * Revert "testing" This reverts commit 43273c1. * testing * testing * testing * Revert "testing" This reverts commit 80eefbd. * Revert "testing" This reverts commit 13dbe58. * Revert "testing" This reverts commit 5498c74. * fixed PR pointing * Fixed show conditions * Fixed show conditions * removal of testing changes * evidence upload e2e pages * uploaded e2e with EU passing * moved evidence upload to damages folder * created own scenario for evidence upload * Update 1v2CreateClaim-LRspec_DiffSol_test.js * expected text fix * added defendant upload evidence test * commit for testing on pipeline purpose * commit for testing on pipeline purpose 2 * updated defendant evidence upload event * updated defendant evidence upload event 2 * updated defendant evidence upload event 3 * fixed url * added if conditions for url * fixed id issues * removed small claim id * fixed some id and tags * reverted package.json back to master --------- Co-authored-by: filippo-possenti-version1 <[email protected]> Co-authored-by: Mark Drummond <[email protected]> Co-authored-by: drummondjm <[email protected]> Co-authored-by: Bhagyashree Sharma <[email protected]> Co-authored-by: bhagyashreesharma90 <[email protected]> Co-authored-by: Filippo Possenti <[email protected]> Co-authored-by: bhagyashreesharma90 <[email protected]> Co-authored-by: zakishaik <[email protected]> Co-authored-by: mounikahmcts <[email protected]>
- Loading branch information
1 parent
d6c8ac0
commit 5bfc29a
Showing
4 changed files
with
232 additions
and
0 deletions.
There are no files selected for viewing
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,193 @@ | ||
const {I} = inject(); | ||
const config = require('../../config.js'); | ||
|
||
module.exports = { | ||
|
||
fields: { | ||
witnessSelectionEvidence: { | ||
id: '#witnessSelectionEvidence', | ||
options: { | ||
witnessStatement: '#witnessSelectionEvidence-WITNESS_STATEMENT' | ||
} | ||
}, | ||
|
||
witnessSelectionEvidenceRes: { | ||
id: '#witnessSelectionEvidenceRes', | ||
options: { | ||
witnessStatement: '#witnessSelectionEvidenceRes-WITNESS_STATEMENT' | ||
} | ||
}, | ||
|
||
expertSelectionEvidence:{ | ||
id: '#expertSelectionEvidence', | ||
options: { | ||
expertReport: '#expertSelectionEvidence-EXPERT_REPORT' | ||
} | ||
}, | ||
|
||
expertSelectionEvidenceRes:{ | ||
id: '#expertSelectionEvidenceRes', | ||
options: { | ||
expertReport: '#expertSelectionEvidenceRes-EXPERT_REPORT' | ||
} | ||
}, | ||
|
||
trialSelectionEvidence:{ | ||
id: '#trialSelectionEvidence', | ||
options: { | ||
authorities: '#trialSelectionEvidence-AUTHORITIES' | ||
} | ||
}, | ||
|
||
trialSelectionEvidenceRes:{ | ||
id: '#trialSelectionEvidenceRes', | ||
options: { | ||
authorities: '#trialSelectionEvidenceRes-AUTHORITIES' | ||
} | ||
}, | ||
|
||
documentWitnessStatement:{ | ||
id: '#documentWitnessStatement', | ||
button: '#documentWitnessStatement > div:nth-child(1) > button:nth-child(2)', | ||
name: '#documentWitnessStatement_0_witnessOptionName', | ||
day: '#witnessOptionUploadDate-day', | ||
month: '#witnessOptionUploadDate-month', | ||
year: '#witnessOptionUploadDate-year', | ||
document: '#documentWitnessStatement_0_witnessOptionDocument' | ||
}, | ||
|
||
documentWitnessStatementRes:{ | ||
id: '#documentWitnessStatementRes', | ||
button: '#documentWitnessStatementRes > div:nth-child(1) > button:nth-child(2)', | ||
name: '#documentWitnessStatementRes_0_witnessOptionName', | ||
day: '#witnessOptionUploadDate-day', | ||
month: '#witnessOptionUploadDate-month', | ||
year: '#witnessOptionUploadDate-year', | ||
document: '#documentWitnessStatementRes_0_witnessOptionDocument' | ||
}, | ||
|
||
documentExpertReport:{ | ||
id: '#documentExpertReport', | ||
button: '#documentExpertReport > div:nth-child(1) > button:nth-child(2)', | ||
name: '#documentExpertReport_0_expertOptionName', | ||
expertise: '#documentExpertReport_0_expertOptionExpertise', | ||
day: '#expertOptionUploadDate-day', | ||
month: '#expertOptionUploadDate-month', | ||
year: '#expertOptionUploadDate-year', | ||
document: '#documentExpertReport_0_expertDocument' | ||
}, | ||
|
||
documentExpertReportRes:{ | ||
id: '#documentExpertReportRes', | ||
button: '#documentExpertReportRes > div:nth-child(1) > button:nth-child(2)', | ||
name: '#documentExpertReportRes_0_expertOptionName', | ||
expertise: '#documentExpertReportRes_0_expertOptionExpertise', | ||
day: '#expertOptionUploadDate-day', | ||
month: '#expertOptionUploadDate-month', | ||
year: '#expertOptionUploadDate-year', | ||
document: '#documentExpertReportRes_0_expertDocument' | ||
}, | ||
|
||
documentAuthorities:{ | ||
id: '#documentAuthorities', | ||
button: '#documentAuthorities > div:nth-child(1) > button:nth-child(2)', | ||
document: '#documentAuthorities_0_documentUpload' | ||
}, | ||
|
||
documentAuthoritiesRes:{ | ||
id: '#documentAuthoritiesRes', | ||
button: '#documentAuthoritiesRes > div:nth-child(1) > button:nth-child(2)', | ||
document: '#documentAuthoritiesRes_0_documentUpload' | ||
} | ||
}, | ||
|
||
async selectType(defendant){ | ||
if(defendant) { | ||
await within(this.fields.witnessSelectionEvidenceRes.id, () => { | ||
I.click(this.fields.witnessSelectionEvidenceRes.options.witnessStatement); | ||
}); | ||
await within(this.fields.expertSelectionEvidenceRes.id, () => { | ||
I.click(this.fields.expertSelectionEvidenceRes.options.expertReport); | ||
}); | ||
await within(this.fields.trialSelectionEvidenceRes.id, () => { | ||
I.click(this.fields.trialSelectionEvidenceRes.options.authorities); | ||
}); | ||
} | ||
else { | ||
await within(this.fields.witnessSelectionEvidence.id, () => { | ||
I.click(this.fields.witnessSelectionEvidence.options.witnessStatement); | ||
}); | ||
await within(this.fields.expertSelectionEvidence.id, () => { | ||
I.click(this.fields.expertSelectionEvidence.options.expertReport); | ||
}); | ||
await within(this.fields.trialSelectionEvidence.id, () => { | ||
I.click(this.fields.trialSelectionEvidence.options.authorities); | ||
}); | ||
} | ||
await I.clickContinue(); | ||
}, | ||
|
||
async uploadYourDocument(file, defendant){ | ||
await I.waitForText('Upload Your Documents'); | ||
if(defendant) { | ||
await within(this.fields.documentWitnessStatementRes.id, () => { | ||
I.click(this.fields.documentWitnessStatementRes.button); | ||
I.fillField(this.fields.documentWitnessStatementRes.name, 'test name'); | ||
I.fillField(this.fields.documentWitnessStatementRes.day, '1'); | ||
I.fillField(this.fields.documentWitnessStatementRes.month, '1'); | ||
I.fillField(this.fields.documentWitnessStatementRes.year, '2022'); | ||
I.attachFile(this.fields.documentWitnessStatementRes.document, file); | ||
}); | ||
await within(this.fields.documentExpertReportRes.id, () => { | ||
I.click(this.fields.documentExpertReportRes.button); | ||
I.fillField(this.fields.documentExpertReportRes.name, 'test name'); | ||
I.fillField(this.fields.documentExpertReportRes.expertise, 'test expertise'); | ||
I.fillField(this.fields.documentExpertReportRes.day, '1'); | ||
I.fillField(this.fields.documentExpertReportRes.month, '1'); | ||
I.fillField(this.fields.documentExpertReportRes.year, '2022'); | ||
I.attachFile(this.fields.documentExpertReportRes.document, file); | ||
}); | ||
await within(this.fields.documentAuthoritiesRes.id, () => { | ||
I.click(this.fields.documentAuthoritiesRes.button); | ||
I.attachFile(this.fields.documentAuthoritiesRes.document, file); | ||
}); | ||
} | ||
else { | ||
await within(this.fields.documentWitnessStatement.id, () => { | ||
I.click(this.fields.documentWitnessStatement.button); | ||
I.fillField(this.fields.documentWitnessStatement.name, 'test name'); | ||
I.fillField(this.fields.documentWitnessStatement.day, '1'); | ||
I.fillField(this.fields.documentWitnessStatement.month, '1'); | ||
I.fillField(this.fields.documentWitnessStatement.year, '2022'); | ||
I.attachFile(this.fields.documentWitnessStatement.document, file); | ||
}); | ||
await within(this.fields.documentExpertReport.id, () => { | ||
I.click(this.fields.documentExpertReport.button); | ||
I.fillField(this.fields.documentExpertReport.name, 'test name'); | ||
I.fillField(this.fields.documentExpertReport.expertise, 'test expertise'); | ||
I.fillField(this.fields.documentExpertReport.day, '1'); | ||
I.fillField(this.fields.documentExpertReport.month, '1'); | ||
I.fillField(this.fields.documentExpertReport.year, '2022'); | ||
I.attachFile(this.fields.documentExpertReport.document, file); | ||
}); | ||
await within(this.fields.documentAuthorities.id, () => { | ||
I.click(this.fields.documentAuthorities.button); | ||
I.attachFile(this.fields.documentAuthorities.document, file); | ||
}); | ||
} | ||
await I.clickContinue(); | ||
}, | ||
|
||
async uploadADocument(caseId, defendant) { | ||
await I.amOnPage(config.url.manageCase + '/cases/case-details/' + caseId); | ||
await I.waitForText('Summary'); | ||
if (defendant) { | ||
await I.amOnPage(config.url.manageCase + '/cases/case-details/' + caseId + '/trigger/EVIDENCE_UPLOAD_RESPONDENT/EVIDENCE_UPLOAD_RESPONDENTEvidenceUpload'); | ||
} | ||
else { | ||
await I.amOnPage(config.url.manageCase + '/cases/case-details/' + caseId + '/trigger/EVIDENCE_UPLOAD_APPLICANT/EVIDENCE_UPLOAD_APPLICANTEvidenceUpload'); | ||
} | ||
await I.waitForText('Upload Your Documents'); | ||
await I.click('Continue'); | ||
} | ||
}; |
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