FD-881: Add local docs build runner and fix Cypress smoke tests#536
Open
KARSE22 wants to merge 6 commits into
Open
FD-881: Add local docs build runner and fix Cypress smoke tests#536KARSE22 wants to merge 6 commits into
KARSE22 wants to merge 6 commits into
Conversation
Replaces the `docsTest` script with a local build-and-serve flow so Cypress tests run against a freshly generated docs output instead of always hitting the deployed GitHub Pages URL. Introduces a `docsTest:deployed` script for explicit smoke tests against the live deployment. - Add scripts/run-docs-tests.js — builds docs to a temp dir, spins up a minimal HTTP server, runs Cypress against it, then cleans up - Add `visitDocs` custom Cypress command that intercepts Segment and Redocly scripts to keep failures tied to docs content rather than third-party flakes - Update `docsTest` to use the new runner; add `docsTest:deployed` for deployed smoke tests - Make `redoc` script accept REDOC_OUTPUT env var so the runner can redirect output to a temp file without touching docs/index.html - Fix `links_test`: update heading selector to use data-section-id attribute and h2 tag to match current Redocly output - Update `style_test`: rename stale test description, add new test for request-sample panel background color - Update README to document the new docsTest commands
Vulnerable Libraries (15)
More info on how to fix Vulnerable Libraries in JavaScript. 👉 Go to the dashboard for detailed results. 📥 Happy? Share your feedback with us. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Jira
FD-881
Description
Cypress smoke tests were running against the deployed GitHub Pages URL, meaning local changes couldn't be validated before pushing, and test failures could be caused by third-party script flakiness (Segment, Redocly CDN). This replaces
docsTestwith a local build-and-serve flow and adds adocsTest:deployedscript for explicit checks against the live deployment.Changes
scripts/run-docs-tests.js— builds docs to a temp dir vianpm run redoc, spins up a minimal HTTP server on a random port, runs Cypress against it, then cleans upcypress/support/commands.js— replaces boilerplate with avisitDocscustom command that intercepts Segment and Redocly CDN scripts so test failures reflect docs content, not third-party flakinesspackage.json—docsTestnow uses the new runner; newdocsTest:deployedtargets the GitHub Pages URL directly;redocscript acceptsREDOC_OUTPUTenv var so the runner can write to a temp file without touchingdocs/index.htmlcypress/e2e/links_test.cy.js— updated heading selector todata-section-id+h2to match current Redocly HTML outputcypress/e2e/style_test.cy.js— renamed stale test description; added test for request-sample panel background colorREADME.md— documents bothdocsTestanddocsTest:deployedcommandsRisk
Low — changes are limited to test infrastructure and npm scripts. No API spec, production code, or deployment configuration is affected.