@ministryofjustice/hmpps-digital-prison-reporting-frontend 4.28.8 → 4.29.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/dpr/all.js +6 -8
- package/dpr/all.js.map +3 -3
- package/dpr/all.scss +296 -414
- package/dpr/all.ts +6 -11
- package/dpr/components/_catalogue/catalogue-list/utils.test.ts +1 -1
- package/dpr/components/_charts/chart/clientClass.js +1 -0
- package/dpr/components/_charts/chart/clientClass.js.map +2 -2
- package/dpr/components/_charts/chart/clientClass.ts +1 -0
- package/dpr/components/_reports/{report-actions → report-heading/report-actions}/actionsTemplate.js.map +1 -1
- package/dpr/components/_reports/{report-actions → report-heading/report-actions}/clientClass.js +1 -1
- package/dpr/components/_reports/report-heading/report-actions/clientClass.js.map +7 -0
- package/dpr/components/_reports/{report-actions → report-heading/report-actions}/clientClass.ts +1 -1
- package/dpr/components/_reports/report-heading/report-actions/types.d.js.map +7 -0
- package/dpr/components/_reports/{report-actions → report-heading/report-actions}/types.d.ts +1 -1
- package/dpr/components/_reports/{report-actions → report-heading/report-actions}/utils.js.map +1 -1
- package/dpr/components/_reports/{report-actions → report-heading/report-actions}/utils.test.ts +2 -2
- package/dpr/components/_reports/{report-columns-form → report-heading/report-columns/report-columns-form}/clientClass.js +1 -3
- package/dpr/components/_reports/report-heading/report-columns/report-columns-form/clientClass.js.map +7 -0
- package/dpr/components/_reports/{report-columns-form → report-heading/report-columns/report-columns-form}/clientClass.ts +1 -3
- package/dpr/components/_reports/{report-columns-form → report-heading/report-columns/report-columns-form}/types.d.js.map +1 -1
- package/dpr/components/_reports/{report-columns-form → report-heading/report-columns/report-columns-form}/utils.js +1 -1
- package/dpr/components/_reports/report-heading/report-columns/report-columns-form/utils.js.map +7 -0
- package/dpr/components/_reports/{report-columns-form → report-heading/report-columns/report-columns-form}/utils.ts +2 -2
- package/dpr/components/_reports/{report-columns → report-heading/report-columns}/view.njk +1 -1
- package/dpr/components/_reports/{report-download-message → report-heading/report-download-message}/clientClass.js +1 -1
- package/dpr/components/_reports/report-heading/report-download-message/clientClass.js.map +7 -0
- package/dpr/components/_reports/{report-download-message → report-heading/report-download-message}/clientClass.ts +1 -1
- package/dpr/components/_reports/{report-filters → report-heading/report-filters}/view.njk +1 -1
- package/dpr/components/_reports/report-heading/view.njk +4 -4
- package/dpr/components/_reports/report-page/report-print-message/view.njk +10 -0
- package/dpr/components/_reports/report-page/report-template/report-no-data-message/styles.scss +8 -0
- package/dpr/components/_reports/report-page/report-template/report-no-data-message/view.njk +11 -0
- package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/clientClass.js +1 -1
- package/dpr/components/_reports/report-page/report-template/report-pagination/clientClass.js.map +7 -0
- package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/clientClass.ts +1 -1
- package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/types.d.js.map +1 -1
- package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/utils.js.map +1 -1
- package/dpr/components/_reports/report-page/report-template/report-section/parent-child-template/styles.scss +88 -0
- package/dpr/components/_reports/report-page/report-template/report-section/parent-child-template/view.njk +29 -0
- package/dpr/components/_reports/{report-data-table → report-page/report-template/report-section/report-data-table}/clientClass.js +17 -10
- package/dpr/components/_reports/report-page/report-template/report-section/report-data-table/clientClass.js.map +7 -0
- package/dpr/components/_reports/{report-data-table → report-page/report-template/report-section/report-data-table}/clientClass.ts +20 -10
- package/dpr/components/_reports/{report-data-table → report-page/report-template/report-section/report-data-table}/style.scss +35 -185
- package/dpr/components/_reports/report-page/report-template/report-section/report-data-table/types.d.js.map +7 -0
- package/dpr/components/_reports/{report-data-table → report-page/report-template/report-section/report-data-table}/types.d.ts +2 -2
- package/dpr/components/_reports/report-page/report-template/report-section/report-data-table/view.njk +27 -0
- package/dpr/components/_reports/report-page/report-template/report-section/styles.scss +33 -0
- package/dpr/components/_reports/report-page/report-template/report-section/view.njk +58 -0
- package/dpr/components/_reports/{report-summary-table → report-page/report-template/report-summary-table}/styles.scss +21 -4
- package/dpr/components/_reports/{report-totals → report-page/report-template/report-totals}/utils.js.map +1 -1
- package/dpr/components/_reports/report-page/report-template/styles.scss +5 -0
- package/dpr/components/_reports/report-page/report-template/template-config.js +66 -0
- package/dpr/components/_reports/report-page/report-template/template-config.js.map +7 -0
- package/dpr/components/_reports/report-page/report-template/template-config.ts +45 -0
- package/dpr/components/_reports/report-page/report-template/utils.js +82 -0
- package/dpr/components/_reports/report-page/report-template/utils.js.map +7 -0
- package/dpr/components/_reports/report-page/report-template/utils.ts +100 -0
- package/dpr/components/_reports/report-page/report-template/view.njk +61 -0
- package/dpr/components/_reports/{report-wrapper → report-page}/styles.scss +7 -5
- package/dpr/components/_reports/report-page/view.njk +26 -0
- package/dpr/components/card-group/view.njk +0 -4
- package/dpr/components/report-list/utils.js +11 -3
- package/dpr/components/report-list/utils.js.map +2 -2
- package/dpr/components/report-list/utils.ts +11 -1
- package/dpr/components/report-list/view.njk +2 -2
- package/dpr/components/show-more/style.scss +3 -4
- package/dpr/data/reportingClient.js.map +2 -2
- package/dpr/data/reportingClient.ts +4 -4
- package/dpr/routes/journeys/view-report/async/dashboard/utils.js +1 -1
- package/dpr/routes/journeys/view-report/async/dashboard/utils.js.map +1 -1
- package/dpr/routes/journeys/view-report/async/dashboard/utils.ts +1 -1
- package/dpr/routes/journeys/view-report/async/report/controller.js.map +2 -2
- package/dpr/routes/journeys/view-report/async/report/controller.ts +0 -1
- package/dpr/routes/journeys/view-report/async/report/report-variants.cy.js +207 -56
- package/dpr/routes/journeys/view-report/async/report/report-variants.cy.js.map +2 -2
- package/dpr/routes/journeys/view-report/async/report/report-variants.cy.ts +333 -64
- package/dpr/routes/journeys/view-report/async/report/utils.js +9 -17
- package/dpr/routes/journeys/view-report/async/report/utils.js.map +3 -3
- package/dpr/routes/journeys/view-report/async/report/utils.ts +12 -22
- package/dpr/routes/journeys/view-report/report.njk +2 -2
- package/dpr/routes/journeys/view-report/sync/dashboard/utils.js +1 -1
- package/dpr/routes/journeys/view-report/sync/dashboard/utils.js.map +1 -1
- package/dpr/routes/journeys/view-report/sync/dashboard/utils.ts +1 -1
- package/dpr/routes/journeys/view-report/sync/report/utils.js +38 -11
- package/dpr/routes/journeys/view-report/sync/report/utils.js.map +3 -3
- package/dpr/routes/journeys/view-report/sync/report/utils.ts +39 -14
- package/dpr/routes/journeys/view-report/utils.js +1 -1
- package/dpr/routes/journeys/view-report/utils.js.map +1 -1
- package/dpr/routes/journeys/view-report/utils.ts +1 -1
- package/dpr/services/reportingService.js.map +2 -2
- package/dpr/services/reportingService.ts +2 -2
- package/dpr/types/ReportQuery.js +1 -1
- package/dpr/types/ReportQuery.js.map +1 -1
- package/dpr/types/ReportQuery.ts +1 -1
- package/dpr/types/UserReports.js.map +1 -1
- package/dpr/types/UserReports.ts +3 -3
- package/dpr/utils/TemplateBuilder/ParentChildDataBuilder/ParentChildDataBuilder.js +193 -0
- package/dpr/utils/TemplateBuilder/ParentChildDataBuilder/ParentChildDataBuilder.js.map +7 -0
- package/dpr/utils/TemplateBuilder/ParentChildDataBuilder/ParentChildDataBuilder.ts +203 -0
- package/dpr/utils/TemplateBuilder/ParentChildDataBuilder/types.d.js.map +7 -0
- package/dpr/utils/TemplateBuilder/ParentChildDataBuilder/types.d.ts +36 -0
- package/dpr/utils/TemplateBuilder/ReportBuilder/ReportBuilder.js +114 -0
- package/dpr/utils/TemplateBuilder/ReportBuilder/ReportBuilder.js.map +7 -0
- package/dpr/utils/TemplateBuilder/ReportBuilder/ReportBuilder.ts +117 -0
- package/dpr/utils/TemplateBuilder/ReportBuilder/types.d.js.map +7 -0
- package/dpr/utils/TemplateBuilder/ReportBuilder/types.d.ts +6 -0
- package/dpr/utils/TemplateBuilder/SectionedDataHelper/SectionedDataHelper.js +202 -0
- package/dpr/utils/TemplateBuilder/SectionedDataHelper/SectionedDataHelper.js.map +7 -0
- package/dpr/utils/TemplateBuilder/SectionedDataHelper/SectionedDataHelper.ts +246 -0
- package/dpr/utils/TemplateBuilder/SectionedDataHelper/types.js +17 -0
- package/dpr/utils/TemplateBuilder/SectionedDataHelper/types.js.map +7 -0
- package/dpr/utils/TemplateBuilder/SectionedDataHelper/types.ts +41 -0
- package/dpr/utils/{CollatedSummaryBuilder/CollatedSummaryBuilder.js → TemplateBuilder/SummaryDataHelper/SummaryDataHelper.js} +6 -8
- package/dpr/utils/TemplateBuilder/SummaryDataHelper/SummaryDataHelper.js.map +7 -0
- package/dpr/utils/{CollatedSummaryBuilder/CollatedSummaryBuilder.test.ts → TemplateBuilder/SummaryDataHelper/SummaryDataHelper.test.ts} +4 -4
- package/dpr/utils/{CollatedSummaryBuilder/CollatedSummaryBuilder.ts → TemplateBuilder/SummaryDataHelper/SummaryDataHelper.ts} +6 -9
- package/dpr/utils/TemplateBuilder/TemplateBuilder.js +74 -0
- package/dpr/utils/TemplateBuilder/TemplateBuilder.js.map +7 -0
- package/dpr/utils/TemplateBuilder/TemplateBuilder.ts +68 -0
- package/dpr/utils/definitionUtils.js +22 -2
- package/dpr/utils/definitionUtils.js.map +2 -2
- package/dpr/utils/definitionUtils.ts +26 -1
- package/package.json +1 -1
- package/dpr/DprLoadingHelper.js +0 -51
- package/dpr/DprLoadingHelper.js.map +0 -7
- package/dpr/DprLoadingHelper.ts +0 -27
- package/dpr/components/_reports/report/view.njk +0 -40
- package/dpr/components/_reports/report-actions/clientClass.js.map +0 -7
- package/dpr/components/_reports/report-actions/types.d.js.map +0 -7
- package/dpr/components/_reports/report-columns-form/clientClass.js.map +0 -7
- package/dpr/components/_reports/report-columns-form/utils.js.map +0 -7
- package/dpr/components/_reports/report-data-table/clientClass.js.map +0 -7
- package/dpr/components/_reports/report-data-table/types.d.js.map +0 -7
- package/dpr/components/_reports/report-data-table/utils.js +0 -123
- package/dpr/components/_reports/report-data-table/utils.js.map +0 -7
- package/dpr/components/_reports/report-data-table/utils.test.ts +0 -604
- package/dpr/components/_reports/report-data-table/utils.ts +0 -150
- package/dpr/components/_reports/report-data-table/view.njk +0 -24
- package/dpr/components/_reports/report-data-table-wrapper/view.njk +0 -27
- package/dpr/components/_reports/report-download-message/clientClass.js.map +0 -7
- package/dpr/components/_reports/report-no-data-message/styles.scss +0 -4
- package/dpr/components/_reports/report-no-data-message/view.njk +0 -13
- package/dpr/components/_reports/report-pagination/clientClass.js.map +0 -7
- package/dpr/components/_reports/report-print-message/view.njk +0 -8
- package/dpr/components/_reports/report-template/view.njk +0 -44
- package/dpr/components/_reports/report-wrapper/view.njk +0 -19
- package/dpr/components/loading-anim/styles.scss +0 -117
- package/dpr/components/loading-anim/view.njk +0 -18
- package/dpr/utils/CollatedSummaryBuilder/CollatedSummaryBuilder.js.map +0 -7
- package/dpr/utils/ParentChildDataTableBuilder/ParentChildDataTableBuilder.js +0 -202
- package/dpr/utils/ParentChildDataTableBuilder/ParentChildDataTableBuilder.js.map +0 -7
- package/dpr/utils/ParentChildDataTableBuilder/ParentChildDataTableBuilder.test.ts +0 -503
- package/dpr/utils/ParentChildDataTableBuilder/ParentChildDataTableBuilder.ts +0 -224
- package/dpr/utils/ParentChildDataTableBuilder/types.d.js.map +0 -7
- package/dpr/utils/ParentChildDataTableBuilder/types.d.ts +0 -11
- package/dpr/utils/SectionedDataTableBuilder/SectionedDataTableBuilder.js +0 -311
- package/dpr/utils/SectionedDataTableBuilder/SectionedDataTableBuilder.js.map +0 -7
- package/dpr/utils/SectionedDataTableBuilder/SectionedDataTableBuilder.test.ts +0 -492
- package/dpr/utils/SectionedDataTableBuilder/SectionedDataTableBuilder.ts +0 -342
- package/dpr/utils/SectionedDataTableBuilder/types.d.js.map +0 -7
- package/dpr/utils/SectionedDataTableBuilder/types.d.ts +0 -5
- package/dpr/utils/SectionedFieldsTableBuilder/SectionedFieldsTableBuilder.js +0 -146
- package/dpr/utils/SectionedFieldsTableBuilder/SectionedFieldsTableBuilder.js.map +0 -7
- package/dpr/utils/SectionedFieldsTableBuilder/SectionedFieldsTableBuilder.test.ts +0 -140
- package/dpr/utils/SectionedFieldsTableBuilder/SectionedFieldsTableBuilder.ts +0 -150
- /package/dpr/components/_reports/{report-actions → report-heading/report-actions}/actionsTemplate.js +0 -0
- /package/dpr/components/_reports/{report-actions → report-heading/report-actions}/actionsTemplate.ts +0 -0
- /package/dpr/components/_reports/{report-actions → report-heading/report-actions}/style.scss +0 -0
- /package/dpr/components/_reports/{report-actions → report-heading/report-actions}/types.d.js +0 -0
- /package/dpr/components/_reports/{report-actions → report-heading/report-actions}/utils.js +0 -0
- /package/dpr/components/_reports/{report-actions → report-heading/report-actions}/utils.ts +0 -0
- /package/dpr/components/_reports/{report-actions → report-heading/report-actions}/view.njk +0 -0
- /package/dpr/components/_reports/{report-columns-form → report-heading/report-columns/report-columns-form}/style.scss +0 -0
- /package/dpr/components/_reports/{report-columns-form → report-heading/report-columns/report-columns-form}/types.d.js +0 -0
- /package/dpr/components/_reports/{report-columns-form → report-heading/report-columns/report-columns-form}/types.d.ts +0 -0
- /package/dpr/components/_reports/{report-columns-form → report-heading/report-columns/report-columns-form}/view.njk +0 -0
- /package/dpr/components/_reports/{report-columns → report-heading/report-columns}/styles.scss +0 -0
- /package/dpr/components/_reports/{report-download-message → report-heading/report-download-message}/style.scss +0 -0
- /package/dpr/components/_reports/{report-download-message → report-heading/report-download-message}/view.njk +0 -0
- /package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/style.scss +0 -0
- /package/dpr/components/_reports/{report-data-table → report-page/report-template/report-pagination}/types.d.js +0 -0
- /package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/types.d.ts +0 -0
- /package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/utils.js +0 -0
- /package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/utils.test.ts +0 -0
- /package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/utils.ts +0 -0
- /package/dpr/components/_reports/{report-pagination → report-page/report-template/report-pagination}/view.njk +0 -0
- /package/dpr/components/_reports/{report-pagination → report-page/report-template/report-section/report-data-table}/types.d.js +0 -0
- /package/dpr/components/_reports/{report-summary-table → report-page/report-template/report-summary-table}/view.njk +0 -0
- /package/dpr/components/_reports/{report-totals → report-page/report-template/report-totals}/style.scss +0 -0
- /package/dpr/components/_reports/{report-totals → report-page/report-template/report-totals}/utils.js +0 -0
- /package/dpr/components/_reports/{report-totals → report-page/report-template/report-totals}/utils.ts +0 -0
- /package/dpr/components/_reports/{report-totals → report-page/report-template/report-totals}/view.njk +0 -0
- /package/dpr/utils/{ParentChildDataTableBuilder → TemplateBuilder/ParentChildDataBuilder}/types.d.js +0 -0
- /package/dpr/utils/{SectionedDataTableBuilder → TemplateBuilder/ReportBuilder}/types.d.js +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../../dpr/routes/journeys/view-report/async/report/report-variants.cy.ts"],
|
|
4
|
-
"sourcesContent": ["import { executeReportStubs, requestReportByNameAndDescription, stubBaseTasks } from 'cypress-tests/cypressUtils'\n\ncontext('Viewing a report', () => {\n const path = '/embedded/platform/'\n\n describe('report variants', () => {\n before(() => {\n stubBaseTasks()\n executeReportStubs()\n })\n\n it('should display a list-section variant', () => {\n cy.task('stubListSectionDefinitionRequest')\n cy.task('stubResultSuccessResult')\n\n cy.visit(path)\n requestReportByNameAndDescription({ name: 'Successful Report', description: 'this will succeed' })\n cy.findByRole('heading', { level: 1, name: /Sectioned/ }).should('be.visible')\n\n cy.findAllByRole('heading', { name: /First.*Second/ }).should('have.length', 4)\n cy.findByRole('heading', { name: /First: One, Second: A 4 results/ }).should('be.visible')\n cy.findByRole('heading', { name: /First: One, Second: B 6 results/ }).should('be.visible')\n cy.findByRole('heading', { name: /First: Two, Second: A 3 results/ }).should('be.visible')\n cy.findByRole('heading', { name: /First: Two, Second: B 7 results/ }).should('be.visible')\n })\n\n it('should display a parent-child variant', () => {\n cy.task('stubParentChildDefinitionRequest')\n cy.task('stubResultSuccessResultDifferentValues')\n\n cy.visit(path)\n requestReportByNameAndDescription({ name: 'Successful Report', description: 'this will succeed' })\n cy.findByRole('heading', { level: 1, name: /Parent Child Template/ }).should('be.visible')\n\n cy.contains('table', 'val40').within(() => {\n cy.findAllByRole('row').should('have.length', 8)\n ;[40, 41, 42, 43, 44, 45, 46].forEach((num) => {\n cy.findByRole('row', { name: new RegExp(`val${num}$`) }).should('be.visible')\n })\n })\n\n cy.contains('table', 'val30').within(() => {\n cy.findAllByRole('row').should('have.length', 14)\n ;[...Array(10).keys()]\n .map((i) => i + 30)\n .forEach((num) => {\n cy.findByRole('row', { name: new RegExp(`val${num}$`) }).should('be.visible')\n })\n cy.findByRole('row', { name: /val330/ }).should('be.visible')\n cy.findByRole('row', { name: /val331/ }).should('be.visible')\n cy.findByRole('row', { name: /val332/ }).should('be.visible')\n })\n })\n\n it('should display a summary section variant', () => {\n cy.task('stubSummarySectionDefinitionRequest')\n cy.task('stubAsyncSummaryReport')\n cy.task('stubResultSuccessResultDifferentValues')\n\n cy.visit(path)\n requestReportByNameAndDescription({ name: 'Successful Report', description: 'this will succeed' })\n cy.findByRole('heading', { level: 1, name: /Sectioned Summaries template/ }).should('be.visible')\n\n cy.findAllByRole('columnheader').should('have.length', 8 * 4)\n cy.get('.report-template-container').within(() => {\n cy.findAllByRole('row').should('have.length', 48)\n })\n })\n\n it('should display a parent child section variant', () => {\n cy.task('stubParentChildSectionDefinitionRequest')\n cy.task('stubResultSuccessResultDifferentValues')\n\n cy.visit(path)\n requestReportByNameAndDescription({ name: 'Successful Report', description: 'this will succeed' })\n cy.findByRole('heading', { level: 1, name: /Parent Child Section Template/ }).should('be.visible')\n\n // First child table\n cy.contains('table', 'val30').within(() => {\n cy.findAllByRole('row').should('have.length', 21)\n })\n cy.findByRole('heading', { name: /Section 1: One, Section 2: A 5 results/ }).should('be.visible')\n cy.findByRole('heading', { name: /Section 1: One, Section 2: B 2 results/ }).should('be.visible')\n cy.findByRole('heading', { name: /Section 1: Two, Section 2: A 8 results/ }).should('be.visible')\n cy.findByRole('heading', { name: /Section 1: Two, Section 2: B 5 results/ }).should('be.visible')\n // This is the best we can do for now until this report type gets refactored\n cy.findAllByRole('row', {\n name: (textContent) => {\n return textContent.includes('val')\n },\n })\n .filter((_idx, el) => [...el.querySelectorAll('td')].length === 2)\n .should('have.length', 100)\n })\n })\n})\n"],
|
|
5
|
-
"mappings": ";AAAA,
|
|
4
|
+
"sourcesContent": ["import {\n executeReportStubs,\n requestReportByNameAndDescription,\n stubBaseTasks,\n startReportRequest,\n} from 'cypress-tests/cypressUtils'\n\ncontext('Viewing a report', () => {\n const path = '/embedded/platform/'\n\n describe('report variants', () => {\n before(() => {\n stubBaseTasks()\n executeReportStubs()\n })\n\n describe('list-section', () => {\n const listSectionReport = {\n name: 'List-section',\n description: 'list-section template',\n }\n\n beforeEach(() => {\n cy.task('stubListSectionDefinitionRequest')\n cy.task('stubResultSuccessResult')\n })\n\n it('should display a list-section variant', () => {\n cy.visit(path)\n requestReportByNameAndDescription(listSectionReport)\n cy.findByRole('heading', { level: 1, name: /List-section/ })\n cy.findAllByRole('heading', { name: /First.*Second/ }).should('have.length', 4)\n\n // Test headings exist\n cy.findByRole('heading', { name: /First: One, Second: A 4 results/ })\n .should('be.visible')\n .scrollIntoView()\n cy.findByRole('heading', { name: /First: One, Second: B 6 results/ })\n .should('be.visible')\n .scrollIntoView()\n cy.findByRole('heading', { name: /First: Two, Second: A 3 results/ })\n .should('be.visible')\n .scrollIntoView()\n cy.findByRole('heading', { name: /First: Two, Second: B 7 results/ })\n .should('be.visible')\n .scrollIntoView()\n\n // Test they only include 1 table per section\n cy.findAllByLabelText(/First: One, Second: A 4 results/)\n .eq(1)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 1)\n })\n cy.findAllByLabelText(/First: One, Second: B 6 results/)\n .eq(1)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 1)\n })\n cy.findAllByLabelText(/First: Two, Second: A 3 results/)\n .eq(1)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 1)\n })\n cy.findAllByLabelText(/First: Two, Second: B 7 results/)\n .eq(1)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 1)\n })\n })\n\n it('should sort the sections correctly', () => {\n cy.visit(path)\n startReportRequest(listSectionReport)\n cy.findByRole('group', { name: /Column/ })\n .findByRole('radio', { name: 'Second' })\n .check()\n cy.findByRole('button', { name: /Request/ }).click()\n\n cy.findByRole('heading', { level: 1, name: /List-section/ })\n cy.findAllByRole('heading', { name: /First.*Second/ })\n .should('have.length', 4)\n .each((heading, index) => {\n switch (index) {\n case 0:\n cy.wrap(heading).contains('First: One, Second: A 4 results')\n break\n case 1:\n cy.wrap(heading).contains('First: Two, Second: A 3 results')\n break\n case 2:\n cy.wrap(heading).contains('First: One, Second: B 6 results')\n break\n case 3:\n cy.wrap(heading).contains('First: Two, Second: B 7 results')\n break\n default:\n break\n }\n })\n })\n })\n\n describe('summary-section', () => {\n it('should display a summary section variant', () => {\n cy.task('stubSummarySectionDefinitionRequest')\n cy.task('stubAsyncSummaryReport')\n cy.task('stubResultSuccessResultDifferentValues')\n\n cy.visit(path)\n requestReportByNameAndDescription({ name: 'Summary-section', description: 'Summary-section template' })\n cy.findByRole('heading', { level: 1, name: /Summary-section/ }).should('be.visible')\n\n cy.findAllByLabelText(/First: One, Second: A/)\n .eq(0)\n .within(() => {\n cy.findAllByRole('table')\n .should('have.length', 2)\n .each((table) => {\n cy.wrap(table).within(() => {\n cy.findAllByRole('row').should('have.length', 5)\n })\n })\n })\n\n cy.findAllByLabelText(/First: One, Second: B/)\n .eq(0)\n .within(() => {\n cy.findAllByRole('table')\n .should('have.length', 2)\n .each((table) => {\n cy.wrap(table).within(() => {\n cy.findAllByRole('row').should('have.length', 7)\n })\n })\n })\n\n cy.findAllByLabelText(/First: Two, Second: A/)\n .eq(0)\n .within(() => {\n cy.findAllByRole('table')\n .should('have.length', 2)\n .each((table) => {\n cy.wrap(table).within(() => {\n cy.findAllByRole('row').should('have.length', 4)\n })\n })\n })\n\n cy.findAllByLabelText(/First: Two, Second: B/)\n .eq(0)\n .within(() => {\n cy.findAllByRole('table')\n .should('have.length', 2)\n .each((table) => {\n cy.wrap(table).within(() => {\n cy.findAllByRole('row').should('have.length', 8)\n })\n })\n })\n })\n })\n\n describe('parent-child-section', () => {\n const ParentChildSectionReport = {\n name: 'Parent-child-section',\n description: 'Parent-child-section template',\n }\n\n beforeEach(() => {\n cy.task('stubParentChildSectionDefinitionRequest')\n cy.task('stubResultSuccessResultDifferentValues')\n })\n\n it('should display a parent child section variant', () => {\n cy.visit(path)\n requestReportByNameAndDescription(ParentChildSectionReport)\n cy.findByRole('heading', { level: 1, name: /Parent-child-section/ }).should('be.visible')\n\n cy.findByRole('heading', { name: /Section 1: One, Section 2: A 5 results/ })\n .scrollIntoView()\n .should('be.visible')\n cy.findByRole('heading', { name: /Section 1: One, Section 2: B 2 results/ })\n .scrollIntoView()\n .should('be.visible')\n cy.findByRole('heading', { name: /Section 1: Two, Section 2: A 8 results/ })\n .scrollIntoView()\n .should('be.visible')\n cy.findByRole('heading', { name: /Section 1: Two, Section 2: B 5 results/ })\n .scrollIntoView()\n .should('be.visible')\n\n cy.findAllByLabelText('Section 1: One, Section 2: A 5 results')\n .eq(1)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 10)\n\n cy.findAllByLabelText('Parent 1')\n .eq(0)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 2)\n\n // parent\n cy.findAllByLabelText('Parent 1')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 4)\n })\n })\n\n // Child\n cy.findAllByLabelText('Child Report')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 23)\n })\n })\n })\n })\n\n cy.findAllByLabelText('Section 1: Two, Section 2: A 8 results')\n .eq(1)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 16)\n\n cy.findAllByLabelText('Parent 1')\n .eq(0)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 2)\n\n // parent\n cy.findAllByLabelText('Parent 1')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 4)\n })\n })\n\n // Child\n cy.findAllByLabelText('Child Report')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 23)\n })\n })\n })\n })\n })\n\n it('should sort the sections correctly', () => {\n cy.visit(path)\n startReportRequest(ParentChildSectionReport)\n cy.findByRole('group', { name: /Column/ })\n .findByRole('radio', { name: 'Section 2' })\n .check()\n cy.findByRole('button', { name: /Request/ }).click()\n\n cy.findByRole('heading', { level: 1, name: /Parent-child-section/ }).should('be.visible')\n\n cy.findAllByRole('heading', { name: /Section 1.*Section 2/ })\n .should('have.length', 4)\n .each((heading, index) => {\n switch (index) {\n case 0:\n cy.wrap(heading).contains('Section 1: One, Section 2: A 5 results')\n break\n case 1:\n cy.wrap(heading).contains('Section 1: Two, Section 2: A 8 results')\n break\n case 2:\n cy.wrap(heading).contains('Section 1: One, Section 2: B 2 results')\n break\n case 3:\n cy.wrap(heading).contains('Section 1: Two, Section 2: B 5 results')\n break\n default:\n break\n }\n })\n })\n })\n\n describe('parent-child', () => {\n it('should display a parent-child variant', () => {\n cy.task('stubParentChildDefinitionRequest')\n cy.task('stubResultSuccessResultDifferentValues')\n\n cy.visit(path)\n requestReportByNameAndDescription({ name: 'Parent-child', description: 'Parent-child template' })\n cy.findByRole('heading', { level: 1, name: /Parent-child/ }).should('be.visible')\n\n // Parent child group\n cy.findAllByLabelText('Parent 1')\n .eq(0)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 3)\n\n // parent\n cy.findAllByLabelText('Parent 1')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 4)\n })\n })\n\n // child\n cy.findAllByLabelText('Child Report')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 10)\n })\n })\n\n // child 2\n cy.findAllByLabelText('Child Report 2')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 10)\n })\n })\n })\n\n // Parent child group\n cy.findAllByLabelText('Parent 8')\n .eq(0)\n .within(() => {\n cy.findAllByRole('table').should('have.length', 3)\n\n // parent\n cy.findAllByLabelText('Parent 8')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 4)\n })\n })\n\n // child\n cy.findAllByLabelText('Child Report')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 16)\n })\n })\n\n // child 2\n cy.findAllByLabelText('Child Report 2')\n .eq(0)\n .within(() => {\n cy.findByRole('table').within(() => {\n cy.findAllByRole('row').should('have.length', 16)\n })\n })\n })\n })\n })\n })\n})\n"],
|
|
5
|
+
"mappings": ";AAAA,0BAKO;AAEP,QAAQ,oBAAoB,MAAM;AAChC,QAAM,OAAO;AAEb,WAAS,mBAAmB,MAAM;AAChC,WAAO,MAAM;AACX,6CAAc;AACd,kDAAmB;AAAA,IACrB,CAAC;AAED,aAAS,gBAAgB,MAAM;AAC7B,YAAM,oBAAoB;AAAA,QACxB,MAAM;AAAA,QACN,aAAa;AAAA,MACf;AAEA,iBAAW,MAAM;AACf,WAAG,KAAK,kCAAkC;AAC1C,WAAG,KAAK,yBAAyB;AAAA,MACnC,CAAC;AAED,SAAG,yCAAyC,MAAM;AAChD,WAAG,MAAM,IAAI;AACb,mEAAkC,iBAAiB;AACnD,WAAG,WAAW,WAAW,EAAE,OAAO,GAAG,MAAM,eAAe,CAAC;AAC3D,WAAG,cAAc,WAAW,EAAE,MAAM,gBAAgB,CAAC,EAAE,OAAO,eAAe,CAAC;AAG9E,WAAG,WAAW,WAAW,EAAE,MAAM,kCAAkC,CAAC,EACjE,OAAO,YAAY,EACnB,eAAe;A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H,CAAC;AAAA,QACL,CAAC;AAAA,MACL,CAAC;AAAA,IACH,CAAC;AAAA,EACH,CAAC;AACH,CAAC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
executeReportStubs,
|
|
3
|
+
requestReportByNameAndDescription,
|
|
4
|
+
stubBaseTasks,
|
|
5
|
+
startReportRequest,
|
|
6
|
+
} from 'cypress-tests/cypressUtils'
|
|
2
7
|
|
|
3
8
|
context('Viewing a report', () => {
|
|
4
9
|
const path = '/embedded/platform/'
|
|
@@ -9,88 +14,352 @@ context('Viewing a report', () => {
|
|
|
9
14
|
executeReportStubs()
|
|
10
15
|
})
|
|
11
16
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
17
|
+
describe('list-section', () => {
|
|
18
|
+
const listSectionReport = {
|
|
19
|
+
name: 'List-section',
|
|
20
|
+
description: 'list-section template',
|
|
21
|
+
}
|
|
15
22
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
cy.findAllByRole('heading', { name: /First.*Second/ }).should('have.length', 4)
|
|
21
|
-
cy.findByRole('heading', { name: /First: One, Second: A 4 results/ }).should('be.visible')
|
|
22
|
-
cy.findByRole('heading', { name: /First: One, Second: B 6 results/ }).should('be.visible')
|
|
23
|
-
cy.findByRole('heading', { name: /First: Two, Second: A 3 results/ }).should('be.visible')
|
|
24
|
-
cy.findByRole('heading', { name: /First: Two, Second: B 7 results/ }).should('be.visible')
|
|
25
|
-
})
|
|
23
|
+
beforeEach(() => {
|
|
24
|
+
cy.task('stubListSectionDefinitionRequest')
|
|
25
|
+
cy.task('stubResultSuccessResult')
|
|
26
|
+
})
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
it('should display a list-section variant', () => {
|
|
29
|
+
cy.visit(path)
|
|
30
|
+
requestReportByNameAndDescription(listSectionReport)
|
|
31
|
+
cy.findByRole('heading', { level: 1, name: /List-section/ })
|
|
32
|
+
cy.findAllByRole('heading', { name: /First.*Second/ }).should('have.length', 4)
|
|
30
33
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
// Test headings exist
|
|
35
|
+
cy.findByRole('heading', { name: /First: One, Second: A 4 results/ })
|
|
36
|
+
.should('be.visible')
|
|
37
|
+
.scrollIntoView()
|
|
38
|
+
cy.findByRole('heading', { name: /First: One, Second: B 6 results/ })
|
|
39
|
+
.should('be.visible')
|
|
40
|
+
.scrollIntoView()
|
|
41
|
+
cy.findByRole('heading', { name: /First: Two, Second: A 3 results/ })
|
|
42
|
+
.should('be.visible')
|
|
43
|
+
.scrollIntoView()
|
|
44
|
+
cy.findByRole('heading', { name: /First: Two, Second: B 7 results/ })
|
|
45
|
+
.should('be.visible')
|
|
46
|
+
.scrollIntoView()
|
|
34
47
|
|
|
35
|
-
|
|
36
|
-
cy.
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
48
|
+
// Test they only include 1 table per section
|
|
49
|
+
cy.findAllByLabelText(/First: One, Second: A 4 results/)
|
|
50
|
+
.eq(1)
|
|
51
|
+
.within(() => {
|
|
52
|
+
cy.findAllByRole('table').should('have.length', 1)
|
|
53
|
+
})
|
|
54
|
+
cy.findAllByLabelText(/First: One, Second: B 6 results/)
|
|
55
|
+
.eq(1)
|
|
56
|
+
.within(() => {
|
|
57
|
+
cy.findAllByRole('table').should('have.length', 1)
|
|
58
|
+
})
|
|
59
|
+
cy.findAllByLabelText(/First: Two, Second: A 3 results/)
|
|
60
|
+
.eq(1)
|
|
61
|
+
.within(() => {
|
|
62
|
+
cy.findAllByRole('table').should('have.length', 1)
|
|
63
|
+
})
|
|
64
|
+
cy.findAllByLabelText(/First: Two, Second: B 7 results/)
|
|
65
|
+
.eq(1)
|
|
66
|
+
.within(() => {
|
|
67
|
+
cy.findAllByRole('table').should('have.length', 1)
|
|
68
|
+
})
|
|
40
69
|
})
|
|
41
70
|
|
|
42
|
-
|
|
43
|
-
cy.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
.
|
|
47
|
-
|
|
71
|
+
it('should sort the sections correctly', () => {
|
|
72
|
+
cy.visit(path)
|
|
73
|
+
startReportRequest(listSectionReport)
|
|
74
|
+
cy.findByRole('group', { name: /Column/ })
|
|
75
|
+
.findByRole('radio', { name: 'Second' })
|
|
76
|
+
.check()
|
|
77
|
+
cy.findByRole('button', { name: /Request/ }).click()
|
|
78
|
+
|
|
79
|
+
cy.findByRole('heading', { level: 1, name: /List-section/ })
|
|
80
|
+
cy.findAllByRole('heading', { name: /First.*Second/ })
|
|
81
|
+
.should('have.length', 4)
|
|
82
|
+
.each((heading, index) => {
|
|
83
|
+
switch (index) {
|
|
84
|
+
case 0:
|
|
85
|
+
cy.wrap(heading).contains('First: One, Second: A 4 results')
|
|
86
|
+
break
|
|
87
|
+
case 1:
|
|
88
|
+
cy.wrap(heading).contains('First: Two, Second: A 3 results')
|
|
89
|
+
break
|
|
90
|
+
case 2:
|
|
91
|
+
cy.wrap(heading).contains('First: One, Second: B 6 results')
|
|
92
|
+
break
|
|
93
|
+
case 3:
|
|
94
|
+
cy.wrap(heading).contains('First: Two, Second: B 7 results')
|
|
95
|
+
break
|
|
96
|
+
default:
|
|
97
|
+
break
|
|
98
|
+
}
|
|
48
99
|
})
|
|
49
|
-
cy.findByRole('row', { name: /val330/ }).should('be.visible')
|
|
50
|
-
cy.findByRole('row', { name: /val331/ }).should('be.visible')
|
|
51
|
-
cy.findByRole('row', { name: /val332/ }).should('be.visible')
|
|
52
100
|
})
|
|
53
101
|
})
|
|
54
102
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
103
|
+
describe('summary-section', () => {
|
|
104
|
+
it('should display a summary section variant', () => {
|
|
105
|
+
cy.task('stubSummarySectionDefinitionRequest')
|
|
106
|
+
cy.task('stubAsyncSummaryReport')
|
|
107
|
+
cy.task('stubResultSuccessResultDifferentValues')
|
|
108
|
+
|
|
109
|
+
cy.visit(path)
|
|
110
|
+
requestReportByNameAndDescription({ name: 'Summary-section', description: 'Summary-section template' })
|
|
111
|
+
cy.findByRole('heading', { level: 1, name: /Summary-section/ }).should('be.visible')
|
|
59
112
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
113
|
+
cy.findAllByLabelText(/First: One, Second: A/)
|
|
114
|
+
.eq(0)
|
|
115
|
+
.within(() => {
|
|
116
|
+
cy.findAllByRole('table')
|
|
117
|
+
.should('have.length', 2)
|
|
118
|
+
.each((table) => {
|
|
119
|
+
cy.wrap(table).within(() => {
|
|
120
|
+
cy.findAllByRole('row').should('have.length', 5)
|
|
121
|
+
})
|
|
122
|
+
})
|
|
123
|
+
})
|
|
124
|
+
|
|
125
|
+
cy.findAllByLabelText(/First: One, Second: B/)
|
|
126
|
+
.eq(0)
|
|
127
|
+
.within(() => {
|
|
128
|
+
cy.findAllByRole('table')
|
|
129
|
+
.should('have.length', 2)
|
|
130
|
+
.each((table) => {
|
|
131
|
+
cy.wrap(table).within(() => {
|
|
132
|
+
cy.findAllByRole('row').should('have.length', 7)
|
|
133
|
+
})
|
|
134
|
+
})
|
|
135
|
+
})
|
|
63
136
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
137
|
+
cy.findAllByLabelText(/First: Two, Second: A/)
|
|
138
|
+
.eq(0)
|
|
139
|
+
.within(() => {
|
|
140
|
+
cy.findAllByRole('table')
|
|
141
|
+
.should('have.length', 2)
|
|
142
|
+
.each((table) => {
|
|
143
|
+
cy.wrap(table).within(() => {
|
|
144
|
+
cy.findAllByRole('row').should('have.length', 4)
|
|
145
|
+
})
|
|
146
|
+
})
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
cy.findAllByLabelText(/First: Two, Second: B/)
|
|
150
|
+
.eq(0)
|
|
151
|
+
.within(() => {
|
|
152
|
+
cy.findAllByRole('table')
|
|
153
|
+
.should('have.length', 2)
|
|
154
|
+
.each((table) => {
|
|
155
|
+
cy.wrap(table).within(() => {
|
|
156
|
+
cy.findAllByRole('row').should('have.length', 8)
|
|
157
|
+
})
|
|
158
|
+
})
|
|
159
|
+
})
|
|
67
160
|
})
|
|
68
161
|
})
|
|
69
162
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
163
|
+
describe('parent-child-section', () => {
|
|
164
|
+
const ParentChildSectionReport = {
|
|
165
|
+
name: 'Parent-child-section',
|
|
166
|
+
description: 'Parent-child-section template',
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
beforeEach(() => {
|
|
170
|
+
cy.task('stubParentChildSectionDefinitionRequest')
|
|
171
|
+
cy.task('stubResultSuccessResultDifferentValues')
|
|
172
|
+
})
|
|
173
|
+
|
|
174
|
+
it('should display a parent child section variant', () => {
|
|
175
|
+
cy.visit(path)
|
|
176
|
+
requestReportByNameAndDescription(ParentChildSectionReport)
|
|
177
|
+
cy.findByRole('heading', { level: 1, name: /Parent-child-section/ }).should('be.visible')
|
|
73
178
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
179
|
+
cy.findByRole('heading', { name: /Section 1: One, Section 2: A 5 results/ })
|
|
180
|
+
.scrollIntoView()
|
|
181
|
+
.should('be.visible')
|
|
182
|
+
cy.findByRole('heading', { name: /Section 1: One, Section 2: B 2 results/ })
|
|
183
|
+
.scrollIntoView()
|
|
184
|
+
.should('be.visible')
|
|
185
|
+
cy.findByRole('heading', { name: /Section 1: Two, Section 2: A 8 results/ })
|
|
186
|
+
.scrollIntoView()
|
|
187
|
+
.should('be.visible')
|
|
188
|
+
cy.findByRole('heading', { name: /Section 1: Two, Section 2: B 5 results/ })
|
|
189
|
+
.scrollIntoView()
|
|
190
|
+
.should('be.visible')
|
|
191
|
+
|
|
192
|
+
cy.findAllByLabelText('Section 1: One, Section 2: A 5 results')
|
|
193
|
+
.eq(1)
|
|
194
|
+
.within(() => {
|
|
195
|
+
cy.findAllByRole('table').should('have.length', 10)
|
|
196
|
+
|
|
197
|
+
cy.findAllByLabelText('Parent 1')
|
|
198
|
+
.eq(0)
|
|
199
|
+
.within(() => {
|
|
200
|
+
cy.findAllByRole('table').should('have.length', 2)
|
|
201
|
+
|
|
202
|
+
// parent
|
|
203
|
+
cy.findAllByLabelText('Parent 1')
|
|
204
|
+
.eq(0)
|
|
205
|
+
.within(() => {
|
|
206
|
+
cy.findByRole('table').within(() => {
|
|
207
|
+
cy.findAllByRole('row').should('have.length', 4)
|
|
208
|
+
})
|
|
209
|
+
})
|
|
210
|
+
|
|
211
|
+
// Child
|
|
212
|
+
cy.findAllByLabelText('Child Report')
|
|
213
|
+
.eq(0)
|
|
214
|
+
.within(() => {
|
|
215
|
+
cy.findByRole('table').within(() => {
|
|
216
|
+
cy.findAllByRole('row').should('have.length', 23)
|
|
217
|
+
})
|
|
218
|
+
})
|
|
219
|
+
})
|
|
220
|
+
})
|
|
77
221
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
222
|
+
cy.findAllByLabelText('Section 1: Two, Section 2: A 8 results')
|
|
223
|
+
.eq(1)
|
|
224
|
+
.within(() => {
|
|
225
|
+
cy.findAllByRole('table').should('have.length', 16)
|
|
226
|
+
|
|
227
|
+
cy.findAllByLabelText('Parent 1')
|
|
228
|
+
.eq(0)
|
|
229
|
+
.within(() => {
|
|
230
|
+
cy.findAllByRole('table').should('have.length', 2)
|
|
231
|
+
|
|
232
|
+
// parent
|
|
233
|
+
cy.findAllByLabelText('Parent 1')
|
|
234
|
+
.eq(0)
|
|
235
|
+
.within(() => {
|
|
236
|
+
cy.findByRole('table').within(() => {
|
|
237
|
+
cy.findAllByRole('row').should('have.length', 4)
|
|
238
|
+
})
|
|
239
|
+
})
|
|
240
|
+
|
|
241
|
+
// Child
|
|
242
|
+
cy.findAllByLabelText('Child Report')
|
|
243
|
+
.eq(0)
|
|
244
|
+
.within(() => {
|
|
245
|
+
cy.findByRole('table').within(() => {
|
|
246
|
+
cy.findAllByRole('row').should('have.length', 23)
|
|
247
|
+
})
|
|
248
|
+
})
|
|
249
|
+
})
|
|
250
|
+
})
|
|
81
251
|
})
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
252
|
+
|
|
253
|
+
it('should sort the sections correctly', () => {
|
|
254
|
+
cy.visit(path)
|
|
255
|
+
startReportRequest(ParentChildSectionReport)
|
|
256
|
+
cy.findByRole('group', { name: /Column/ })
|
|
257
|
+
.findByRole('radio', { name: 'Section 2' })
|
|
258
|
+
.check()
|
|
259
|
+
cy.findByRole('button', { name: /Request/ }).click()
|
|
260
|
+
|
|
261
|
+
cy.findByRole('heading', { level: 1, name: /Parent-child-section/ }).should('be.visible')
|
|
262
|
+
|
|
263
|
+
cy.findAllByRole('heading', { name: /Section 1.*Section 2/ })
|
|
264
|
+
.should('have.length', 4)
|
|
265
|
+
.each((heading, index) => {
|
|
266
|
+
switch (index) {
|
|
267
|
+
case 0:
|
|
268
|
+
cy.wrap(heading).contains('Section 1: One, Section 2: A 5 results')
|
|
269
|
+
break
|
|
270
|
+
case 1:
|
|
271
|
+
cy.wrap(heading).contains('Section 1: Two, Section 2: A 8 results')
|
|
272
|
+
break
|
|
273
|
+
case 2:
|
|
274
|
+
cy.wrap(heading).contains('Section 1: One, Section 2: B 2 results')
|
|
275
|
+
break
|
|
276
|
+
case 3:
|
|
277
|
+
cy.wrap(heading).contains('Section 1: Two, Section 2: B 5 results')
|
|
278
|
+
break
|
|
279
|
+
default:
|
|
280
|
+
break
|
|
281
|
+
}
|
|
282
|
+
})
|
|
283
|
+
})
|
|
284
|
+
})
|
|
285
|
+
|
|
286
|
+
describe('parent-child', () => {
|
|
287
|
+
it('should display a parent-child variant', () => {
|
|
288
|
+
cy.task('stubParentChildDefinitionRequest')
|
|
289
|
+
cy.task('stubResultSuccessResultDifferentValues')
|
|
290
|
+
|
|
291
|
+
cy.visit(path)
|
|
292
|
+
requestReportByNameAndDescription({ name: 'Parent-child', description: 'Parent-child template' })
|
|
293
|
+
cy.findByRole('heading', { level: 1, name: /Parent-child/ }).should('be.visible')
|
|
294
|
+
|
|
295
|
+
// Parent child group
|
|
296
|
+
cy.findAllByLabelText('Parent 1')
|
|
297
|
+
.eq(0)
|
|
298
|
+
.within(() => {
|
|
299
|
+
cy.findAllByRole('table').should('have.length', 3)
|
|
300
|
+
|
|
301
|
+
// parent
|
|
302
|
+
cy.findAllByLabelText('Parent 1')
|
|
303
|
+
.eq(0)
|
|
304
|
+
.within(() => {
|
|
305
|
+
cy.findByRole('table').within(() => {
|
|
306
|
+
cy.findAllByRole('row').should('have.length', 4)
|
|
307
|
+
})
|
|
308
|
+
})
|
|
309
|
+
|
|
310
|
+
// child
|
|
311
|
+
cy.findAllByLabelText('Child Report')
|
|
312
|
+
.eq(0)
|
|
313
|
+
.within(() => {
|
|
314
|
+
cy.findByRole('table').within(() => {
|
|
315
|
+
cy.findAllByRole('row').should('have.length', 10)
|
|
316
|
+
})
|
|
317
|
+
})
|
|
318
|
+
|
|
319
|
+
// child 2
|
|
320
|
+
cy.findAllByLabelText('Child Report 2')
|
|
321
|
+
.eq(0)
|
|
322
|
+
.within(() => {
|
|
323
|
+
cy.findByRole('table').within(() => {
|
|
324
|
+
cy.findAllByRole('row').should('have.length', 10)
|
|
325
|
+
})
|
|
326
|
+
})
|
|
327
|
+
})
|
|
328
|
+
|
|
329
|
+
// Parent child group
|
|
330
|
+
cy.findAllByLabelText('Parent 8')
|
|
331
|
+
.eq(0)
|
|
332
|
+
.within(() => {
|
|
333
|
+
cy.findAllByRole('table').should('have.length', 3)
|
|
334
|
+
|
|
335
|
+
// parent
|
|
336
|
+
cy.findAllByLabelText('Parent 8')
|
|
337
|
+
.eq(0)
|
|
338
|
+
.within(() => {
|
|
339
|
+
cy.findByRole('table').within(() => {
|
|
340
|
+
cy.findAllByRole('row').should('have.length', 4)
|
|
341
|
+
})
|
|
342
|
+
})
|
|
343
|
+
|
|
344
|
+
// child
|
|
345
|
+
cy.findAllByLabelText('Child Report')
|
|
346
|
+
.eq(0)
|
|
347
|
+
.within(() => {
|
|
348
|
+
cy.findByRole('table').within(() => {
|
|
349
|
+
cy.findAllByRole('row').should('have.length', 16)
|
|
350
|
+
})
|
|
351
|
+
})
|
|
352
|
+
|
|
353
|
+
// child 2
|
|
354
|
+
cy.findAllByLabelText('Child Report 2')
|
|
355
|
+
.eq(0)
|
|
356
|
+
.within(() => {
|
|
357
|
+
cy.findByRole('table').within(() => {
|
|
358
|
+
cy.findAllByRole('row').should('have.length', 16)
|
|
359
|
+
})
|
|
360
|
+
})
|
|
361
|
+
})
|
|
91
362
|
})
|
|
92
|
-
.filter((_idx, el) => [...el.querySelectorAll('td')].length === 2)
|
|
93
|
-
.should('have.length', 100)
|
|
94
363
|
})
|
|
95
364
|
})
|
|
96
365
|
})
|
|
@@ -40,15 +40,14 @@ var import_UserReports = require("../../../../../types/UserReports");
|
|
|
40
40
|
var import_ReportQuery = __toESM(require("../../../../../types/ReportQuery"));
|
|
41
41
|
var import_filtersTypeEnum = require("../../../../../components/_filters/filtersTypeEnum");
|
|
42
42
|
var import_definitionUtils = __toESM(require("../../../../../utils/definitionUtils"));
|
|
43
|
-
var import_utils = __toESM(require("../../../../../components/_reports/report-pagination/utils"));
|
|
44
|
-
var import_utils2 = __toESM(require("../../../../../components/_reports/report-totals/utils"));
|
|
43
|
+
var import_utils = __toESM(require("../../../../../components/_reports/report-page/report-template/report-pagination/utils"));
|
|
44
|
+
var import_utils2 = __toESM(require("../../../../../components/_reports/report-page/report-template/report-totals/utils"));
|
|
45
45
|
var import_utils3 = __toESM(require("../../../../../components/_filters/utils"));
|
|
46
|
-
var import_utils4 = __toESM(require("../../../../../components/_reports/report-columns-form/utils"));
|
|
47
|
-
var import_utils5 = __toESM(require("../../../../../components/_reports/report-actions/utils"));
|
|
46
|
+
var import_utils4 = __toESM(require("../../../../../components/_reports/report-heading/report-columns/report-columns-form/utils"));
|
|
47
|
+
var import_utils5 = __toESM(require("../../../../../components/_reports/report-heading/report-actions/utils"));
|
|
48
48
|
var import_utils6 = __toESM(require("../../../../../components/user-reports/utils"));
|
|
49
49
|
var import_localsHelper = __toESM(require("../../../../../utils/localsHelper"));
|
|
50
|
-
var import_utils7 = __toESM(require("../../../../../components/_reports/report-
|
|
51
|
-
var import_CollatedSummaryBuilder = __toESM(require("../../../../../utils/CollatedSummaryBuilder/CollatedSummaryBuilder"));
|
|
50
|
+
var import_utils7 = __toESM(require("../../../../../components/_reports/report-page/report-template/utils"));
|
|
52
51
|
const getData = async ({
|
|
53
52
|
res,
|
|
54
53
|
req,
|
|
@@ -198,7 +197,7 @@ const renderReport = async ({ req, res, services }) => {
|
|
|
198
197
|
token,
|
|
199
198
|
userId: dprUser.id
|
|
200
199
|
});
|
|
201
|
-
const dataTable = import_utils7.default.
|
|
200
|
+
const dataTable = import_utils7.default.createReportTemplateData(
|
|
202
201
|
definition,
|
|
203
202
|
columns,
|
|
204
203
|
reportData,
|
|
@@ -211,7 +210,6 @@ const renderReport = async ({ req, res, services }) => {
|
|
|
211
210
|
res,
|
|
212
211
|
services,
|
|
213
212
|
definition,
|
|
214
|
-
summariesData,
|
|
215
213
|
dataTable,
|
|
216
214
|
columns,
|
|
217
215
|
reportQuery,
|
|
@@ -232,7 +230,7 @@ const renderReport = async ({ req, res, services }) => {
|
|
|
232
230
|
}
|
|
233
231
|
return { renderData };
|
|
234
232
|
};
|
|
235
|
-
const getTemplateData = async (req, res, services, definition,
|
|
233
|
+
const getTemplateData = async (req, res, services, definition, dataTable, columns, reportQuery, requestData) => {
|
|
236
234
|
const { nestedBaseUrl } = import_localsHelper.default.getValues(res);
|
|
237
235
|
const url = (0, import_parseurl.default)(req);
|
|
238
236
|
if (!url) {
|
|
@@ -252,17 +250,12 @@ const getTemplateData = async (req, res, services, definition, summariesData, da
|
|
|
252
250
|
});
|
|
253
251
|
const features = await setFeatures(services, res, req, columns, definitionData, requestedData, urls);
|
|
254
252
|
const meta = setMetaData(res, req);
|
|
255
|
-
let reportSummaries;
|
|
256
|
-
if (summariesData.length) {
|
|
257
|
-
const collatedSummaryBuilder = new import_CollatedSummaryBuilder.default(specification, summariesData);
|
|
258
|
-
reportSummaries = collatedSummaryBuilder.collatePageSummaries();
|
|
259
|
-
}
|
|
260
253
|
let pagination;
|
|
261
254
|
let totals;
|
|
262
255
|
if (definitionData.template === "list") {
|
|
263
256
|
pagination = import_utils.default.getPaginationData(url, count, req);
|
|
264
257
|
const { pageSize, currentPage, totalRows } = pagination;
|
|
265
|
-
totals = import_utils2.default.getTotals(pageSize, currentPage, totalRows, dataTable
|
|
258
|
+
totals = import_utils2.default.getTotals(pageSize, currentPage, totalRows, dataTable.rowCount);
|
|
266
259
|
}
|
|
267
260
|
return {
|
|
268
261
|
...showColumns(specification) && { columns },
|
|
@@ -275,8 +268,7 @@ const getTemplateData = async (req, res, services, definition, summariesData, da
|
|
|
275
268
|
...requestedData,
|
|
276
269
|
...urls,
|
|
277
270
|
...pagination && { pagination },
|
|
278
|
-
...totals && { totals }
|
|
279
|
-
...reportSummaries && { reportSummaries }
|
|
271
|
+
...totals && { totals }
|
|
280
272
|
};
|
|
281
273
|
};
|
|
282
274
|
const showColumns = (specification) => {
|