Skip to content

Fix Downloadable product after refund - #28413

Merged
magento-engcom-team merged 21 commits into
magento:2.4-developfrom
ProkopovVitaliy:fix-28388
Sep 2, 2020
Merged

Fix Downloadable product after refund#28413
magento-engcom-team merged 21 commits into
magento:2.4-developfrom
ProkopovVitaliy:fix-28388

Conversation

@ProkopovVitaliy

Copy link
Copy Markdown
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

m2-assistant Bot commented May 28, 2020

Copy link
Copy Markdown

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
Copy Markdown
Contributor Author

@magento run all tests

@ProkopovVitaliy

Copy link
Copy Markdown
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

@VladimirZaets VladimirZaets left a comment

Copy link
Copy Markdown
Contributor

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?

@engcom-Kilo

Copy link
Copy Markdown
Contributor

@magento run all tests

@ProkopovVitaliy

Copy link
Copy Markdown
Contributor Author

@magento run Functional Tests EE

@engcom-Kilo

Copy link
Copy Markdown
Contributor

Working with MFTF test.

@engcom-Kilo

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

@magento run Unit Tests

@ProkopovVitaliy

Copy link
Copy Markdown
Contributor Author

@magento run Functional Tests B2B

@ghost ghost removed the Progress: needs update label Jun 12, 2020
@engcom-Kilo

Copy link
Copy Markdown
Contributor

@magento run Functional Tests CE

@engcom-Kilo

Copy link
Copy Markdown
Contributor

@magento run Functional Tests B2B

@engcom-Kilo

Copy link
Copy Markdown
Contributor

@magento run all tests

);

$this->itemsFactory->expects($this->once())
$this->itemsFactory->expects($this->any())

Copy link
Copy Markdown
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.

->setMethods(['addFieldToFilter'])
->getMock();
$linkItemCollection->expects($this->once())
$linkItemCollection->expects($this->any())

Copy link
Copy Markdown
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
Copy Markdown
Contributor

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

@engcom-Alfa

Copy link
Copy Markdown
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

@m2-assistant

m2-assistant Bot commented Sep 2, 2020

Copy link
Copy Markdown

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.

@sdzhepa sdzhepa mentioned this pull request Jun 22, 2021
5 tasks
altdovydas pushed a commit to altdovydas/magento2 that referenced this pull request Aug 6, 2026
Accepted Community Pull Requests:
 - magento#29799: Add elasticsearch params to integration tests config (by @ihor-sviziev)
 - magento#29634: [MFTF] Added some ActionGroups to Analytics module (by @Usik2203)
 - magento#29348: [MFTF] Test scenario for "Apply shopping cart rule to a single bundle item" (magento#28921) (by @zhartaunik)
 - magento#28413: Fix Downloadable product after refund (by @ProkopovVitaliy)
 - magento#27609: Test coverage for PR magento#27357 (E-mail templates) (by @lbajsarowicz)
 - magento#27579: Fix magento#27523: throw informative errors in setup:db:generate-patch (by @korostii)


Fixed GitHub Issues:
 - magento#29648: [Issue] [MFTF] Added some ActionGroups to Analytics module (reported by @m2-assistant[bot]) has been fixed in magento#29634 by @Usik2203 in 2.4-develop branch
   Related commits:
     1. f54fd86
     2. 1492668
     3. 59d5d32
     4. 8c2291f
     5. e25fc55

 - magento#28921: Apply shopping cart rule to a single bundle item (reported by @MilanFrajt) has been fixed in magento#29348 by @zhartaunik in 2.4-develop branch
   Related commits:
     1. e6aca3b
     2. 7abc82f

 - magento#28388: Downloadable product is available in My Download Products tab after it has been partially refunded  (reported by @YaninaPrudnikova) has been fixed in magento#28413 by @ProkopovVitaliy in 2.4-develop branch
   Related commits:
     1. a6f460d
     2. 9a83830
     3. 96c9d54
     4. 59cf9f7
     5. c6c3231
     6. eafdb17
     7. 92fd06b
     8. 1f7eace
     9. db84d3a
     10. d0a0962
     11. aea9276
     12. 1be2cd7
     13. dee9b16
     14. a49709f
     15. 8023f42
     16. 9e31246
     17. d91b305
     18. 62e4866
     19. 97df424
     20. 2d58988
     21. 87d8984

 - magento#27523: CLI Patch Generator: Lack of information what path cannot be created (reported by @lbajsarowicz) has been fixed in magento#27579 by @korostii in 2.4-develop branch
   Related commits:
     1. 1e8e825
     2. 1dd5290
     3. c1d8fef
     4. a74f8fe
     5. f48cd50
     6. 2bc691a
     7. 8991733
     8. 347602f
     9. 75bb2c3
     10. 7d316d4
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

Archived in project

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

9 participants