Content
View differences
Updated by Andrej Sandorf almost 3 years ago
Currently there are tests for:
multiple work packages export job
[https://github.com/opf/openproject/blob/dev/spec/workers/work\_packages/exports/export\_job\_integration\_spec.rb](https://github.com/opf/openproject/blob/dev/spec/workers/work_packages/exports/export_job_integration_spec.rb)
single work package export
[https://github.com/opf/openproject/blob/dev/spec/controllers/work\_packages\_controller\_spec.rb#L279](https://github.com/opf/openproject/blob/dev/spec/controllers/work_packages_controller_spec.rb#L279)
markdown formatting
[https://github.com/opf/md-to-pdf/tree/main/spec](https://github.com/opf/md-to-pdf/tree/main/spec)
But no content tests in relation to the work package data (expect markdown)
## Content tests:
1. export pdf with test configuration
2. read with pdf-inspector gem
3. test for expected content
PDF Table
* Check if title as expected
* Check if all work packages are in the table
* Check if all selected columns are in the table
* Check if table is grouped, if enabled
* Check if sum row exists, if enabled
PDF Report
* Check if title as expected
* Index contains all work packages in the query
* Check if sum table exists, if enabled
* Check if sum table is grouped, if enabled
* Check there are detail sections for all work packages in the query
* Check if images are exported, if enabled
Detail Section (Single & Query Export)
* Check if title as expected
* Check if attributes table exists
* Check if description and all custom fields exist
multiple work packages export job
[https://github.com/opf/openproject/blob/dev/spec/workers/work\_packages/exports/export\_job\_integration\_spec.rb](https://github.com/opf/openproject/blob/dev/spec/workers/work_packages/exports/export_job_integration_spec.rb)
single work package export
[https://github.com/opf/openproject/blob/dev/spec/controllers/work\_packages\_controller\_spec.rb#L279](https://github.com/opf/openproject/blob/dev/spec/controllers/work_packages_controller_spec.rb#L279)
markdown formatting
[https://github.com/opf/md-to-pdf/tree/main/spec](https://github.com/opf/md-to-pdf/tree/main/spec)
But no content tests in relation to the work package data (expect markdown)
## Content tests:
1. export pdf with test configuration
2. read with pdf-inspector gem
3. test for expected content
PDF Table
* Check if title as expected
* Check if all work packages are in the table
* Check if all selected columns are in the table
* Check if table is grouped, if enabled
* Check if sum row exists, if enabled
PDF Report
* Check if title as expected
* Index contains all work packages in the query
* Check if sum table exists, if enabled
* Check if sum table is grouped, if enabled
* Check there are detail sections for all work packages in the query
* Check if images are exported, if enabled
Detail Section (Single & Query Export)
* Check if title as expected
* Check if attributes table exists
* Check if description and all custom fields exist