@hmcts/media-viewer 4.2.33 → 4.2.34
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/.yarn/install-state.gz +0 -0
- package/README.md +29 -67
- package/package.json +1 -1
- package/package.tgz +0 -0
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/README.md
CHANGED
|
@@ -116,10 +116,11 @@ For browser-level proof that the standalone viewer is using AAT-backed services,
|
|
|
116
116
|
yarn test:local:aat
|
|
117
117
|
```
|
|
118
118
|
|
|
119
|
-
This
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
This executes the Functional Playwright contracts against the local standalone Media
|
|
120
|
+
Viewer and AAT-backed proxy configuration while keeping the browser at
|
|
121
|
+
`http://localhost:3000/`. It does not create CCD cases or DM Store documents; use
|
|
122
|
+
the opt-in external-service contracts for those live service probes. The lightweight
|
|
123
|
+
route and health check remains available as `yarn smoke:local:aat`.
|
|
123
124
|
|
|
124
125
|
### 5. Run Playwright tests
|
|
125
126
|
Media Viewer is starting its Playwright migration with the same runner and
|
|
@@ -132,17 +133,17 @@ Current Playwright lanes:
|
|
|
132
133
|
| Lane | Config/project | Command | Scope |
|
|
133
134
|
| --- | --- | --- | --- |
|
|
134
135
|
| 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` |
|
|
136
|
+
| Migrated functional | `playwright.config.ts`, project `functional` | `yarn test:playwright:functional` | 74 fixture-backed browser contracts across 13 feature files, including separate failed PDF/image rendered-state diagnostics. Two additional image-annotation create contracts are discoverable, ticketed against [EXUI-5124](https://tools.hmcts.net/jira/browse/EXUI-5124), and excluded from the default selection because the current product does not persist an image draw-box annotation. See [`playwright_tests/functional/README.md`](playwright_tests/functional/README.md). |
|
|
137
|
+
| External service diagnostics | `playwright.config.ts`, opt-in project `external-service-contracts` | `yarn test:playwright:external-service-contracts` | Optional live AAT CCD/DM Store/annotation probes for a deliberate environment investigation. The default command executes 6 non-defect service contracts; four CCD browser-route contracts tagged against [EXUI-5122](https://tools.hmcts.net/jira/browse/EXUI-5122) and [EXUI-5123](https://tools.hmcts.net/jira/browse/EXUI-5123) remain discoverable but are excluded by default. Use `PLAYWRIGHT_INCLUDE_KNOWN_DEFECTS=true` to discover and execute all 10. They are never part of normal PR assurance. |
|
|
136
138
|
| 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
139
|
|
|
138
140
|
The current migration slice is deliberately separated from smoke: smoke proves
|
|
139
|
-
the application is ready, functional proves user-facing viewer behaviour
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
assurance gap for each capability.
|
|
141
|
+
the application is ready, functional proves user-facing viewer behaviour and
|
|
142
|
+
its deterministic Viewer/service request-response contracts, and support proves
|
|
143
|
+
the reusable automation contracts. External service diagnostics
|
|
144
|
+
are opt-in and never gate a standalone Media Viewer change. Every Playwright Odhín report includes a capability
|
|
145
|
+
inventory that states whether each contract is selected by default or is a
|
|
146
|
+
discoverable, ticketed product-defect contract.
|
|
146
147
|
|
|
147
148
|
The Playwright config runs tests fully in parallel with seven workers by
|
|
148
149
|
default. Set `FUNCTIONAL_TESTS_WORKERS` to a positive integer (up to 64) for an
|
|
@@ -261,8 +262,10 @@ Migration boundaries:
|
|
|
261
262
|
- Put new native Playwright specs under `playwright_tests/`.
|
|
262
263
|
- Keep screen interactions and reusable locators in page objects under
|
|
263
264
|
`playwright_tests/pages/`; keep assertions visible in specs.
|
|
264
|
-
-
|
|
265
|
-
|
|
265
|
+
- Historical CodeceptJS scenarios are retained as source traceability only;
|
|
266
|
+
their executable pipeline routing is retired once the mapped Playwright
|
|
267
|
+
contract is selected by default or is represented by a discoverable,
|
|
268
|
+
ticketed product-defect contract.
|
|
266
269
|
- Add stable report output paths for every new Playwright lane so Jenkins can
|
|
267
270
|
publish Odhín and JUnit and archive failure diagnostics without bespoke stage
|
|
268
271
|
logic.
|
|
@@ -270,66 +273,25 @@ Migration boundaries:
|
|
|
270
273
|
an error page, blank page, wrong route or service-down page as a valid ready
|
|
271
274
|
signal.
|
|
272
275
|
|
|
273
|
-
### 6.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
is running:
|
|
276
|
+
### 6. Run local Playwright lanes
|
|
277
|
+
`yarn test:local:aat` is the standalone smoke lane; it does not create a CCD
|
|
278
|
+
case or DM Store document. Run the fixture-backed Functional lane locally with:
|
|
277
279
|
|
|
278
280
|
```
|
|
279
|
-
yarn
|
|
281
|
+
yarn test:playwright:functional
|
|
280
282
|
```
|
|
281
283
|
|
|
282
|
-
|
|
283
|
-
-
|
|
284
|
-
-
|
|
285
|
-
|
|
286
|
-
-
|
|
284
|
+
The default local suite is standalone: it needs neither AAT credentials nor
|
|
285
|
+
shared CCD, DM Store or annotation-service state. External service diagnostics
|
|
286
|
+
are deliberately opt-in and must not be used as normal migration assurance. The
|
|
287
|
+
external command runs 6 contracts by default; `PLAYWRIGHT_INCLUDE_KNOWN_DEFECTS=true`
|
|
288
|
+
runs the full 10-contract inventory, including the four ticketed CCD browser defects.
|
|
289
|
+
Known product-defect contracts are not skipped: they remain discoverable and
|
|
290
|
+
run only when explicitly selected:
|
|
287
291
|
|
|
288
|
-
The upload path mirrors em-showcase: multipart `files`, `classification=PUBLIC`,
|
|
289
|
-
and civil/probate metadata are posted to `/documents`.
|
|
290
|
-
|
|
291
|
-
### 7. Run isolated local functional tests
|
|
292
|
-
With `yarn start:aat` still running, execute the functional groups with separate
|
|
293
|
-
documents and separate reports:
|
|
294
|
-
|
|
295
|
-
```
|
|
296
|
-
yarn test:functional:local:isolated
|
|
297
|
-
```
|
|
298
|
-
|
|
299
|
-
By default this creates fresh documents, runs up to three feature files at a time,
|
|
300
|
-
and writes reports under `functional-output/local-isolated/`. Override with:
|
|
301
|
-
- `MV_LOCAL_PARALLEL_MAX_JOBS=1` to run the same isolated groups serially
|
|
302
|
-
- `MV_CREATE_LOCAL_AAT_DOCS=false` to reuse IDs from `.local-aat-documents.env`
|
|
303
|
-
- `E2E_PARALLEL_OUTPUT_ROOT=<path>` to change report location
|
|
304
|
-
|
|
305
|
-
Each feature writes its own report directory, including:
|
|
306
|
-
- `mv-e2e-result.html`
|
|
307
|
-
- `mv-e2e-result.json`
|
|
308
|
-
- `result.xml`
|
|
309
|
-
|
|
310
|
-
The validated local AAT sequence is:
|
|
311
|
-
|
|
312
|
-
```
|
|
313
|
-
yarn check:aat-config
|
|
314
|
-
yarn start:aat
|
|
315
|
-
yarn smoke:local:aat
|
|
316
|
-
yarn test:local:aat
|
|
317
|
-
yarn test:functional:local:isolated
|
|
318
292
|
```
|
|
319
|
-
|
|
320
|
-
Expected `test:functional:local:isolated` feature groups:
|
|
321
|
-
- `redact`
|
|
322
|
-
- `imageViewerAnnotationsAndComments`
|
|
323
|
-
|
|
324
|
-
For the strongest isolation proof, make each scenario upload and use its own document:
|
|
325
|
-
|
|
293
|
+
PLAYWRIGHT_INCLUDE_KNOWN_DEFECTS=true yarn test:playwright:functional -- --grep @defect-EXUI-5124
|
|
326
294
|
```
|
|
327
|
-
yarn test:functional:local:self-contained
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
This is slower because it creates a fresh AAT DM Store document for each scenario, but
|
|
331
|
-
it is the best local check when diagnosing interference between bookmarks,
|
|
332
|
-
annotations, comments, and redactions.
|
|
333
295
|
|
|
334
296
|
### Useful overrides
|
|
335
297
|
Most developers should use the defaults from `.env.example`. Override only when you are deliberately testing a different endpoint or registered client setting.
|
package/package.json
CHANGED
package/package.tgz
CHANGED
|
Binary file
|