@ministryofjustice/hmpps-probation-integration-e2e-tests 1.201.0 → 1.202.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ministryofjustice/hmpps-probation-integration-e2e-tests",
|
|
3
3
|
"description": "Playwright end to end tests for hmpps-probation-integration-services.",
|
|
4
|
-
"version": "1.
|
|
4
|
+
"version": "1.202.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ministryofjustice/hmpps-probation-integration-e2e-tests#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -9,14 +9,14 @@ async function createSubjectAccessReport(page, crn, downloadLocation) {
|
|
|
9
9
|
await page.locator("input", { hasText: "New SAR" }).click();
|
|
10
10
|
await page.locator("input", { hasText: "Save" }).click();
|
|
11
11
|
const sarProgressTable = page.locator("#subjectAccessReportTable");
|
|
12
|
-
await refreshUntil(page, () => expect(sarProgressTable).toContainText("Complete"));
|
|
12
|
+
await refreshUntil(page, () => expect(sarProgressTable).toContainText("Complete"), { timeout: 2e4 });
|
|
13
13
|
const [download] = await Promise.all([page.waitForEvent("download"), sarProgressTable.locator("a", { hasText: "Download" }).click()]);
|
|
14
14
|
await download.saveAs(downloadLocation);
|
|
15
15
|
}
|
|
16
16
|
async function getFileFromZip(downloadLocation, filename) {
|
|
17
17
|
const zip = new StreamZip.async({ file: downloadLocation });
|
|
18
18
|
const matchingFiles = Object.values(await zip.entries()).filter((entry) => entry.isFile && filename.test(entry.name));
|
|
19
|
-
expect(matchingFiles).toHaveLength(
|
|
19
|
+
expect(matchingFiles).toHaveLength(1);
|
|
20
20
|
return zip.entryData(matchingFiles[0]);
|
|
21
21
|
}
|
|
22
22
|
//#endregion
|
|
@@ -20,7 +20,8 @@ const commonData = {
|
|
|
20
20
|
adjournedForFastPreSentenceReport: {
|
|
21
21
|
appearanceType: "Trial/Adjournment",
|
|
22
22
|
outcome: "Adjourned - Pre-Sentence Report",
|
|
23
|
-
reportType: "Pre-Sentence Report - Fast"
|
|
23
|
+
reportType: "Pre-Sentence Report - Fast",
|
|
24
|
+
mainOffence: "Stealing by an employee - 04100"
|
|
24
25
|
},
|
|
25
26
|
adjournedForOralPreSentenceReport: {
|
|
26
27
|
appearanceType: "Trial/Adjournment",
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
const testEnvironmentData = {
|
|
3
3
|
documentTemplates: {
|
|
4
4
|
shortFormatPreSentenceReport: "Nat Short format pre-sentence report pilot",
|
|
5
|
-
oralPreSentenceReport: "Record of Oral Pre-Sentence Report"
|
|
5
|
+
oralPreSentenceReport: "Record of Oral Pre-Sentence Report",
|
|
6
|
+
adjournedPsr: "Adjourned PSR"
|
|
6
7
|
},
|
|
7
8
|
contacts: { initialAppointment: {
|
|
8
9
|
category: "All/Always",
|