fix(postman): hardcode language_id=1 on page-related Postman tests (#35780)#35818
fix(postman): hardcode language_id=1 on page-related Postman tests (#35780)#35818dsolistorres wants to merge 2 commits into
Conversation
…35780) The Variants tests in Experiments_Resource fire POST /api/v1/page/{id}/content without a language query param. Server-side PageResourceHelper.getPage() resolves the lookup language via WebAPILocator.getLanguageWebAPI().getLanguage(request) which falls back to APILocator.getLanguageAPI().getDefaultLanguage() — the LANG__404 sentinel (id=-1) in fresh test environments. The page was created earlier in the flow with languageId=1, so the (id, -1) lookup misses and the server returns HTTPPageAssetNotFoundException -> 404. Failure observed in run 26312707306: ERROR page.PageResource - HTMLPageAssetNotFoundException on PageResource.addContent, pageId: f41ac5d4f5a2e854e1d79ea6ca39df27 ... inside "Variants / Keep Content after change Layout to a Specific Variant / Add contetlet into DEFAULT variant" Adds `?language_id=1` (or `&language_id=1` when a query already exists) to the 5 URLs that target page-content endpoints without specifying language. Matches the test data — all relevant pages are created with languageId=1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Claude finished @dsolistorres's task in 1m 34s —— View job ReviewLooks clean. Surgical test-data fix, consistent with the #35780 pattern. Checks performed
Worth a second look
No security, correctness, or design concerns. JSON structure is intact. |
… body Same root cause as the Experiments fixes in this PR — PUT /api/v1/workflow/actions/default/fire/PUBLISH without a languageId in the body lets the server fall back to getDefaultLanguage() (LANG__404 sentinel id=-1 in fresh test envs), which then FK-fails on contentlet insert. Single failing test in CI: "Live page cache invalidation / Create Test Page". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Folded in another instance of the same root cause spotted in CI run 26312707306 — Added |
Summary
Same
language=-1class of failure as #35780, surfacing inExperiments_Resource.postman_collection.jsonthis time. CI run 26312707306 hit:Server-side diagnosis
PageResourceHelper.getPage()looks the page up via:getLanguage(request)falls back togetDefaultLanguage()when no language is on the request — and in this test env that returns theLANG__404sentinel (id=-1). The page was created in the previous step withlanguageId=1(verified in the test bodies), so the(id, -1)lookup misses and the server returns 404.Fix
Add
language_id=1to the 5 URLs that target page-content endpoints without specifying language. All affected pages are created earlier in the flow withlanguageId=1(English), so hardcoding1matches the test data exactly — no need for the_getdefaultresolver dance here.Patched URLs:
Add contetlet into DEFAULT variantAdd Contentlet into a specific variant(already hadvariantName, now alsolanguage_id)Add contetlet into DEFAULT variantAdd Another Contentlet into a DEFAULTvariantAdd contetlet into DEFAULT variantDiff
+33 / −5— surgical text patches that preserve the file's mixed inline/multi-line array style. Each patched URL got?language_id=1(or&language_id=1) inrawplus a matchingqueryarray entry, consistent with the other URLs in this collection that already specify query params (e.g.variantName).Test plan
PR Test / Postman Tests - Experimentshould now pass.🤖 Generated with Claude Code