@ministryofjustice/hmpps-probation-integration-e2e-tests 1.218.0 → 1.220.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 +3 -3
- package/steps/delius/contact/find-contacts.mjs +1 -1
- package/steps/delius/staff/community-manager.mjs +1 -1
- package/steps/delius/upw/create-upw-appointment.d.mts +1 -1
- package/steps/delius/upw/create-upw-appointment.mjs +1 -1
- package/steps/manage-a-supervision/check-in.mjs +8 -1
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.220.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ministryofjustice/hmpps-probation-integration-e2e-tests#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@faker-js/faker": "^10.0.0",
|
|
19
19
|
"@kubernetes/client-node": "^1.0.0",
|
|
20
|
-
"@playwright/test": "1.
|
|
21
|
-
"playwright-core": "1.
|
|
20
|
+
"@playwright/test": "1.60.0",
|
|
21
|
+
"playwright-core": "1.60.0",
|
|
22
22
|
"luxon": "^3.5.0",
|
|
23
23
|
"node-stream-zip": "^1.15.0",
|
|
24
24
|
"pdf2json": "^4.0.0"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { doUntil } from "../utils/refresh.mjs";
|
|
2
|
-
import { findOffenderByCRN } from "../offender/find-offender.mjs";
|
|
3
2
|
import { referralProgress } from "../../referandmonitor/referral.mjs";
|
|
3
|
+
import { findOffenderByCRN } from "../offender/find-offender.mjs";
|
|
4
4
|
import { findEventByCRN } from "../event/find-events.mjs";
|
|
5
5
|
import { expect } from "@playwright/test";
|
|
6
6
|
//#region steps/delius/contact/find-contacts.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { doUntil } from "../utils/refresh.mjs";
|
|
2
2
|
import { selectOption } from "../utils/inputs.mjs";
|
|
3
|
-
import { findOffenderByNomisId } from "../offender/find-offender.mjs";
|
|
4
3
|
import { login } from "../login.mjs";
|
|
4
|
+
import { findOffenderByNomisId } from "../offender/find-offender.mjs";
|
|
5
5
|
import { expect } from "@playwright/test";
|
|
6
6
|
import { faker } from "@faker-js/faker";
|
|
7
7
|
//#region steps/delius/staff/community-manager.ts
|
|
@@ -15,7 +15,7 @@ async function createUpwAppointment(page, { crn, eventNumber = 1, projectName, d
|
|
|
15
15
|
await selectOption(page, "#projectTeamList\\:selectOneMenu", teamName);
|
|
16
16
|
await selectOption(page, "#project\\:selectOneMenu", projectName);
|
|
17
17
|
await selectOption(page, "#projectType\\:selectOneMenu", projectType);
|
|
18
|
-
await selectOption(page, "#projectAvailability\\:selectOneMenu", allocation);
|
|
18
|
+
if (allocation) await selectOption(page, "#projectAvailability\\:selectOneMenu", allocation);
|
|
19
19
|
await waitForAjax(page);
|
|
20
20
|
if (startTime) await page.fill("#startTime\\:timePicker", startTime);
|
|
21
21
|
if (endTime) await page.fill("#endTime\\:timePicker", endTime);
|
|
@@ -6,6 +6,7 @@ import { login } from "./login.mjs";
|
|
|
6
6
|
import { createOffenderCheckin } from "../api/esupervision/esupervision.mjs";
|
|
7
7
|
import { expect } from "@playwright/test";
|
|
8
8
|
import { DateTime } from "luxon";
|
|
9
|
+
import { faker } from "@faker-js/faker";
|
|
9
10
|
//#region steps/manage-a-supervision/check-in.ts
|
|
10
11
|
async function registerCaseInMPoP(page, person, crn) {
|
|
11
12
|
const uiDueDate = getWorkingDayForEsupervision(1);
|
|
@@ -94,7 +95,13 @@ async function reviewCheckinInMPoP(page, crn) {
|
|
|
94
95
|
await page.getByRole("radio", { name: "Yes" }).check();
|
|
95
96
|
await page.getByRole("button", { name: "Confirm and review responses" }).click();
|
|
96
97
|
await expect(heading).toContainText("Online check in submitted");
|
|
97
|
-
await page.
|
|
98
|
+
await page.locator("textarea.govuk-textarea").fill(faker.lorem.sentence());
|
|
99
|
+
await page.getByRole("radio", { name: "No, it is not sensitive" }).click();
|
|
100
|
+
await page.getByRole("radio", {
|
|
101
|
+
name: "No",
|
|
102
|
+
exact: true
|
|
103
|
+
}).click();
|
|
104
|
+
await page.getByRole("button", { name: "Complete review" }).click();
|
|
98
105
|
await page.getByText("Online check in completed").first().click();
|
|
99
106
|
await expect(page.getByRole("table")).toContainText("Check in status: Reviewed");
|
|
100
107
|
}
|