@hmcts/media-viewer 4.2.30 → 4.2.32

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.
Binary file
package/README.md CHANGED
@@ -132,7 +132,7 @@ Current Playwright lanes:
132
132
  | Lane | Config/project | Command | Scope |
133
133
  | --- | --- | --- | --- |
134
134
  | Standalone smoke | `playwright.config.ts`, project `smoke` | `yarn test:playwright:smoke` or `yarn test:smoke` | One readiness contract: loads a standalone PDF and proves the rendered viewer, first page and canvas are usable. |
135
- | Migrated functional | `playwright.config.ts`, project `functional` | `yarn test:playwright:functional` | 32 behaviour tests across the explicit `zoom`, `navigation`, `rotation`, `search`, `comments` and `bookmarks` feature files; one bookmarks reorder test is intentionally skipped pending [EXUI-5097](https://tools.hmcts.net/jira/browse/EXUI-5097). See [`playwright_tests/functional/README.md`](playwright_tests/functional/README.md). |
135
+ | Migrated functional | `playwright.config.ts`, project `functional` | `yarn test:playwright:functional` | 56 behaviour tests across 12 explicit feature files; one bookmarks reorder test is intentionally skipped pending [EXUI-5097](https://tools.hmcts.net/jira/browse/EXUI-5097). See [`playwright_tests/functional/README.md`](playwright_tests/functional/README.md). |
136
136
  | Viewer support | `playwright.config.ts`, project `support` | `yarn test:playwright:support` | Proves the reusable PDF, image and unsupported-media fixtures, component objects and response diagnostics. |
137
137
 
138
138
  The current migration slice is deliberately separated from smoke: smoke proves
@@ -144,10 +144,12 @@ Playwright Odhín report also includes a capability inventory showing covered,
144
144
  partially covered and legacy-only Media Viewer areas, with the remaining
145
145
  assurance gap for each capability.
146
146
 
147
- The Playwright config runs tests fully in parallel with seven workers. Each test
148
- gets its own browser context and page-scoped route mocks. Tests must not depend
149
- on execution order or share mutable documents; mutation-heavy AAT journeys must
150
- provision a document per test or reset it before reuse.
147
+ The Playwright config runs tests fully in parallel with seven workers by
148
+ default. Set `FUNCTIONAL_TESTS_WORKERS` to a positive integer (up to 64) for an
149
+ intentional capacity run. Each test gets its own browser context and page-scoped
150
+ route mocks. Tests must not depend on execution order or share mutable
151
+ documents; mutation-heavy AAT journeys must provision a document per test or
152
+ reset it before reuse.
151
153
 
152
154
  Install Chromium once before local runs when the browser cache is empty:
153
155
 
@@ -169,13 +171,13 @@ yarn test:playwright:smoke
169
171
  ```
170
172
 
171
173
  Override the smoke document and case id with `MV_SMOKE_PDF_DOCUMENT_URL` and
172
- `MV_SMOKE_CASE_ID`. `yarn test:smoke` now runs the Playwright smoke so Jenkins
173
- CNP uses the same smoke entrypoint style as MC/MO. The previous CodeceptJS smoke
174
- remains available as `yarn test:smoke:legacy` while migration work continues.
174
+ `MV_SMOKE_CASE_ID`. `yarn test:smoke` and `yarn test:local:aat` run the
175
+ Playwright smoke, so the standalone and local-AAT PDF loading journeys no longer
176
+ fall back to CodeceptJS.
175
177
 
176
178
  The lane wrapper commands write Playwright evidence under `functional-output/tests`:
177
179
 
178
- | Lane | Odhín | JUnit | Trace, screenshot and video output |
180
+ | Lane | Odhín | JUnit | Trace and screenshot output |
179
181
  | --- | --- | --- | --- |
180
182
  | Viewer support | `functional-output/tests/playwright-support/odhin-report/xui-playwright-support.html` | `functional-output/tests/playwright-support/playwright-support-junit.xml` | `functional-output/tests/playwright-support/test-results` |
181
183
  | Smoke | `functional-output/tests/playwright-smoke/odhin-report/xui-playwright-smoke.html` | `functional-output/tests/playwright-smoke/playwright-smoke-junit.xml` | `functional-output/tests/playwright-smoke/test-results` |
@@ -198,8 +200,8 @@ Reporting behavior follows the MC/MO pattern:
198
200
  count and total RAM in its run information.
199
201
  - CI logs Odhín finalisation progress using the same progress reporter as MC/MO.
200
202
  - Odhín is the only standard human-readable report. JUnit is retained for
201
- Jenkins ingestion. Screenshots and videos are kept on failure; traces are
202
- captured on the first retry.
203
+ Jenkins ingestion. Screenshots and traces are kept for failed and timed-out
204
+ attempts; videos are disabled.
203
205
  The standard Playwright HTML reporter is not supported.
204
206
  - `PLAYWRIGHT_SKIP_INSTALL=true` skips browser installation when Jenkins or a
205
207
  local setup step has already installed Chromium.
@@ -228,7 +230,7 @@ Useful overrides:
228
230
  - `PLAYWRIGHT_REPORT_BRANCH`: branch override used by the default release label
229
231
  - `PLAYWRIGHT_REPORT_TEST_ENVIRONMENT` or `PW_ODHIN_ENV`: complete Odhín test-environment label override
230
232
  - `TEST_TYPE`: target-environment label, otherwise inferred from the test URL
231
- - `PLAYWRIGHT_TEST_OUTPUT_DIR`: traces, screenshots and videos folder
233
+ - `PLAYWRIGHT_TEST_OUTPUT_DIR`: traces and screenshots folder
232
234
  - `FUNCTIONAL_TESTS_WORKERS`: worker-count override from `1` to `64`, default `7`
233
235
  - `PLAYWRIGHT_SKIP_INSTALL=true`: skip the automatic Chromium install in Playwright scripts
234
236
 
@@ -316,10 +318,7 @@ yarn test:functional:local:isolated
316
318
  ```
317
319
 
318
320
  Expected `test:functional:local:isolated` feature groups:
319
- - `annotationsAndComments`
320
- - `bookMarks`
321
321
  - `redact`
322
- - `printAndDownload`
323
322
  - `imageViewerAnnotationsAndComments`
324
323
 
325
324
  For the strongest isolation proof, make each scenario upload and use its own document:
@@ -2160,7 +2160,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.26", ngImpo
2160
2160
  args: ['mousedown', ['$event']]
2161
2161
  }] } });
2162
2162
 
2163
- pdfjs.GlobalWorkerOptions.workerSrc = '/assets/build/pdf.worker.min.js';
2163
+ pdfjs.GlobalWorkerOptions.workerSrc = '/assets/build/pdf.worker.min.mjs';
2164
2164
  /**
2165
2165
  * Values of the state field returned by the find events
2166
2166
  */