How to best smoke test that redoc renders correctly?
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 25.9k
- Forks
- 2.4k
- Avg merge
- 13h 10m
- Merged PRs (30d)
- 4
Description
I have previously published updates that broke Redoc rendering (for example, due to an invalid schema reference). This gives the "an error occurred" screen with red text and a stack trace.
I'm therefore after a stable, simple check that verifies that Redoc manages to render anything at all. This would allow me to include smoke tests that verify that this does not happen. How can I best do this?
For example, I could check for the existence of an element with the redoc-wrap or api-content classes, but this may create brittle tests: I have no guarantee that these won't change in the future and therefore break my smoke tests even though it renders correctly.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test path is named. Start by reviewing Redoc's rendering smoke-test setup and the DOM around the redoc-wrap and api-content classes, comparing successful rendering with the "an error occurred" screen. Done means a stable check distinguishes rendered content from the error state without relying on brittle implementation classes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- documentation, testing-qa
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100