Swagger UI never renders, so two e2e/openapi.spec.js tests fail

Open
#183 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
playwright, rust

Research direction

Start with e2e/openapi.spec.js and capture the browser console plus the /swagger-ui/ response body while running npx playwright test e2e/openapi.spec.js in the described Linux aarch64 environment. Check whether the bundle fails because of an asset route, CSP, or JavaScript error, then trace the cause in the relevant server or test setup. Done when the Swagger UI renders and both failing tests pass, or an environment-specific failure is clearly identified and handled with an explanatory skip.

Written by the indexing model from the issue text.

Description

What happens

Two Playwright tests in e2e/openapi.spec.js fail: the Swagger UI never renders, so every assertion that depends on it times out.

e2e/openapi.spec.js:20:3 › OpenAPI docs › swagger UI renders the grouped endpoints
  Locator: locator('section.swagger-ui.swagger-container')
  Expected: visible
  Timeout: 5000ms
  Error: element(s) not found

e2e/openapi.spec.js:37:3 › OpenAPI docs › Try it out on GET /api/playlists returns 200
  Error: locator.click: Target page, context or browser has been closed

The third test in the file (openapi.json is a well-formed 3.1 spec with the expected paths) passes, so the server itself is fine — /api-docs/openapi.json is served and well formed. Only /swagger-ui/ fails to boot.

How to reproduce

npx playwright test e2e/openapi.spec.js
# 2 failed, 1 passed

It reproduces when the spec runs alone as well as inside the full suite, and it reproduces on unmodified main (verified by stashing a working tree and re-running the spec). utoipa-swagger-ui is configured with the vendored feature, so this is not a CDN/network fetch.

Environment it was seen in

A Linux aarch64 container (the repo's dev image lineage), Chromium installed from the Playwright lockfile, running against a scratch concert-web built by e2e/global-setup.js under a CARGO_TARGET_DIR on /tmp. Note the browser console output is not captured by the failing assertion, so the first question is why the Swagger UI bundle does not execute there — a blocked script load, a CSP header, or a JS error would all produce this symptom.

Why it matters

hurl/README.md and docs/playwright.md treat the Playwright suite as the compatibility gate for the JSON API surface. With these two failures, the suite cannot be green locally, so a real regression in the documented API has to be told apart from this known failure by hand.

Suggested next step

Capture the browser console and the /swagger-ui/ response body once, then decide whether this is an environment problem (e.g. a missing asset route or a CSP that only this deployment hits) or a genuine gap in the docs surface. If it turns out to be environmental, the spec should say so and skip with a message rather than failing the suite.

Dominant language
Rust
Stars
0
Forks
0
Avg merge
2h
Merged PRs (30d)
14

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from gregwebs/tiny-desk-splitter

All issues in gregwebs/tiny-desk-splitter

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.