@ministryofjustice/hmpps-probation-integration-e2e-tests 1.117.0 → 1.118.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.118.0",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/ministryofjustice/hmpps-probation-integration-e2e-tests#readme",
|
|
7
7
|
"bugs": {
|
|
@@ -97,6 +97,7 @@
|
|
|
97
97
|
"./steps/cvl-licences/application": "./steps/cvl-licences/application.mjs",
|
|
98
98
|
"./steps/cvl-licences/login": "./steps/cvl-licences/login.mjs",
|
|
99
99
|
"./steps/delius/address/create-address": "./steps/delius/address/create-address.mjs",
|
|
100
|
+
"./steps/delius/address/delete-addresses": "./steps/delius/address/delete-addresses.mjs",
|
|
100
101
|
"./steps/delius/contact/create-contact": "./steps/delius/contact/create-contact.mjs",
|
|
101
102
|
"./steps/delius/contact/find-contacts": "./steps/delius/contact/find-contacts.mjs",
|
|
102
103
|
"./steps/delius/court-report/find-court-report": "./steps/delius/court-report/find-court-report.mjs",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { findOffenderByCRN } from "../offender/find-offender.mjs";
|
|
2
|
+
import { expect } from "@playwright/test";
|
|
3
|
+
|
|
4
|
+
//#region steps/delius/address/delete-addresses.ts
|
|
5
|
+
const deleteAddresses = async (page, crn) => {
|
|
6
|
+
await findOffenderByCRN(page, crn);
|
|
7
|
+
await page.getByRole("link", { name: "Personal Details" }).click();
|
|
8
|
+
await page.getByRole("link", { name: "Addresses" }).click();
|
|
9
|
+
await expect(page.locator("h1")).toContainText("Addresses and Accommodation");
|
|
10
|
+
while (await page.locator("#otherAddressTable tbody tr").count() > 1) {
|
|
11
|
+
await page.locator("#otherAddressTable tbody tr").first().locator("a[title=\"Link to Delete this Address\"]").click();
|
|
12
|
+
await expect(page.locator("h1")).toContainText("Delete Address");
|
|
13
|
+
await page.locator("input", { hasText: "Confirm" }).click();
|
|
14
|
+
await expect(page.locator("h1")).toContainText("Addresses and Accommodation");
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//#endregion
|
|
19
|
+
export { deleteAddresses };
|
|
@@ -23,7 +23,7 @@ async function findOffenderByCRN(page, crn) {
|
|
|
23
23
|
await page.locator("tr", { hasText: crn }).locator("a", { hasText: "View" }).click();
|
|
24
24
|
await dismissModals(page);
|
|
25
25
|
}
|
|
26
|
-
await expect(page
|
|
26
|
+
await expect(page.getByRole("heading", { name: "Case Summary" })).toBeVisible({ timeout: 1e4 });
|
|
27
27
|
}
|
|
28
28
|
async function findOffenderByCRNNoContextCheck(page, crn) {
|
|
29
29
|
await page.locator("#navigation-include\\:linkNavigation1Search", { hasText: "National search" }).click();
|