Repository navigation
CC-40714 Accept the unprefixed availableQuantity validation detail - #421
Merged
matweew merged 1 commit intoSep 29, 2026
Merged
Conversation
Some demoshops' spryker/api-platform validates productConfigurationInstance as its own top-level constraint tree rather than as a field nested under the request's attributes. Symfony's Collection validator then raises the availableQuantity violation with a property path relative to that tree, so TranslatingConstraintViolationListNormalizer::extractFieldName() (which keeps only the last `/`-delimited pointer segment) has no productConfigurationInstance segment left to carry, producing a flat `availableQuantity => ...` detail instead of either of the two shapes this test already tolerated. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 task
OKrivtsova
approved these changes
Sep 29, 2026
matweew
added a commit
to spryker-shop/b2b-demo-marketplace
that referenced
this pull request
Sep 29, 2026
…1411) * CC-40714 Point cypress-tests at the availableQuantity flaky-test fix Temporary branch pin so this shop picks up the fix ahead of it landing on spryker/cypress-tests master: spryker/cypress-tests#421 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * pin cypress to master --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
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.
Fix results: spryker-shop/b2b-demo-marketplace#1411
Summary
shopping-list-items-configurable-product.cy.tsflakes on b2b-demo-marketplace:should not add a configurable product to the shopping list with empty/string availableQuantityfails withAssertionError: expected response error details ["availableQuantity => This value should be of type numeric."] to contain every detail of one of [...].spryker/api-platformvalidatesproductConfigurationInstanceas its own top-level constraint tree (rather than as a field nested under the request'sattributes), Symfony'sCollectionvalidator raises theavailableQuantityviolation with a property path relative to that tree.TranslatingConstraintViolationListNormalizer::extractFieldName()keeps only the last/-delimited JSON-pointer segment, so there's noproductConfigurationInstancesegment left to carry — producing a flatavailableQuantity => ...detail instead of either of the two shapes this test already tolerated (the untyped leaf vs. the typed whole-object failure).acceptedDetailsfor both the empty and stringavailableQuantitycases, following the same tolerant pattern the test already uses for the untyped/typed split, and documents the mechanism in a comment.Confirmed on b2b-demo-marketplace CI (PHP8.5 MariaDB and PHP8.3 Postgres runs both hit the same flat detail): https://github.com/spryker-shop/b2b-demo-marketplace/actions/runs/36433949382 and https://github.com/spryker-shop/b2b-demo-marketplace/actions/runs/36435049549
Jira: https://spryker.atlassian.net/browse/CC-40714
Test plan
npx tsc --noEmitpasses (verified locally)npx prettier --checkpasses (verified locally)