@hmcts/media-viewer 4.2.26-nodejs-healthcheck-update → 4.2.26-nodejs-healthcheck-update-01
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/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/README.md
CHANGED
|
@@ -81,6 +81,15 @@ This command:
|
|
|
81
81
|
- starts the local API on `PORT` or `1337`
|
|
82
82
|
- starts Angular with `proxy.config.js`
|
|
83
83
|
|
|
84
|
+
When Angular is already running and only the local API needs restarting, use:
|
|
85
|
+
|
|
86
|
+
```
|
|
87
|
+
yarn start:api:aat
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Do not use `yarn start:api` directly for an AAT-backed run. It deliberately has no
|
|
91
|
+
environment bootstrap and will otherwise target the non-AAT local proxy defaults.
|
|
92
|
+
|
|
84
93
|
Open:
|
|
85
94
|
|
|
86
95
|
```
|
|
@@ -123,6 +132,12 @@ Current Playwright lanes:
|
|
|
123
132
|
| Lane | Config/project | Command | Scope |
|
|
124
133
|
| --- | --- | --- | --- |
|
|
125
134
|
| Standalone smoke | `playwright.config.ts`, project `smoke` | `yarn test:playwright:smoke` or `yarn test:smoke` | Opens the standalone Media Viewer demo, loads `assets/example.pdf`, and verifies the PDF viewer, page-number control and first rendered page. |
|
|
135
|
+
| 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. |
|
|
136
|
+
|
|
137
|
+
The Playwright config runs tests fully in parallel with seven workers. Each test
|
|
138
|
+
gets its own browser context and page-scoped route mocks. Tests must not depend
|
|
139
|
+
on execution order or share mutable documents; mutation-heavy AAT journeys must
|
|
140
|
+
provision a document per test or reset it before reuse.
|
|
126
141
|
|
|
127
142
|
Install Chromium once before local runs when the browser cache is empty:
|
|
128
143
|
|
|
@@ -148,20 +163,28 @@ Override the smoke document and case id with `MV_SMOKE_PDF_DOCUMENT_URL` and
|
|
|
148
163
|
CNP uses the same smoke entrypoint style as MC/MO. The previous CodeceptJS smoke
|
|
149
164
|
remains available as `yarn test:smoke:legacy` while migration work continues.
|
|
150
165
|
|
|
151
|
-
|
|
166
|
+
The lane wrapper commands write Playwright evidence under `functional-output/tests`:
|
|
152
167
|
|
|
153
168
|
| Lane | Odhín | HTML | JUnit | Trace, screenshot and video output |
|
|
154
169
|
| --- | --- | --- | --- | --- |
|
|
170
|
+
| Viewer support | `functional-output/tests/playwright-support/odhin-report/xui-playwright-support.html` | `functional-output/tests/playwright-support/html-report/index.html` | `functional-output/tests/playwright-support/playwright-support-junit.xml` | `functional-output/tests/playwright-support/test-results` |
|
|
155
171
|
| Smoke | `functional-output/tests/playwright-smoke/odhin-report/xui-playwright-smoke.html` | `functional-output/tests/playwright-smoke/html-report/index.html` | `functional-output/tests/playwright-smoke/playwright-smoke-junit.xml` | `functional-output/tests/playwright-smoke/test-results` |
|
|
156
172
|
|
|
157
|
-
Those are the default
|
|
158
|
-
evidence separate under `functional-output/tests/playwright-
|
|
159
|
-
`functional-output/tests/playwright-
|
|
160
|
-
|
|
173
|
+
Those are the default lane-specific paths. CNP keeps preview and AAT viewer
|
|
174
|
+
support evidence separate under `functional-output/tests/playwright-support/preview`
|
|
175
|
+
and `functional-output/tests/playwright-support/aat`. Smoke evidence remains under
|
|
176
|
+
`functional-output/tests/playwright-smoke/preview` and
|
|
177
|
+
`functional-output/tests/playwright-smoke/aat`.
|
|
178
|
+
|
|
179
|
+
The raw aggregate `npx playwright test --config=playwright.config.ts` command
|
|
180
|
+
uses `functional-output/tests/playwright` unless the report paths are overridden.
|
|
161
181
|
|
|
162
182
|
Reporting behavior follows the MC/MO pattern:
|
|
163
183
|
|
|
164
184
|
- Odhín is produced through the patched `odhin-reports-playwright` reporter.
|
|
185
|
+
- Each successfully generated Odhín report uses a stable suite title and includes the application
|
|
186
|
+
version, branch, target environment, CI or local context, worker count, CPU
|
|
187
|
+
count and total RAM in its run information.
|
|
165
188
|
- CI logs Odhín finalisation progress using the same progress reporter as MC/MO.
|
|
166
189
|
- HTML, JUnit and Odhín reporters can run together.
|
|
167
190
|
- Traces, screenshots and videos are kept on failure for diagnostics.
|
|
@@ -169,6 +192,10 @@ Reporting behavior follows the MC/MO pattern:
|
|
|
169
192
|
local setup step has already installed Chromium.
|
|
170
193
|
- Jenkins CNP and nightly pipelines publish the Odhín HTML reports, publish
|
|
171
194
|
JUnit XML, and archive the full Playwright output folders.
|
|
195
|
+
- The classic Jenkins build page exposes viewer-support reports as `PREVIEW
|
|
196
|
+
Playwright Viewer Support Test`, `AAT Playwright Viewer Support Test`, or
|
|
197
|
+
`Nightly Playwright Viewer Support Test`. Blue Ocean does not reliably show
|
|
198
|
+
HTML Publisher links.
|
|
172
199
|
|
|
173
200
|
The Jenkins `YarnBuilder` performs its immutable dependency install before the
|
|
174
201
|
first setup task. The pipeline then installs Puppeteer Chrome once for legacy
|
|
@@ -184,7 +211,13 @@ Useful overrides:
|
|
|
184
211
|
- `PLAYWRIGHT_REPORT_FOLDER`: Odhín report folder
|
|
185
212
|
- `PLAYWRIGHT_REPORT_INDEX_FILENAME`: Odhín report file name
|
|
186
213
|
- `PLAYWRIGHT_REPORT_TITLE`: Odhín report title
|
|
214
|
+
- `PLAYWRIGHT_REPORT_PROJECT`: Odhín project label
|
|
215
|
+
- `PLAYWRIGHT_REPORT_RELEASE`: Odhín release label, default `<version> | branch=<branch>`
|
|
216
|
+
- `PLAYWRIGHT_REPORT_BRANCH`: branch override used by the default release label
|
|
217
|
+
- `PLAYWRIGHT_REPORT_TEST_ENVIRONMENT` or `PW_ODHIN_ENV`: complete Odhín test-environment label override
|
|
218
|
+
- `TEST_TYPE`: target-environment label, otherwise inferred from the test URL
|
|
187
219
|
- `PLAYWRIGHT_TEST_OUTPUT_DIR`: traces, screenshots and videos folder
|
|
220
|
+
- `FUNCTIONAL_TESTS_WORKERS`: worker-count override from `1` to `64`, default `7`
|
|
188
221
|
- `PLAYWRIGHT_SKIP_INSTALL=true`: skip the automatic Chromium install in Playwright scripts
|
|
189
222
|
|
|
190
223
|
Use this local proof set before pushing Playwright documentation or pipeline
|
|
@@ -194,6 +227,7 @@ changes:
|
|
|
194
227
|
yarn install --immutable
|
|
195
228
|
yarn test:setup:playwright-install-chromium
|
|
196
229
|
PLAYWRIGHT_SKIP_INSTALL=true yarn test:playwright:smoke:list
|
|
230
|
+
PLAYWRIGHT_SKIP_INSTALL=true npx playwright test --config=playwright.config.ts
|
|
197
231
|
```
|
|
198
232
|
|
|
199
233
|
For a smoke behavior proof, start the app in one terminal:
|
|
@@ -222,7 +256,7 @@ Migration boundaries:
|
|
|
222
256
|
signal.
|
|
223
257
|
|
|
224
258
|
### 6. Create isolated AAT test documents
|
|
225
|
-
For mutation-heavy functional tests, do not share one document across parallel
|
|
259
|
+
For mutation-heavy functional tests, do not share one document across parallel tests.
|
|
226
260
|
Create fresh AAT DM Store documents through the local API proxy while `yarn start:aat`
|
|
227
261
|
is running:
|
|
228
262
|
|
package/package.json
CHANGED
package/package.tgz
CHANGED
|
Binary file
|