Skip to content

FD-881: Add local docs build runner and fix Cypress smoke tests#536

Open
KARSE22 wants to merge 6 commits into
mainfrom
fix/FD-881
Open

FD-881: Add local docs build runner and fix Cypress smoke tests#536
KARSE22 wants to merge 6 commits into
mainfrom
fix/FD-881

Conversation

@KARSE22
Copy link
Copy Markdown
Contributor

@KARSE22 KARSE22 commented May 29, 2026

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 docsTest with a local build-and-serve flow and adds a docsTest:deployed script for explicit checks against the live deployment.

Changes

  • scripts/run-docs-tests.js — builds docs to a temp dir via npm run redoc, spins up a minimal HTTP server on a random port, runs Cypress against it, then cleans up
  • cypress/support/commands.js — replaces boilerplate with a visitDocs custom command that intercepts Segment and Redocly CDN scripts so test failures reflect docs content, not third-party flakiness
  • package.jsondocsTest now uses the new runner; new docsTest:deployed targets the GitHub Pages URL directly; redoc script accepts REDOC_OUTPUT env var so the runner can write to a temp file without touching docs/index.html
  • cypress/e2e/links_test.cy.js — updated heading selector to data-section-id + h2 to match current Redocly HTML output
  • cypress/e2e/style_test.cy.js — renamed stale test description; added test for request-sample panel background color
  • README.md — documents both docsTest and docsTest:deployed commands

Risk

Low — changes are limited to test infrastructure and npm scripts. No API spec, production code, or deployment configuration is affected.

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
@guardrails
Copy link
Copy Markdown

guardrails Bot commented May 29, 2026

⚠️ We detected 15 security issues in this pull request:

Vulnerable Libraries (15)
Severity Details
High pkg:npm/webpack@5.91.0 (t) upgrade to: 5.104.1
Informational pkg:npm/mini-css-extract-plugin@2.9.0 (t) upgrade to: > 2.9.0
High pkg:npm/webpack-cli@4.10.0 (t) upgrade to: > 4.10.0
Critical pkg:npm/@slack/web-api@6.12.0 (t) upgrade to: > 6.12.0
Critical pkg:npm/@stoplight/prism-cli@4.14.1 (t) upgrade to: > 4.14.1
High pkg:npm/openapi-to-postmanv2@3.2.1 (t) upgrade to: > 3.2.1
High pkg:npm/css-minimizer-webpack-plugin@4.2.2 (t) upgrade to: > 4.2.2
N/A pkg:npm/ajv@8.13.0 (t) upgrade to: 8.18.0
Medium pkg:npm/yaml@2.4.2 (t) upgrade to: 2.8.3,1.10.3
High pkg:npm/@actions/core@1.10.1 (t) upgrade to: > 1.10.1
Critical pkg:npm/sass@1.77.2 (t) upgrade to: > 1.77.2
Medium pkg:npm/css-loader@6.11.0 (t) upgrade to: > 6.11.0
Critical pkg:npm/@stoplight/spectral-cli@6.11.1 (t) upgrade to: > 6.11.1
High pkg:npm/ava@4.3.3 (t) upgrade to: > 4.3.3
High pkg:npm/webpack-dev-server@4.15.2 (t) upgrade to: 5.2.4

More info on how to fix Vulnerable Libraries in JavaScript.


👉 Go to the dashboard for detailed results.

📥 Happy? Share your feedback with us.

@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@KARSE22 KARSE22 marked this pull request as ready for review May 29, 2026 22:28
@KARSE22 KARSE22 requested a review from a team as a code owner May 29, 2026 22:28
@gemini-code-assist
Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant