@ministryofjustice/hmpps-probation-integration-e2e-tests 1.211.0 → 1.212.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.211.0",
4
+ "version": "1.212.0",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/ministryofjustice/hmpps-probation-integration-e2e-tests#readme",
7
7
  "bugs": {
@@ -143,6 +143,7 @@
143
143
  "./steps/delius/upw/create-upw-appointment": "./steps/delius/upw/create-upw-appointment.mjs",
144
144
  "./steps/delius/upw/create-upw-project": "./steps/delius/upw/create-upw-project.mjs",
145
145
  "./steps/delius/upw/start-upw-assessment": "./steps/delius/upw/start-upw-assessment.mjs",
146
+ "./steps/delius/upw/verify-adjustment": "./steps/delius/upw/verify-adjustment.mjs",
146
147
  "./steps/delius/upw/verify-time-credited": "./steps/delius/upw/verify-time-credited.mjs",
147
148
  "./steps/delius/utils/contact": "./steps/delius/utils/contact.mjs",
148
149
  "./steps/delius/utils/date-time": "./steps/delius/utils/date-time.mjs",
@@ -0,0 +1,17 @@
1
+ import { Page } from "@playwright/test";
2
+
3
+ //#region steps/delius/upw/verify-adjustment.d.ts
4
+ interface Options {
5
+ crn: string;
6
+ eventNumber?: number;
7
+ reason: string;
8
+ hoursCredited: string;
9
+ }
10
+ declare function verifyAdjustment(page: Page, {
11
+ crn,
12
+ eventNumber,
13
+ reason,
14
+ hoursCredited
15
+ }: Options): Promise<void>;
16
+ //#endregion
17
+ export { verifyAdjustment as default };
@@ -0,0 +1,16 @@
1
+ import { waitForAjax } from "../utils/refresh.mjs";
2
+ import { findEventByCRN } from "../event/find-events.mjs";
3
+ import { verifyTableRowByContent } from "../utils/table.mjs";
4
+ //#region steps/delius/upw/verify-adjustment.ts
5
+ async function verifyAdjustment(page, { crn, eventNumber = 1, reason, hoursCredited }) {
6
+ await findEventByCRN(page, crn, eventNumber);
7
+ await page.click("#navigation-include\\:linkNavigation3UnpaidWork");
8
+ await page.getByRole("button", { name: "Adjustment" }).click();
9
+ await waitForAjax(page);
10
+ await verifyTableRowByContent(page, "currentAdjustmentsTable", reason, [{
11
+ columnName: "Adjustment",
12
+ cellContent: hoursCredited
13
+ }]);
14
+ }
15
+ //#endregion
16
+ export { verifyAdjustment as default };