test: rich HTML report + API suite fixes for enriched v5 stack - #382
Open
aniket-shikhare-cstk wants to merge 1 commit into
Open
test: rich HTML report + API suite fixes for enriched v5 stack#382aniket-shikhare-cstk wants to merge 1 commit into
aniket-shikhare-cstk wants to merge 1 commit into
Conversation
Reporting: - Add request-capture plugin, assertion tracker, and a single-file HTML reporter that shows per-test SDK method, API request, copy-paste cURL, request/response, and Assertions Verified (expected vs actual) inline. Gated by ENABLE_HTTP_CAPTURE; tokens masked. Wired into jest config/setup. - Fix stale console-error suppression to match the current SDK message. Test fixes: - Reference specs use complex_all_fields fields (single_ref/multi_ref/self_ref). - Sync token assertions handle both no-change (stable) and change (advanced) cases. - Asset dimension asserts on an image asset; raise slow error-path test timeout. Bundlers: - run-with-report.sh: regenerate lockfile, surface install errors, fix counting. - Pin webpack to 5.108.0 (5.109 resolver regression with @ljharb transitive deps). .talismanrc: whitelist the 4 new/updated report+bundler files (false positives).
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Coverage report
Test suite run success708 tests passing in 35 suites. Report generated by 🧪jest coverage report action from a03561d |
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.
Summary
Adds a rich, self-contained HTML test report and reconciles the API suite with the enriched v5 test stack. No product/SDK source changes — test infrastructure, test-data expectations, and bundler tooling only.
Reporting
test/utils/request-capture-plugin.ts— aContentstackPlugincapturing each HTTP call's method, URL, copy-paste cURL, request/response headers, body, status, duration. Tokens (access/preview/management/live_preview) are masked.test/utils/assertion-tracker.ts— records every assertion (matcher, expected, actual, pass, negated) by wrapping the built-in matchers, powering an Assertions Verified (Expected vs Actual) section with no test changes.test/reporting/rich-html-reporter.cjs— single-file self-contained HTML report atreports/contentstack-delivery/html/index.html; prints the path at run end.jest.config.ts/jest.setup.ts; gated byENABLE_HTTP_CAPTURE(set intest:api/test:api:report).includeReference()validation noise is silenced (SDK message was reworded).Test fixes
complex_all_fieldsfields (single_ref/multi_ref/self_ref).pagination_token, realistic pagination bound, tolerant delta-perf threshold.include dimensionsasserts on an image asset; raised the slow error-path timeout for non-prod regions.Bundlers
run-with-report.sh: regenerate lockfile per run (avoids stale-lock npmextraneousbug with thefile:SDK dep), surface install errors, fix result counting.webpackto5.108.0(5.109.0resolver regression on@ljharb/*transitive deps).Notes
.env,reports/,test-results/are gitignored; changed files scanned for keys/tokens/UIDs (none)..talismanrcupdated to whitelist the 4 new report/bundler files (false positives on words likepass/key).