@ministryofjustice/hmpps-probation-integration-e2e-tests 1.132.0 → 1.134.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.132.0",
4
+ "version": "1.134.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/ministryofjustice/hmpps-probation-integration-e2e-tests#readme",
7
7
  "bugs": {
@@ -4,11 +4,12 @@ import { DateTime } from "luxon";
4
4
  //#region steps/court-case/prepare-case-for-sentence/application.ts
5
5
  async function addCourtToUser(page, court) {
6
6
  await page.getByRole("button", { name: /Accept analytics cookies/ }).click();
7
+ await page.getByRole("link", { name: "Edit my courts" }).click();
7
8
  await page.focus("#pac-select-court");
8
9
  await page.keyboard.type(court);
9
10
  await page.keyboard.press("Enter");
10
11
  await page.getByRole("button", { name: "Add" }).click();
11
- await page.locator("[href=\"?save=true\"]", { hasText: "Save and continue" }).click();
12
+ await page.locator("[href=\"?save=true\"]", { hasText: "Save list and continue" }).click();
12
13
  await expect(page).toHaveTitle("My courts - Prepare a case for sentence");
13
14
  await page.getByRole("link", { name: court }).click();
14
15
  await expect(page).toHaveTitle("Case list - Prepare a case for sentence");
@@ -2,6 +2,6 @@ import { Page } from "@playwright/test";
2
2
 
3
3
  //#region steps/cvl-licences/application.d.ts
4
4
  declare const createLicence: (page: Page, crn: string, nomsNumber: string) => Promise<void>;
5
- declare const approveLicence: (page: Page, crn: string, nomsNumber: string, establishment: string) => Promise<void>;
5
+ declare const approveLicence: (page: Page, nomsNumber: string, establishment: string) => Promise<void>;
6
6
  //#endregion
7
7
  export { approveLicence, createLicence };
@@ -39,18 +39,18 @@ const createLicence = async (page, crn, nomsNumber) => {
39
39
  await expect(page).toHaveTitle("Create and vary a licence - Create a licence - Confirmation");
40
40
  await page.getByRole("link", { name: /Sign out/ }).click();
41
41
  };
42
- const approveLicence = async (page, crn, nomsNumber, establishment) => {
42
+ const approveLicence = async (page, nomsNumber, establishment) => {
43
43
  await loginAsPrisonOfficer(page);
44
44
  await page.getByRole("link", { name: "Approve a licence" }).click();
45
45
  await expect(page).toHaveTitle("Create and vary a licence - approval cases");
46
- await page.getByLabel("Find a case").fill(crn);
46
+ await page.getByRole("link", { name: "Licences for other" }).click();
47
+ await page.getByLabel(establishment).check();
48
+ await page.getByRole("button", { name: "Continue" }).click();
49
+ await page.getByLabel("Find a case").fill(nomsNumber);
47
50
  await page.getByRole("button", {
48
51
  name: "Search",
49
52
  exact: true
50
53
  }).first().click();
51
- await page.getByRole("link", { name: "Licences for other" }).click();
52
- await page.getByLabel(establishment).check();
53
- await page.getByRole("button", { name: "Continue" }).click();
54
54
  await page.locator(`tr:has([data-sort-value="${nomsNumber}"]) td#name-1 a.govuk-link`).click();
55
55
  await expect(page).toHaveTitle("Create and vary a licence - Approve a licence");
56
56
  await page.getByRole("button", { name: /Approve/ }).click();