test(e2e): migrate docs validation to Vitest#5138
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
E2E Advisor RecommendationRequired E2E: Dispatch hint: Full advisor summaryE2E Recommendation AdvisorBase: Required E2E
Optional E2E
New E2E recommendations
Dispatch hint
|
E2E Scenario Advisor RecommendationRequired scenario E2E: Dispatch required scenario E2E:
Full scenario advisor summaryE2E Scenario AdvisorBase: Required scenario E2E
Optional scenario E2E
Relevant changed files
|
PR Review AdvisorFindings: 0 needs attention, 2 worth checking, 0 nice ideas Review findings🛠️ Needs attention
🔎 Worth checking
🌱 Nice ideas
Consider writing more tests for
Since last review detailsCurrent findings:
This is an automated advisory review. A human maintainer must make the final merge decision. |
|
✨ |
## Summary Add the simplest equivalent Vitest coverage for `test/e2e/test-docs-validation.sh` while keeping the legacy shell script in `test/e2e` for now. ## Related Issues Refs #5098 Refs #5138 ## Contract mapping - Legacy assertion: CLI/docs parity via `check-docs.sh --only-cli` - Replacement/bridge coverage: `test/e2e-scenario/live/docs-validation.test.ts` - Boundary preserved: real `npm run build:cli`, real `bin/nemoclaw.js`, real `check-docs.sh` - Legacy assertion: Markdown link validation with remote probes disabled in nightly - Replacement/bridge coverage: `check-docs.sh --only-links --local-only` from the Vitest test - Boundary preserved: real checkout-local markdown/link scanner - Legacy workflow lane: `docs-validation-e2e` in `nightly-e2e.yaml` - Replacement/bridge execution: same job name now runs targeted `e2e-scenarios-live` Vitest invocation - Legacy script file remains present in `test/e2e/`; deletion is deferred. ## Simplicity check - Test shape: simple live Vitest test for checkout-local docs checks - New shared helpers: none - New framework/registry/ledger: **none** - Workflow changes: update existing nightly lane and existing workflow contract test only to run the Vitest bridge coverage - Legacy script deletion: **none** ## Verification - `npm run build:cli` - `NEMOCLAW_RUN_E2E_SCENARIOS=1 npx vitest run --project e2e-scenarios-live test/e2e-scenario/live/docs-validation.test.ts --silent=false --reporter=default` - `npx vitest run --project cli test/e2e-script-workflow.test.ts --silent=false --reporter=default` - `npm run typecheck:cli` - `npm run test-size:check -- test/e2e-scenario/live/docs-validation.test.ts test/e2e-script-workflow.test.ts` - `git diff --check` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Tests** * Migrated documentation validation testing to use modern testing framework * Enhanced artifact retention and management for validation results * **Chores** * Updated CI/CD workflow for improved documentation and CLI consistency checks <!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
Closing as superseded by #5185. The docs-validation Vitest coverage and nightly lane update have already landed there, with the current migration policy of keeping the legacy shell file present for now and deferring deletion. #5098 now records test/e2e/test-docs-validation.sh as converted by #5185. Any remaining useful idea should come back as a fresh, focused follow-up against current main. |
Summary
Migrates the docs-validation E2E check from the legacy
test/e2eshell wrapper into a Vitest live scenario. The nightly docs-validation job now builds the checkout CLI, runs the scenario directly throughe2e-scenarios-live, and uploads fixture artifacts.Related Issue
Refs #4941
Changes
test/e2e-scenario/live/docs-validation.test.tswith CLI docs parity checks and local-only link validation.test/e2e/test-docs-validation.shinnightly-e2e.yamlwith direct Vitest execution and artifact upload.test/e2e-script-workflow.test.tsto lock the new workflow contract and keep the retired shell path out.Type of Change
Verification
npx prek run --all-filespassesnpm testpassesnpm run docsbuilds without warnings (doc changes only)Signed-off-by: Carlos Villela cvillela@nvidia.com