@ministryofjustice/hmpps-probation-integration-e2e-tests 1.196.0 → 1.198.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.198.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ministryofjustice/hmpps-probation-integration-e2e-tests#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -13,8 +13,10 @@ const createContact = async (page, crn, options) => {
|
|
|
13
13
|
if (options.date) await fillDate(page, "#StartDate\\:datePicker", options.date);
|
|
14
14
|
await selectOption(page, "#RelatedTo\\:selectOneMenu", options.relatesTo);
|
|
15
15
|
await selectOption(page, "#ContactCategory\\:selectOneMenu", options.category);
|
|
16
|
-
|
|
17
|
-
await
|
|
16
|
+
const contactTypeDropdown = page.locator("[id=\"ContactType:selectOneMenu-autocomplete\"]");
|
|
17
|
+
await contactTypeDropdown.click();
|
|
18
|
+
await contactTypeDropdown.fill(options.type);
|
|
19
|
+
await page.locator("li[id=\"ContactType:selectOneMenu-autocomplete__option--0\"]", { hasText: options.type }).click();
|
|
18
20
|
await selectOption(page, "#TransferToTrust\\:selectOneMenu", options.allocation?.team?.provider);
|
|
19
21
|
await selectOption(page, "#TransferToTeam\\:selectOneMenu", options.allocation?.team?.name);
|
|
20
22
|
await selectOption(page, "#alert\\:selectOneMenu", options.alert ? "Yes" : "No");
|
|
@@ -2,7 +2,7 @@ import { selectOption } from "../delius/utils/inputs.mjs";
|
|
|
2
2
|
import { expect } from "@playwright/test";
|
|
3
3
|
//#region steps/manage-pom-cases/caseload.ts
|
|
4
4
|
const switchCaseload = async (page, caseload) => {
|
|
5
|
-
await page.locator("[data-qa=\"
|
|
5
|
+
await page.locator("[data-qa=\"cdps-header-caseload\"]").click();
|
|
6
6
|
await selectOption(page, "#changeCaseloadSelect", caseload);
|
|
7
7
|
await page.getByRole("button", { name: "Submit" }).click();
|
|
8
8
|
await page.goto(process.env.MANAGE_POM_CASES_URL);
|
|
@@ -12,7 +12,7 @@ const referralProgress = async (page, referralRef) => {
|
|
|
12
12
|
};
|
|
13
13
|
const makeReferral = async (page, crn) => {
|
|
14
14
|
await page.getByRole("link", { name: "Find a CRS intervention and make a referral" }).click();
|
|
15
|
-
await page.locator("text=Accommodation Services
|
|
15
|
+
await page.locator("text=Accommodation Services for East of England").click();
|
|
16
16
|
await page.locator("text=Make a referral").click();
|
|
17
17
|
await page.locator("input[name=\"service-user-crn\"]").fill(crn);
|
|
18
18
|
await page.locator("text=Continue").click();
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { refreshUntil } from "../delius/utils/refresh.mjs";
|
|
1
2
|
import { expect } from "@playwright/test";
|
|
2
3
|
//#region steps/workforce/login.ts
|
|
3
4
|
const login = async (page) => {
|
|
@@ -6,7 +7,7 @@ const login = async (page) => {
|
|
|
6
7
|
await page.fill("#username", process.env.DELIUS_USERNAME);
|
|
7
8
|
await page.fill("#password", process.env.DELIUS_PASSWORD);
|
|
8
9
|
await page.click("#submit");
|
|
9
|
-
await expect(page).toHaveTitle(/.*Manage a workforce/);
|
|
10
|
+
await refreshUntil(page, () => expect(page).toHaveTitle(/.*Manage a workforce/));
|
|
10
11
|
};
|
|
11
12
|
//#endregion
|
|
12
13
|
export { login };
|