@ministryofjustice/hmpps-digital-prison-reporting-frontend 5.2.3 → 5.3.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/README.md +26 -3
- package/_networkMocks/dashboard/data/empty-data/data.d.ts +30 -0
- package/_networkMocks/dashboard/data/empty-data/mocks.d.ts +68 -0
- package/_networkMocks/dashboard/data/partial-data/data-historic.d.ts +39 -0
- package/_networkMocks/dashboard/definitions/visualisations/complete-dataset/line/definition.d.ts +2 -0
- package/_networkMocks/dashboard/definitions/visualisations/complete-dataset/line/vis-definitions/cols-as-labels.d.ts +6 -0
- package/_networkMocks/dashboard/definitions/visualisations/complete-dataset/list/definition-invalid-vis-defs.d.ts +2 -0
- package/_networkMocks/dashboard/definitions/visualisations/complete-dataset/list/definition-invalid.d.ts +2 -0
- package/_networkMocks/dashboard/definitions/visualisations/complete-dataset/list/vis-definitions/invalid.d.ts +2 -0
- package/_networkMocks/dashboard/definitions/visualisations/complete-dataset/mixed/definition.d.ts +2 -0
- package/_networkMocks/dashboard/definitions/visualisations/mocks.d.ts +119 -0
- package/_networkMocks/dashboard/definitions/visualisations/partial-dataset/bar/definition-invalid.d.ts +2 -0
- package/_networkMocks/dashboard/definitions/visualisations/partial-dataset/bar/vis-definitions/invalid.d.ts +3 -0
- package/_networkMocks/dashboard/definitions/visualisations/partial-dataset/mixed/definition.d.ts +2 -0
- package/_networkMocks/dashboard/definitions/visualisations/partial-dataset/mixed-historic/definition.d.ts +2 -0
- package/_networkMocks/report/mocks.d.ts +15 -0
- package/all.js +2 -0
- package/all.js.map +1 -1
- package/cjs/dpr/components/_charts/chart/Chart.js +14 -18
- package/cjs/dpr/components/_charts/chart/Chart.js.map +1 -1
- package/cjs/dpr/components/_charts/chart/ChartColours.js +10 -2
- package/cjs/dpr/components/_charts/chart/ChartColours.js.map +1 -1
- package/cjs/dpr/components/_charts/chart/ChartLabels.js +49 -0
- package/cjs/dpr/components/_charts/chart/ChartLabels.js.map +1 -0
- package/cjs/dpr/components/_charts/chart/ChartTimeseries.js +10 -5
- package/cjs/dpr/components/_charts/chart/ChartTimeseries.js.map +1 -1
- package/cjs/dpr/components/_charts/chart/bar/BarChart.js +29 -38
- package/cjs/dpr/components/_charts/chart/bar/BarChart.js.map +1 -1
- package/cjs/dpr/components/_charts/chart/doughnut/DoughnutChart.js +3 -3
- package/cjs/dpr/components/_charts/chart/doughnut/DoughnutChart.js.map +1 -1
- package/cjs/dpr/components/_charts/chart/doughnut/validate.js +3 -1
- package/cjs/dpr/components/_charts/chart/doughnut/validate.js.map +1 -1
- package/cjs/dpr/components/_charts/chart/line/LineChart.js +1 -2
- package/cjs/dpr/components/_charts/chart/line/LineChart.js.map +1 -1
- package/cjs/dpr/components/_charts/chart/line-timeseries/LineTimeseriesChart.js +2 -3
- package/cjs/dpr/components/_charts/chart/line-timeseries/LineTimeseriesChart.js.map +1 -1
- package/cjs/dpr/components/_dashboards/dashboard-list/utils.js +16 -2
- package/cjs/dpr/components/_dashboards/dashboard-list/utils.js.map +1 -1
- package/cjs/dpr/components/_dashboards/dashboard-list/validate.js +22 -0
- package/cjs/dpr/components/_dashboards/dashboard-list/validate.js.map +1 -0
- package/cjs/dpr/components/_dashboards/dashboard-visualisation/Validate.js +11 -4
- package/cjs/dpr/components/_dashboards/dashboard-visualisation/Validate.js.map +1 -1
- package/cjs/dpr/components/_dashboards/dashboard-visualisation/types.js.map +1 -1
- package/cjs/dpr/components/_dashboards/dashboard-visualisation/utils.js +74 -0
- package/cjs/dpr/components/_dashboards/dashboard-visualisation/utils.js.map +1 -0
- package/cjs/dpr/components/_dashboards/scorecard/validate.js +2 -2
- package/cjs/dpr/components/_dashboards/scorecard/validate.js.map +1 -1
- package/cjs/dpr/components/_dashboards/scorecard-group/validate.js +2 -2
- package/cjs/dpr/components/_dashboards/scorecard-group/validate.js.map +1 -1
- package/cjs/dpr/data/reportingClient.js +8 -0
- package/cjs/dpr/data/reportingClient.js.map +1 -1
- package/cjs/dpr/routes/journeys/download-report/utils.js +22 -106
- package/cjs/dpr/routes/journeys/download-report/utils.js.map +1 -1
- package/cjs/dpr/routes/journeys/request-report/controller.js +1 -1
- package/cjs/dpr/routes/journeys/request-report/controller.js.map +1 -1
- package/cjs/dpr/routes/journeys/request-report/filters/controller.js +1 -1
- package/cjs/dpr/routes/journeys/request-report/filters/controller.js.map +1 -1
- package/cjs/dpr/routes/journeys/request-report/status/controller.js +1 -1
- package/cjs/dpr/routes/journeys/request-report/status/controller.js.map +1 -1
- package/cjs/dpr/routes/journeys/view-report/async/controller.js +1 -1
- package/cjs/dpr/routes/journeys/view-report/async/controller.js.map +1 -1
- package/cjs/dpr/routes/journeys/view-report/async/dashboard/controller.js +1 -1
- package/cjs/dpr/routes/journeys/view-report/async/dashboard/controller.js.map +1 -1
- package/cjs/dpr/routes/journeys/view-report/async/dashboard/utils.js +14 -6
- package/cjs/dpr/routes/journeys/view-report/async/dashboard/utils.js.map +1 -1
- package/cjs/dpr/routes/journeys/view-report/async/dashboard/validate.js +26 -0
- package/cjs/dpr/routes/journeys/view-report/async/dashboard/validate.js.map +1 -0
- package/cjs/dpr/routes/journeys/view-report/async/report/controller.js +1 -1
- package/cjs/dpr/routes/journeys/view-report/async/report/controller.js.map +1 -1
- package/cjs/dpr/routes/journeys/view-report/controller.js +1 -1
- package/cjs/dpr/routes/journeys/view-report/controller.js.map +1 -1
- package/cjs/dpr/routes/journeys/view-report/sync/dashboard/controller.js +1 -1
- package/cjs/dpr/routes/journeys/view-report/sync/dashboard/controller.js.map +1 -1
- package/cjs/dpr/routes/journeys/view-report/sync/report/controller.js +1 -1
- package/cjs/dpr/routes/journeys/view-report/sync/report/controller.js.map +1 -1
- package/cjs/dpr/services/reportingService.js +3 -0
- package/cjs/dpr/services/reportingService.js.map +1 -1
- package/cjs/dpr/utils/ErrorHandler/AggregatedValidationError.js +15 -0
- package/cjs/dpr/utils/ErrorHandler/AggregatedValidationError.js.map +1 -0
- package/cjs/dpr/utils/{ErrorHandler.js → ErrorHandler/ErrorHandler.js} +34 -12
- package/cjs/dpr/utils/ErrorHandler/ErrorHandler.js.map +1 -0
- package/cjs/dpr/utils/requestStatusHelper.js +1 -1
- package/cjs/dpr/utils/requestStatusHelper.js.map +1 -1
- package/cypress-tests/mockApis/dashboards.d.ts +15 -0
- package/cypress-tests/mockApis/reporting.d.ts +1 -0
- package/dpr/all.scss +0 -83
- package/dpr/components/_charts/chart/Chart.js +15 -19
- package/dpr/components/_charts/chart/Chart.js.map +1 -1
- package/dpr/components/_charts/chart/ChartColours.js +10 -2
- package/dpr/components/_charts/chart/ChartColours.js.map +1 -1
- package/dpr/components/_charts/chart/ChartLabels.js +47 -0
- package/dpr/components/_charts/chart/ChartLabels.js.map +1 -0
- package/dpr/components/_charts/chart/ChartTimeseries.js +11 -6
- package/dpr/components/_charts/chart/ChartTimeseries.js.map +1 -1
- package/dpr/components/_charts/chart/bar/BarChart.js +29 -38
- package/dpr/components/_charts/chart/bar/BarChart.js.map +1 -1
- package/dpr/components/_charts/chart/doughnut/DoughnutChart.js +3 -3
- package/dpr/components/_charts/chart/doughnut/DoughnutChart.js.map +1 -1
- package/dpr/components/_charts/chart/doughnut/validate.js +3 -1
- package/dpr/components/_charts/chart/doughnut/validate.js.map +1 -1
- package/dpr/components/_charts/chart/line/LineChart.js +1 -2
- package/dpr/components/_charts/chart/line/LineChart.js.map +1 -1
- package/dpr/components/_charts/chart/line-timeseries/LineTimeseriesChart.js +2 -3
- package/dpr/components/_charts/chart/line-timeseries/LineTimeseriesChart.js.map +1 -1
- package/dpr/components/_charts/chart-details/view.njk +3 -3
- package/dpr/components/_dashboards/dashboard-list/utils.js +16 -2
- package/dpr/components/_dashboards/dashboard-list/utils.js.map +1 -1
- package/dpr/components/_dashboards/dashboard-list/validate.js +20 -0
- package/dpr/components/_dashboards/dashboard-list/validate.js.map +1 -0
- package/dpr/components/_dashboards/dashboard-visualisation/Validate.js +9 -5
- package/dpr/components/_dashboards/dashboard-visualisation/Validate.js.map +1 -1
- package/dpr/components/_dashboards/dashboard-visualisation/types.js.map +1 -1
- package/dpr/components/_dashboards/dashboard-visualisation/utils.js +72 -0
- package/dpr/components/_dashboards/dashboard-visualisation/utils.js.map +1 -0
- package/dpr/components/_dashboards/scorecard/Scorecard.js +2 -2
- package/dpr/components/_dashboards/scorecard/Scorecard.js.map +1 -1
- package/dpr/components/_dashboards/scorecard/validate.js +2 -2
- package/dpr/components/_dashboards/scorecard/validate.js.map +1 -1
- package/dpr/components/_dashboards/scorecard-group/ScorecardGroup.js +2 -2
- package/dpr/components/_dashboards/scorecard-group/ScorecardGroup.js.map +1 -1
- package/dpr/components/_dashboards/scorecard-group/validate.js +2 -2
- package/dpr/components/_dashboards/scorecard-group/validate.js.map +1 -1
- package/dpr/components/_reports/report-page/report-template/report-section/report-data-table/view.njk +2 -1
- package/dpr/components/error-summary/view.njk +9 -2
- package/dpr/data/reportingClient.d.ts +1 -0
- package/dpr/data/reportingClient.js +8 -0
- package/dpr/data/reportingClient.js.map +1 -1
- package/dpr/routes/journeys/download-report/utils.js +23 -106
- package/dpr/routes/journeys/download-report/utils.js.map +1 -1
- package/dpr/routes/journeys/request-report/controller.js +1 -1
- package/dpr/routes/journeys/request-report/controller.js.map +1 -1
- package/dpr/routes/journeys/request-report/filters/controller.js +1 -1
- package/dpr/routes/journeys/request-report/filters/controller.js.map +1 -1
- package/dpr/routes/journeys/request-report/status/controller.js +1 -1
- package/dpr/routes/journeys/request-report/status/controller.js.map +1 -1
- package/dpr/routes/journeys/view-report/async/controller.js +1 -1
- package/dpr/routes/journeys/view-report/async/controller.js.map +1 -1
- package/dpr/routes/journeys/view-report/async/dashboard/controller.js +1 -1
- package/dpr/routes/journeys/view-report/async/dashboard/controller.js.map +1 -1
- package/dpr/routes/journeys/view-report/async/dashboard/utils.js +9 -1
- package/dpr/routes/journeys/view-report/async/dashboard/utils.js.map +1 -1
- package/dpr/routes/journeys/view-report/async/dashboard/validate.js +24 -0
- package/dpr/routes/journeys/view-report/async/dashboard/validate.js.map +1 -0
- package/dpr/routes/journeys/view-report/async/report/controller.js +1 -1
- package/dpr/routes/journeys/view-report/async/report/controller.js.map +1 -1
- package/dpr/routes/journeys/view-report/controller.js +1 -1
- package/dpr/routes/journeys/view-report/controller.js.map +1 -1
- package/dpr/routes/journeys/view-report/sync/dashboard/controller.js +1 -1
- package/dpr/routes/journeys/view-report/sync/dashboard/controller.js.map +1 -1
- package/dpr/routes/journeys/view-report/sync/report/controller.js +1 -1
- package/dpr/routes/journeys/view-report/sync/report/controller.js.map +1 -1
- package/dpr/services/reportingService.d.ts +1 -0
- package/dpr/services/reportingService.js +3 -0
- package/dpr/services/reportingService.js.map +1 -1
- package/dpr/utils/ErrorHandler/AggregatedValidationError.js +13 -0
- package/dpr/utils/ErrorHandler/AggregatedValidationError.js.map +1 -0
- package/dpr/utils/{ErrorHandler.js → ErrorHandler/ErrorHandler.js} +34 -12
- package/dpr/utils/ErrorHandler/ErrorHandler.js.map +1 -0
- package/dpr/utils/requestStatusHelper.js +1 -1
- package/dpr/utils/requestStatusHelper.js.map +1 -1
- package/package.json +1 -2
- package/playwright.config.d.ts +9 -0
- package/src/dpr/components/_charts/chart/Chart.d.ts +6 -3
- package/src/dpr/components/_charts/chart/ChartColours.d.ts +5 -1
- package/src/dpr/components/_charts/chart/ChartLabels.d.ts +26 -0
- package/src/dpr/components/_charts/chart/ChartTimeseries.d.ts +5 -1
- package/src/dpr/components/_charts/chart/bar/BarChart.d.ts +13 -2
- package/src/dpr/components/_charts/chart/bar/validate.d.ts +2 -2
- package/src/dpr/components/_charts/chart/bar-timeseries/validate.d.ts +2 -2
- package/src/dpr/components/_charts/chart/doughnut/validate.d.ts +2 -2
- package/src/dpr/components/_charts/chart/line/validate.d.ts +2 -2
- package/src/dpr/components/_charts/chart/line-timeseries/validate.d.ts +2 -2
- package/src/dpr/components/_dashboards/dashboard-list/validate.d.ts +7 -7
- package/src/dpr/components/_dashboards/dashboard-visualisation/Validate.d.ts +24 -16
- package/src/dpr/components/_dashboards/dashboard-visualisation/types.d.ts +2 -0
- package/src/dpr/components/_dashboards/dashboard-visualisation/utils.d.ts +2 -0
- package/src/dpr/components/_dashboards/scorecard-group/validate.d.ts +2 -2
- package/src/dpr/components/_dashboards/visual-regression-tests/line-timeseries-chart-complete-dataset.spec.d.ts +1 -0
- package/src/dpr/components/_dashboards/visual-regression-tests/line-timeseries-chart-partial-dataset.spec.d.ts +1 -0
- package/src/dpr/components/_dashboards/visual-regression-tests/mixed-charts-complete-dataset.spec.d.ts +1 -0
- package/src/dpr/components/_dashboards/visual-regression-tests/mixed-charts-partial-dataset.spec.d.ts +1 -0
- package/src/dpr/components/_dashboards/visual-regression-tests/mixed-charts-partial-historic-dataset.spec.d.ts +1 -0
- package/src/dpr/data/reportingClient.d.ts +1 -0
- package/src/dpr/routes/journeys/download-report/async-tests.cy.d.ts +1 -0
- package/src/dpr/routes/journeys/download-report/sync-tests.cy.d.ts +1 -0
- package/src/dpr/routes/journeys/download-report/utils.d.ts +0 -5
- package/src/dpr/routes/journeys/view-report/async/dashboard/utils.d.ts +4 -4
- package/src/dpr/routes/journeys/view-report/async/dashboard/validate.d.ts +122 -0
- package/src/dpr/routes/journeys/view-report/async/report/utils.d.ts +2 -2
- package/src/dpr/routes/journeys/view-report/sync/dashboard/utils.d.ts +4 -4
- package/src/dpr/routes/journeys/view-report/sync/report/utils.d.ts +4 -4
- package/src/dpr/services/reportingService.d.ts +1 -0
- package/src/dpr/utils/ErrorHandler/AggregatedValidationError.d.ts +11 -0
- package/src/dpr/utils/{ErrorHandler.d.ts → ErrorHandler/ErrorHandler.d.ts} +4 -4
- package/src/dpr/utils/localsHelper.d.ts +38 -24
- package/test-app/routes/components/dashboards/charts/bar/tests.cy.d.ts +1 -0
- package/test-app/routes/components/dashboards/charts/line/tests.cy.d.ts +1 -0
- package/test-app/routes/components/dashboards/charts/line/timeseries-tests.cy.d.ts +1 -0
- package/test-app/routes/components/dashboards/charts/pie/tests.cy.d.ts +1 -0
- package/test-app/routes/components/dashboards/mixed/tests.cy.d.ts +1 -0
- package/cjs/dpr/utils/ErrorHandler.js.map +0 -1
- package/dpr/components/report-list/list.njk +0 -6
- package/dpr/components/report-list/view.njk +0 -7
- package/dpr/utils/ErrorHandler.js.map +0 -1
- package/src/dpr/components/report-list/defaultTokenProvider.d.ts +0 -3
- package/src/dpr/components/report-list/utils.d.ts +0 -14
- package/test-app/mocks/mockClients/store/mockRequestedDashboardData.d.ts +0 -255
- package/test-app/mocks/mockClients/store/mockViewedUserListData.d.ts +0 -348
- package/test-app/mocks/mockSyncData/mockRenderData.d.ts +0 -464
- package/test-app/routes/embedded/sync-report/controller.d.ts +0 -5
- package/test-app/routes/embedded/sync-report/fail/controller.d.ts +0 -4
- package/test-app/routes/embedded/sync-report/fail/routes.d.ts +0 -2
- package/test-app/routes/embedded/sync-report/handler/controller.d.ts +0 -4
- package/test-app/routes/embedded/sync-report/handler/routes.d.ts +0 -2
- package/test-app/routes/embedded/sync-report/method/controller.d.ts +0 -4
- package/test-app/routes/embedded/sync-report/method/routes.d.ts +0 -2
- package/test-app/routes/embedded/sync-report/routes.d.ts +0 -2
- package/test-app/routes/embedded/sync-report/validation/controller.d.ts +0 -4
- package/test-app/routes/embedded/sync-report/validation/routes.d.ts +0 -2
- /package/src/dpr/components/{report-list/utils.test.d.ts → _dashboards/visual-regression-tests/bar-chart-complete-dataset.spec.d.ts} +0 -0
- /package/src/dpr/components/{user-reports/bookmarks/utils.test.d.ts → _dashboards/visual-regression-tests/bar-chart-partial-dataset.spec.d.ts} +0 -0
- /package/src/dpr/components/{user-reports/utils.test.d.ts → _dashboards/visual-regression-tests/doughnut-chart-complete-dataset.spec.d.ts} +0 -0
- /package/src/dpr/{routes/journeys/download-report/tests.cy.d.ts → components/_dashboards/visual-regression-tests/line-chart-complete-dataset.spec.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -21,12 +21,35 @@ Both tasks use the `package` directory.
|
|
|
21
21
|
|
|
22
22
|
## Test Application
|
|
23
23
|
|
|
24
|
-
To start the Test Application, run: `npm run start
|
|
24
|
+
To start the Test Application, run: `npm run start:dev:noMockClients` as well as `npm run wiremock` in a separate tab. This builds the NPM package and starts the server at http://localhost:3010.
|
|
25
25
|
|
|
26
26
|
The Test Application is used both for visually checking components, and also by the integration tests (run using Cypress).
|
|
27
27
|
|
|
28
|
-
##
|
|
29
|
-
To run the
|
|
28
|
+
## Running and testing local builds
|
|
29
|
+
To run the main suite of browser-based tests, start up the main app by running `npm run start:dev:noMockClients` then `npm run int-test` or `npm run int-test-ui` for getting the cypress UI up to choose individual tests to run.
|
|
30
|
+
|
|
31
|
+
There are also a few jest tests - you can run these plus the small docs tests by running `npm run test`.
|
|
32
|
+
|
|
33
|
+
We also have a small number of visual regression tests using Playwright that are **only** for our chart based pages - you can run these with `npm run int-test-visual` which will start up the server and mocks itself. Please ensure any other running server processes are stopped before running this!
|
|
34
|
+
|
|
35
|
+
### How to update and create new visual regression tests
|
|
36
|
+
There may ocassionally be the need to create new visual regression tests, again, only for our charting based pages. To do this, you should develop the test as normal, but use `npm run int-test-visual-ui` which will allow you to see what the test is doing in the UI. Once you have the test on the page you want to capture a screenshot of for comparison, use
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
await expect(page).toHaveScreenshot({
|
|
40
|
+
fullPage: true,
|
|
41
|
+
})
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
and then run your test. It will fail locally on this last step, which is expected, as you are not creating screenshots. These will be created by CI as screenshots on different OSes can have slightly different pixel values. You should push this branch and make a PR, which will set off the CI run, and if all is well, create the screenshots as an artifact of the CI run in GitHub Actions (but fail the run). You should create a folder based on the name of the file running the test - if the file is called `some-chart-test.spec.ts`, create a folder called `some-chart-test.spec.ts-screenshots/` and download the screenshots artifact and put the new screenshots in there. You should then double check these to ensure no sensitive data is being captured, then commit and push them up. This time, the CI run should use these screenshots and pass. If they do not, some common pitfalls include:
|
|
45
|
+
|
|
46
|
+
- Animations: Ideally set or disable animations so the snapshot isn't capturing charts, CSS animations etc half way through loading.
|
|
47
|
+
- Noise: Things like "Last Updated" timestamps can be very annoying and will break the test every time the clock ticks. You should mask those bits out so Playwright ignores them.
|
|
48
|
+
- As a last resort, look at having some **small** pixel tolerances - no more than 1 or 2% - on the `toHaveScreenshot` call - use `maxDiffPixelRatio` which has a range from 0-1, so no more than 0.01-0.02 here.
|
|
49
|
+
|
|
50
|
+
### Running the app in dev mode
|
|
51
|
+
|
|
52
|
+
To run the app in dev mode, use `start:dev:noMockClients` for the test app, and `docs:local` for the docs. To run the production build of docs, you should run `npm run docs`, then you'll need to configure a reverse proxy - nginx is the easiest. Install it through homebrew `brew install nginx`, then ensure it's running by running `brew services start nginx`. then run `sudo nginx -t` and you should see it's got a default config at `/opt/homebrew/etc/nginx/nginx.conf` - if it isn't there, just use whatever path it gives back, then add a new file into `/opt/homebrew/etc/nginx/servers/dev.conf` with this content:
|
|
30
53
|
|
|
31
54
|
```
|
|
32
55
|
server {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const undefinedDashboardData: {
|
|
2
|
+
tables: undefined;
|
|
3
|
+
};
|
|
4
|
+
export declare const emptyDashboardData: never[];
|
|
5
|
+
export declare const missingFirstRowDashboardData: ({
|
|
6
|
+
ts: {
|
|
7
|
+
raw: string;
|
|
8
|
+
};
|
|
9
|
+
establishment_id: {
|
|
10
|
+
raw: string;
|
|
11
|
+
};
|
|
12
|
+
has_metric_one: {
|
|
13
|
+
raw: number;
|
|
14
|
+
};
|
|
15
|
+
metric_one_is_missing: {
|
|
16
|
+
raw: number;
|
|
17
|
+
};
|
|
18
|
+
has_metric_two: {
|
|
19
|
+
raw: number;
|
|
20
|
+
};
|
|
21
|
+
metric_two_is_missing: {
|
|
22
|
+
raw: number;
|
|
23
|
+
};
|
|
24
|
+
has_metric_three: {
|
|
25
|
+
raw: number;
|
|
26
|
+
};
|
|
27
|
+
metric_three_is_missing: {
|
|
28
|
+
raw: number;
|
|
29
|
+
};
|
|
30
|
+
}[] | undefined)[];
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export declare const dashboardResultUndefinedMock: {
|
|
2
|
+
priority: number;
|
|
3
|
+
request: {
|
|
4
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
5
|
+
queryParameters?: object | undefined;
|
|
6
|
+
bodyPatterns?: Array<object> | undefined;
|
|
7
|
+
urlPathPattern: string;
|
|
8
|
+
};
|
|
9
|
+
response: {
|
|
10
|
+
status: number;
|
|
11
|
+
headers: {
|
|
12
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
13
|
+
};
|
|
14
|
+
jsonBody: object;
|
|
15
|
+
fixedDelayMilliseconds: number;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export declare const dashboardResultEmptyDataSyncMock: {
|
|
19
|
+
priority: number;
|
|
20
|
+
request: {
|
|
21
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
22
|
+
queryParameters?: object | undefined;
|
|
23
|
+
bodyPatterns?: Array<object> | undefined;
|
|
24
|
+
urlPathPattern: string;
|
|
25
|
+
};
|
|
26
|
+
response: {
|
|
27
|
+
status: number;
|
|
28
|
+
headers: {
|
|
29
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
30
|
+
};
|
|
31
|
+
jsonBody: object;
|
|
32
|
+
fixedDelayMilliseconds: number;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare const dashboardResultMissingFirstRowDataSyncMock: {
|
|
36
|
+
priority: number;
|
|
37
|
+
request: {
|
|
38
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
39
|
+
queryParameters?: object | undefined;
|
|
40
|
+
bodyPatterns?: Array<object> | undefined;
|
|
41
|
+
urlPathPattern: string;
|
|
42
|
+
};
|
|
43
|
+
response: {
|
|
44
|
+
status: number;
|
|
45
|
+
headers: {
|
|
46
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
47
|
+
};
|
|
48
|
+
jsonBody: object;
|
|
49
|
+
fixedDelayMilliseconds: number;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export declare const mocks: {
|
|
53
|
+
priority: number;
|
|
54
|
+
request: {
|
|
55
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
56
|
+
queryParameters?: object | undefined;
|
|
57
|
+
bodyPatterns?: Array<object> | undefined;
|
|
58
|
+
urlPathPattern: string;
|
|
59
|
+
};
|
|
60
|
+
response: {
|
|
61
|
+
status: number;
|
|
62
|
+
headers: {
|
|
63
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
64
|
+
};
|
|
65
|
+
jsonBody: object;
|
|
66
|
+
fixedDelayMilliseconds: number;
|
|
67
|
+
};
|
|
68
|
+
}[];
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export declare const historicPartialData: ({
|
|
2
|
+
ts: {
|
|
3
|
+
raw: string;
|
|
4
|
+
};
|
|
5
|
+
establishment_id: {
|
|
6
|
+
raw: string;
|
|
7
|
+
};
|
|
8
|
+
wing: {
|
|
9
|
+
raw: string;
|
|
10
|
+
};
|
|
11
|
+
cell: {
|
|
12
|
+
raw: string;
|
|
13
|
+
};
|
|
14
|
+
diet: {
|
|
15
|
+
raw: string;
|
|
16
|
+
};
|
|
17
|
+
count: {
|
|
18
|
+
raw: number;
|
|
19
|
+
};
|
|
20
|
+
} | {
|
|
21
|
+
ts: {
|
|
22
|
+
raw: string;
|
|
23
|
+
};
|
|
24
|
+
establishment_id: {
|
|
25
|
+
raw: string;
|
|
26
|
+
};
|
|
27
|
+
wing: {
|
|
28
|
+
raw: string;
|
|
29
|
+
};
|
|
30
|
+
cell: {
|
|
31
|
+
raw: string;
|
|
32
|
+
};
|
|
33
|
+
diet: {
|
|
34
|
+
raw: string;
|
|
35
|
+
};
|
|
36
|
+
count: {
|
|
37
|
+
raw: string;
|
|
38
|
+
};
|
|
39
|
+
})[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { components } from '../../../../../../../src/dpr/types/api';
|
|
2
|
+
export declare const dataQualityMetricOneLine: components['schemas']['DashboardVisualisationDefinition'];
|
|
3
|
+
export declare const dataQualityMetricThreeLine: components['schemas']['DashboardVisualisationDefinition'];
|
|
4
|
+
export declare const dataQualityMetricTwoLine: components['schemas']['DashboardVisualisationDefinition'];
|
|
5
|
+
export declare const dataQualityMetricOneMetricTwoLine: components['schemas']['DashboardVisualisationDefinition'];
|
|
6
|
+
export declare const dataQualityAllLine: components['schemas']['DashboardVisualisationDefinition'];
|
|
@@ -66,6 +66,40 @@ export declare const listPartialDatasetHistoricMock: {
|
|
|
66
66
|
fixedDelayMilliseconds: number;
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
|
+
export declare const listInvalidVisDefMock: {
|
|
70
|
+
priority: number;
|
|
71
|
+
request: {
|
|
72
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
73
|
+
queryParameters?: object | undefined;
|
|
74
|
+
bodyPatterns?: Array<object> | undefined;
|
|
75
|
+
urlPathPattern: string;
|
|
76
|
+
};
|
|
77
|
+
response: {
|
|
78
|
+
status: number;
|
|
79
|
+
headers: {
|
|
80
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
81
|
+
};
|
|
82
|
+
jsonBody: object;
|
|
83
|
+
fixedDelayMilliseconds: number;
|
|
84
|
+
};
|
|
85
|
+
};
|
|
86
|
+
export declare const listInvalidDefMock: {
|
|
87
|
+
priority: number;
|
|
88
|
+
request: {
|
|
89
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
90
|
+
queryParameters?: object | undefined;
|
|
91
|
+
bodyPatterns?: Array<object> | undefined;
|
|
92
|
+
urlPathPattern: string;
|
|
93
|
+
};
|
|
94
|
+
response: {
|
|
95
|
+
status: number;
|
|
96
|
+
headers: {
|
|
97
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
98
|
+
};
|
|
99
|
+
jsonBody: object;
|
|
100
|
+
fixedDelayMilliseconds: number;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
69
103
|
export declare const scorecardsCompleteDatasetMock: {
|
|
70
104
|
priority: number;
|
|
71
105
|
request: {
|
|
@@ -168,6 +202,23 @@ export declare const barPartialDatasetMock: {
|
|
|
168
202
|
fixedDelayMilliseconds: number;
|
|
169
203
|
};
|
|
170
204
|
};
|
|
205
|
+
export declare const barInvalidMock: {
|
|
206
|
+
priority: number;
|
|
207
|
+
request: {
|
|
208
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
209
|
+
queryParameters?: object | undefined;
|
|
210
|
+
bodyPatterns?: Array<object> | undefined;
|
|
211
|
+
urlPathPattern: string;
|
|
212
|
+
};
|
|
213
|
+
response: {
|
|
214
|
+
status: number;
|
|
215
|
+
headers: {
|
|
216
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
217
|
+
};
|
|
218
|
+
jsonBody: object;
|
|
219
|
+
fixedDelayMilliseconds: number;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
171
222
|
export declare const doughnutCompleteDatasetMock: {
|
|
172
223
|
priority: number;
|
|
173
224
|
request: {
|
|
@@ -219,6 +270,74 @@ export declare const lineTimeseriesPartialDatasetMock: {
|
|
|
219
270
|
fixedDelayMilliseconds: number;
|
|
220
271
|
};
|
|
221
272
|
};
|
|
273
|
+
export declare const lineCompleteDatasetMock: {
|
|
274
|
+
priority: number;
|
|
275
|
+
request: {
|
|
276
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
277
|
+
queryParameters?: object | undefined;
|
|
278
|
+
bodyPatterns?: Array<object> | undefined;
|
|
279
|
+
urlPathPattern: string;
|
|
280
|
+
};
|
|
281
|
+
response: {
|
|
282
|
+
status: number;
|
|
283
|
+
headers: {
|
|
284
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
285
|
+
};
|
|
286
|
+
jsonBody: object;
|
|
287
|
+
fixedDelayMilliseconds: number;
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
export declare const mixedCompleteDatasetMock: {
|
|
291
|
+
priority: number;
|
|
292
|
+
request: {
|
|
293
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
294
|
+
queryParameters?: object | undefined;
|
|
295
|
+
bodyPatterns?: Array<object> | undefined;
|
|
296
|
+
urlPathPattern: string;
|
|
297
|
+
};
|
|
298
|
+
response: {
|
|
299
|
+
status: number;
|
|
300
|
+
headers: {
|
|
301
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
302
|
+
};
|
|
303
|
+
jsonBody: object;
|
|
304
|
+
fixedDelayMilliseconds: number;
|
|
305
|
+
};
|
|
306
|
+
};
|
|
307
|
+
export declare const mixedPartialDatasetMock: {
|
|
308
|
+
priority: number;
|
|
309
|
+
request: {
|
|
310
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
311
|
+
queryParameters?: object | undefined;
|
|
312
|
+
bodyPatterns?: Array<object> | undefined;
|
|
313
|
+
urlPathPattern: string;
|
|
314
|
+
};
|
|
315
|
+
response: {
|
|
316
|
+
status: number;
|
|
317
|
+
headers: {
|
|
318
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
319
|
+
};
|
|
320
|
+
jsonBody: object;
|
|
321
|
+
fixedDelayMilliseconds: number;
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
export declare const mixedPartialDatasetHistoricMock: {
|
|
325
|
+
priority: number;
|
|
326
|
+
request: {
|
|
327
|
+
method: "GET" | "POST" | "DELETE" | "PUT" | "OPTIONS";
|
|
328
|
+
queryParameters?: object | undefined;
|
|
329
|
+
bodyPatterns?: Array<object> | undefined;
|
|
330
|
+
urlPathPattern: string;
|
|
331
|
+
};
|
|
332
|
+
response: {
|
|
333
|
+
status: number;
|
|
334
|
+
headers: {
|
|
335
|
+
"Content-Type": "application/json;charset=UTF-8";
|
|
336
|
+
};
|
|
337
|
+
jsonBody: object;
|
|
338
|
+
fixedDelayMilliseconds: number;
|
|
339
|
+
};
|
|
340
|
+
};
|
|
222
341
|
export declare const mocks: {
|
|
223
342
|
priority: number;
|
|
224
343
|
request: {
|
|
@@ -99,6 +99,21 @@ export declare const getAsyncReportDownloadMock: {
|
|
|
99
99
|
body: string;
|
|
100
100
|
};
|
|
101
101
|
};
|
|
102
|
+
export declare const getSyncReportDownloadMock: {
|
|
103
|
+
priority: number;
|
|
104
|
+
request: {
|
|
105
|
+
method: string;
|
|
106
|
+
urlPathPattern: string;
|
|
107
|
+
};
|
|
108
|
+
response: {
|
|
109
|
+
status: number;
|
|
110
|
+
headers: {
|
|
111
|
+
'Content-Type': string;
|
|
112
|
+
'Content-Disposition': string;
|
|
113
|
+
};
|
|
114
|
+
body: string;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
102
117
|
export declare const reportsFinishedStatusMock: {
|
|
103
118
|
priority: number;
|
|
104
119
|
request: {
|
package/all.js
CHANGED
|
@@ -834,11 +834,13 @@ class DataTable extends DprClientClass {
|
|
|
834
834
|
// Headers
|
|
835
835
|
const header = this.table.createTHead();
|
|
836
836
|
const classificationHeaderRow = header.insertRow(0);
|
|
837
|
+
classificationHeaderRow.classList.add('print-header-footer');
|
|
837
838
|
const classificationHeaderCell = classificationHeaderRow.insertCell(0);
|
|
838
839
|
classificationHeaderCell.outerHTML = `<th class="govuk-table__header govuk-table__cell--content print-header-footer print-header-footer--header" colspan=${headLength}>${classificationContent}</th>`;
|
|
839
840
|
// Footers
|
|
840
841
|
const footer = this.table.createTFoot();
|
|
841
842
|
const classificationFooterRow = footer.insertRow(0);
|
|
843
|
+
classificationFooterRow.classList.add('print-header-footer');
|
|
842
844
|
const classificationFooterCell = classificationFooterRow.insertCell(0);
|
|
843
845
|
classificationFooterCell.outerHTML = `<td class="govuk-table__cell govuk-table__cell--content print-header-footer table-row--no-border print-header-footer--footer" colspan=${headLength}>${classificationContent}</td>`;
|
|
844
846
|
}
|