mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2026-09-02 21:03:34 +03:00
# Description of Changes cucumber tests to run multiple threads of commands at same time --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### Translations (if applicable) - [ ] I ran [`scripts/counter_translation.py`](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/docs/counter_translation.md) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have run `task check` to verify linters, typechecks, and tests pass - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/DeveloperGuide.md#7-testing) for more details.
54 lines
2.4 KiB
Gherkin
54 lines
2.4 KiB
Gherkin
@nightly @convert
|
|
Feature: Heavy conversion endpoints
|
|
|
|
# Too slow for every PR: these shell out to LibreOffice, Calibre or Ghostscript.
|
|
# behave.ini excludes @nightly; the nightly job opts back in with --tags=@nightly.
|
|
|
|
@pdf-to-xlsx @positive
|
|
Scenario: Convert a PDF containing tables to XLSX
|
|
Given I use an example file at "exampleFiles/tables.pdf" as parameter "fileInput"
|
|
When I send the API request to the endpoint "/api/v1/convert/pdf/xlsx"
|
|
And this operation is run 3 times in parallel
|
|
Then the response status code should be 200
|
|
And the response file should have size greater than 1000
|
|
And the response file should have extension ".xlsx"
|
|
|
|
|
|
@pdf-to-xlsx @positive
|
|
Scenario: A PDF with no tables converts without producing a spreadsheet
|
|
Given I generate a PDF file as "fileInput"
|
|
And the pdf contains 2 pages with random text
|
|
When I send the API request to the endpoint "/api/v1/convert/pdf/xlsx"
|
|
Then the response status code should be 204
|
|
|
|
|
|
@text-editor @positive
|
|
Scenario: text-editor metadata describes the document for the editor
|
|
Given I use an example file at "exampleFiles/tables.pdf" as parameter "fileInput"
|
|
When I send the API request to the endpoint "/api/v1/convert/pdf/text-editor/metadata"
|
|
And this operation is run 3 times in parallel
|
|
Then the response status code should be 200
|
|
And the response content type should be "application/json"
|
|
And the response JSON field "fonts" should not be empty
|
|
|
|
|
|
@vector @negative
|
|
Scenario: vector conversion rejects an input format Ghostscript cannot read
|
|
Given I generate an SVG file as "fileInput"
|
|
When I send the API request to the endpoint "/api/v1/convert/vector/pdf"
|
|
Then the response status code should be 400
|
|
And the response JSON error should contain "Unsupported"
|
|
|
|
|
|
@ebook @positive
|
|
Scenario: An EPUB produced by Stirling converts back to PDF
|
|
Given I generate a PDF file as "fileInput"
|
|
And the pdf contains 3 pages with random text
|
|
And the request data includes
|
|
| parameter | value |
|
|
| outputFormat | EPUB |
|
|
When I send the API request to the endpoint "/api/v1/convert/pdf/epub"
|
|
And this operation is run 3 times in parallel
|
|
Then the response status code should be 200
|
|
And the response file should have size greater than 200
|