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.
135 lines
5.3 KiB
Gherkin
135 lines
5.3 KiB
Gherkin
@info @config
|
|
Feature: Config, info and UI-data read APIs
|
|
|
|
# Cheap read-only JSON endpoints behind the frontend and admin surfaces.
|
|
|
|
@app-config @positive
|
|
Scenario: app-config returns the frontend configuration
|
|
When I send a GET request to "/api/v1/config/app-config"
|
|
And this operation is run 5 times in parallel
|
|
Then the response status code should be 200
|
|
And the response content type should be "application/json"
|
|
|
|
|
|
@endpoints-availability @positive
|
|
Scenario: endpoints-availability reports per-endpoint availability
|
|
When I send a GET request to "/api/v1/config/endpoints-availability"
|
|
And this operation is run 5 times in parallel
|
|
Then the response status code should be 200
|
|
And the response content type should be "application/json"
|
|
|
|
|
|
@endpoints-enabled @positive
|
|
Scenario: endpoints-enabled reports the status of a named endpoint
|
|
When I send a GET request to "/api/v1/config/endpoints-enabled" with parameters
|
|
| parameter | value |
|
|
| endpoints | merge-pdfs |
|
|
Then the response status code should be 200
|
|
And the response content type should be "application/json"
|
|
|
|
|
|
@endpoints-enabled @negative
|
|
Scenario: endpoints-enabled without the endpoints parameter returns 400
|
|
When I send a GET request to "/api/v1/config/endpoints-enabled"
|
|
Then the response status code should be 400
|
|
|
|
|
|
@login-disclaimer @positive
|
|
Scenario: login-disclaimer returns its configuration
|
|
When I send a GET request to "/api/v1/config/login-disclaimer"
|
|
Then the response status code should be 200
|
|
And the response JSON field "enabled" should be false
|
|
|
|
|
|
@health @positive
|
|
Scenario: info health reports the running version
|
|
When I send a GET request to "/api/v1/info/health"
|
|
And this operation is run 5 times in parallel
|
|
Then the response status code should be 200
|
|
And the response JSON field "status" should equal "UP"
|
|
And the response JSON field "version" should not be empty
|
|
|
|
|
|
@metrics @positive
|
|
Scenario Outline: metrics endpoints return a numeric aggregate
|
|
When I send a GET request to "<endpoint>"
|
|
Then the response status code should be 200
|
|
And the response content type should be "application/json"
|
|
And the response should match the regex "^[0-9.]+$"
|
|
|
|
Examples:
|
|
| endpoint |
|
|
| /api/v1/info/load/unique |
|
|
| /api/v1/info/requests/unique |
|
|
|
|
|
|
@metrics @positive
|
|
Scenario Outline: metrics list endpoints return a JSON list
|
|
When I send a GET request to "<endpoint>"
|
|
And this operation is run 5 times in parallel
|
|
Then the response status code should be 200
|
|
And the response JSON should be a list
|
|
|
|
Examples:
|
|
| endpoint |
|
|
| /api/v1/info/load/all/unique |
|
|
| /api/v1/info/requests/all/unique |
|
|
|
|
|
|
@metrics @positive
|
|
Scenario: weekly active users reports tracking metadata
|
|
When I send a GET request to "/api/v1/info/wau"
|
|
Then the response status code should be 200
|
|
And the response JSON field "trackingSince" should not be empty
|
|
|
|
|
|
@settings @positive
|
|
Scenario: get-endpoints-status returns the endpoint toggle map
|
|
When I send a GET request to "/api/v1/settings/get-endpoints-status"
|
|
And this operation is run 5 times in parallel
|
|
Then the response status code should be 200
|
|
And the response content type should be "application/json"
|
|
|
|
|
|
@ui-data @positive
|
|
Scenario Outline: UI data endpoints return JSON for the frontend
|
|
When I send a GET request to "<endpoint>"
|
|
Then the response status code should be 200
|
|
And the response content type should be "application/json"
|
|
|
|
Examples:
|
|
| endpoint |
|
|
| /api/v1/ui-data/footer-info |
|
|
| /api/v1/ui-data/home |
|
|
| /api/v1/ui-data/licenses |
|
|
| /api/v1/ui-data/pipeline |
|
|
|
|
|
|
@ui-data @positive
|
|
Scenario: OCR UI data lists the installed tesseract languages
|
|
When I send a GET request to "/api/v1/ui-data/ocr-pdf"
|
|
Then the response status code should be 200
|
|
And the response JSON field "languages" should be a list
|
|
|
|
|
|
@ui-data @positive
|
|
Scenario: Sign UI data lists the available signature fonts
|
|
When I send a GET request to "/api/v1/ui-data/sign"
|
|
Then the response status code should be 200
|
|
And the response JSON field "fonts" should be a list
|
|
|
|
|
|
@hardware-signing @positive
|
|
Scenario: Hardware signing capabilities are reported for the server build
|
|
When I send a GET request to "/api/v1/security/cert-sign/hardware/capabilities"
|
|
And this operation is run 5 times in parallel
|
|
Then the response status code should be 200
|
|
And the response JSON field "desktop" should be false
|
|
|
|
|
|
@hardware-signing @negative
|
|
Scenario: Windows certificate store is rejected outside the desktop app
|
|
When I send a GET request to "/api/v1/security/cert-sign/hardware/windows-certificates"
|
|
Then the response status code should be 400
|
|
And the response JSON error should contain "desktop"
|