Conversation
| Q | A |-----------------|----- | Branch? | 2.0 | Bug fix? | in behats | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | - | License | MIT <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Refactor** - Improved the accuracy of product detection in order details, ensuring a more reliable display of items in your orders. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
| Q | A |-----------------|----- | Branch? | 2.0 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Related tickets | fixes #17713, related #17685 | License | MIT The fix for collection items being substituted when removing an item from anywhere but the end of the collection and adding a new item has inadvertently caused a different bug to prop up, breaking the adding of multiple select product attributes due to their collection keys not being comparable. Curiously, we have an UI test for this exact case, but it seems to just ignore the exception popup and continue with other steps; Updated to check the saved values so we can be sure of the outcome.
WalkthroughThe changes introduce new Behat assertions and step definitions for verifying product attribute values in both API and UI contexts. A new regex transformation has been added to support an alternative input format for product attributes. Additionally, the approach for checking product presence on the admin order show page has been updated, and configuration files now include an extra transform context entry. Finally, a trait has been updated to encapsulate collection index calculation and to change a method’s visibility for broader access. Changes
Sequence Diagram(s)sequenceDiagram
participant Test as Behat Test
participant MAC as ManagingProductAttributesContext
participant TAC as ProductAttributeContext
Test->>MAC: Execute step for product attribute verification
MAC->>TAC: Transform attribute string using regex pattern
TAC-->>MAC: Return product attribute details
MAC->>Test: Confirm attribute values ("Banana Skin", "Plastic")
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (8)
⏰ Context from checks skipped due to timeout of 90000ms (4)
🔇 Additional comments (10)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
❌ Preview Environment deleted from BunnyshellAvailable commands:
|
This PR has been generated automatically.
For more details see upmerge_pr.yaml.
Remember! The upmerge should always be merged with using
Merge pull requestbutton.In case of conflicts, please resolve them manually with usign the following commands:
If you use other name for the upstream remote, please replace
upstreamwith the name of your remote pointing to theSylius/Syliusrepository.Once the conflicts are resolved, please run
git merge --continueand push the changes to this PR.Summary by CodeRabbit
New Features
Refactor