@ministryofjustice/hmpps-probation-integration-e2e-tests 1.124.0 → 1.126.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.126.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ministryofjustice/hmpps-probation-integration-e2e-tests#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -18,7 +18,6 @@
|
|
|
18
18
|
"@faker-js/faker": "^10.0.0",
|
|
19
19
|
"@kubernetes/client-node": "^1.0.0",
|
|
20
20
|
"@playwright/test": "1.56.1",
|
|
21
|
-
"dotenv": "^17.0.0",
|
|
22
21
|
"luxon": "^3.5.0",
|
|
23
22
|
"node-stream-zip": "^1.15.0",
|
|
24
23
|
"pdf2json": "^4.0.0"
|
|
@@ -13,6 +13,14 @@ const deleteAddresses = async (page, crn) => {
|
|
|
13
13
|
await page.locator("input", { hasText: "Confirm" }).click();
|
|
14
14
|
await expect(page.locator("h1")).toContainText("Addresses and Accommodation");
|
|
15
15
|
}
|
|
16
|
+
await page.getByRole("button", { name: "Address History" }).click();
|
|
17
|
+
await expect(page.locator("h1")).toContainText("Address History");
|
|
18
|
+
while (await page.locator("#addressHistoryTable tbody tr").count() > 1) {
|
|
19
|
+
await page.locator("#addressHistoryTable tbody tr").first().locator("a[title=\"Link to Delete this Address\"]").click();
|
|
20
|
+
await expect(page.locator("h1")).toContainText("Delete Address");
|
|
21
|
+
await page.locator("input", { hasText: "Confirm" }).click();
|
|
22
|
+
await expect(page.locator("h1")).toContainText("Address History");
|
|
23
|
+
}
|
|
16
24
|
};
|
|
17
25
|
|
|
18
26
|
//#endregion
|
|
@@ -6,10 +6,8 @@ import { addProviderOfficerDetails } from "./create-staff-record/add-provider-of
|
|
|
6
6
|
import { addProviderOfficersApprovedPremises } from "./create-staff-record/update-provider-officer.mjs";
|
|
7
7
|
import { searchApprovedPremises } from "./Keyworker/approved-premises-keyworker.mjs";
|
|
8
8
|
import { addKeyWorker } from "./Keyworker/add-keyworker.mjs";
|
|
9
|
-
import * as dotenv from "dotenv";
|
|
10
9
|
|
|
11
10
|
//#region steps/delius/createApprovedPremisesKeyWorker/create-approved-premises-keyworker.ts
|
|
12
|
-
dotenv.config();
|
|
13
11
|
const createApprovedPremisesKeyWorker = async (page) => {
|
|
14
12
|
await clickReferenceData(page);
|
|
15
13
|
await clickLocalReferenceRecords(page);
|
package/test-data/test-data.mjs
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { commonData } from "./environments/common.mjs";
|
|
2
2
|
import { testEnvironmentData } from "./environments/test.mjs";
|
|
3
|
-
import * as dotenv from "dotenv";
|
|
4
3
|
|
|
5
4
|
//#region test-data/test-data.ts
|
|
6
5
|
var TestData = class {
|
|
@@ -14,7 +13,6 @@ var TestData = class {
|
|
|
14
13
|
this.prisoners = {};
|
|
15
14
|
}
|
|
16
15
|
};
|
|
17
|
-
dotenv.config();
|
|
18
16
|
const data = new TestData();
|
|
19
17
|
const environmentData = (!process.env.ENV || process.env.ENV == "test") && testEnvironmentData || (() => {
|
|
20
18
|
throw new Error(`Unexpected environment: ${process.env.ENV}. Make sure you set the ENV variable correctly.`);
|