Skip to content
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

Merged
merged 21 commits into from
Sep 2, 2020
Merged

Fix Downloadable product after refund #28413

merged 21 commits into from
Sep 2, 2020

Conversation

ProkopovVitaliy
Copy link
Contributor

Description (*)

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Downloadable product is available in My Download Products tab after it has been partially refunded  #28388. Downloadable product is available in My Download Products tab after it has been partially refunded

Manual testing scenarios (*)

  1. Create order with a download product and a product, requiring shipping, (e.g. simple product) is created.
  2. The downloadable product is available in My Downloadable Products tab.
  3. Open this order page in Admin.
  4. Perform a partial refund for the downloadable product (the other product is not refunded).
  5. Go to My Downloadable Products tab.

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented May 28, 2020

Hi @ProkopovVitaliy. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests

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.

@ProkopovVitaliy
Copy link
Contributor Author

@magento run all tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run all tests

@ghost ghost added Severity: S1 Affects critical data or functionality and forces users to employ a workaround. Priority: P2 A defect with this priority could have functionality issues which are not to expectations. labels Jun 1, 2020
Copy link
Contributor

@VladimirZaets VladimirZaets left a 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?

@ghost ghost moved this from Pending Review to Changes Requested in Pull Requests Dashboard Jun 3, 2020
@ghost ghost assigned VladimirZaets Jun 3, 2020
@engcom-Kilo engcom-Kilo self-assigned this Jun 9, 2020
@engcom-Kilo
Copy link
Contributor

@magento run all tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run Functional Tests EE

@engcom-Kilo
Copy link
Contributor

Working with MFTF test.

@engcom-Kilo
Copy link
Contributor

@magento run all tests

@engcom-Kilo engcom-Kilo added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Jun 10, 2020
@ProkopovVitaliy
Copy link
Contributor Author

@magento run Unit Tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run Functional Tests B2B

@lenaorobei lenaorobei moved this from Changes Requested to Pending Review in Pull Requests Dashboard Aug 19, 2020
@@ -189,7 +189,7 @@ public function testSetLinkStatusPending($orderState, array $orderStateMapping)
]
);

$this->itemsFactory->expects($this->once())
$this->itemsFactory->expects($this->any())
Copy link
Contributor

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())
Copy link
Contributor

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.

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-7679 has been created to process this Pull Request

@engcom-Kilo engcom-Kilo removed their assignment Aug 25, 2020
@engcom-Alfa engcom-Alfa moved this from Ready for Testing to Testing in Progress in Pull Requests Dashboard Aug 31, 2020
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Preconditions:

  1. Has a Simple product;
  2. Has a Downloadable product;
  3. Has a customer in Storefront;

Manual testing scenario:

  1. Create order with a download product and a product, requiring shipping, (e.g. simple product) is created;

  2. Create a full invoice for the order;

  3. Perform a partial refund (credit memo) for the downloadable product (the other product is not refunded).

Screenshot from 2020-06-16 13-27-21

  1. Go to Storefront-> My Account -> My Downloadable Products again

Before: ✖️ After a refund, the Downloadable product still can be downloaded.

123

After: ✔️ The Downloadable product cannot be downloaded.

2020-08-31_10-30

Also tested with different stores, combinations with different types of products

@engcom-Alfa engcom-Alfa moved this from Testing in Progress to Extended Testing (optional) in Pull Requests Dashboard Aug 31, 2020
@engcom-Charlie engcom-Charlie self-assigned this Aug 31, 2020
@engcom-Charlie engcom-Charlie moved this from Extended Testing (optional) to Merge in Progress in Pull Requests Dashboard Aug 31, 2020
@magento-engcom-team magento-engcom-team merged commit ed6c29f into magento:2.4-develop Sep 2, 2020
@m2-assistant
Copy link

m2-assistant bot commented Sep 2, 2020

Hi @ProkopovVitaliy, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@ghost ghost moved this from Merge in Progress to Recently Merged in Pull Requests Dashboard Sep 2, 2020
@sdzhepa sdzhepa mentioned this pull request Jun 22, 2021
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Catalog Component: Customer Component: Downloadable Component: Wishlist Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S1 Affects critical data or functionality and forces users to employ a workaround.
Projects
Pull Requests Dashboard
  
Recently Merged
Development

Successfully merging this pull request may close these issues.

Downloadable product is available in My Download Products tab after it has been partially refunded
8 participants