-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Fix Downloadable product after refund #28413
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Downloadable product after refund #28413
Conversation
Hi @ProkopovVitaliy. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. |
@magento run all tests |
@magento run all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @ProkopovVitaliy. Thanks for collaboration. Can you please fix failed tests? Also, can you please cover this functionality by functional or integration tests?
@magento run all tests |
@magento run Functional Tests EE |
Working with MFTF test. |
@magento run all tests |
@magento run Unit Tests |
@magento run Functional Tests B2B |
@magento run Functional Tests CE |
@magento run Functional Tests B2B |
@magento run all tests |
@@ -189,7 +189,7 @@ public function testSetLinkStatusPending($orderState, array $orderStateMapping) | |||
] | |||
); | |||
|
|||
$this->itemsFactory->expects($this->once()) | |||
$this->itemsFactory->expects($this->any()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to use atLeastOnce instead.
@@ -390,7 +524,7 @@ private function createLinkItemCollection(array $expectedOrderItemIds, array $it | |||
->disableOriginalConstructor() | |||
->setMethods(['addFieldToFilter']) | |||
->getMock(); | |||
$linkItemCollection->expects($this->once()) | |||
$linkItemCollection->expects($this->any()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to use atLeastOnce instead.
Hi @sidolov, thank you for the review. |
✔️ QA Passed Preconditions:
Manual testing scenario:
Before: ✖️ After a refund, the Downloadable product still can be downloaded. After: ✔️ The Downloadable product cannot be downloaded. Also tested with different stores, combinations with different types of products |
Hi @ProkopovVitaliy, thank you for your contribution! |
Description (*)
Related Pull Requests
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)