Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

1.6 KB
Raw Blame
@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


    @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