-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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 #14080 Added improvements to Category repository (save method) #27304
FIX #14080 Added improvements to Category repository (save method) #27304
Conversation
Hi @sergiy-v. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Related PR #27291 |
@magento run all tests |
@magento run all tests |
@eduard13 PR is ready to review, the functional tests errors are not related to the changes. |
Hi @lbajsarowicz, thank you for the review.
|
@sergiy-v I really like the fact that you covered that change with MFTF tests. However (!) I'm not sure if it's the best approach to cover that kind of change. What I mean is that in this specific case Integration Tests would give cleaner overview what is happening under the hood. Thanks once again for well-done Functional Test. |
@lbajsarowicz Thanks for your thoughts, will keep it in mind next time) |
Hi @eduard13, thank you for the review.
|
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, @sergiy-v
During testing, we faced the issue.
Problem: The category is saved with the wrong url_path
Manual testing scenario:
1. Create any category on the second level (with parent_id =2).
Name: Test category 1, Url key: test-category-1.
2. Create subcategory in "Test category 2" with level = 2 by rest api:
/V1/categories
{
"category": {
"name": "Test category 2",
"parent_id":"3", /* Test category 1 */
"is_active":"true",
"include_in_menu": true,
"level":"2",
"custom_attributes": [{ "attribute_code": "url_key", "value": "test-category-2" }]
}
}
Actual Result:
✖️ Now we have the url_key: "test-category-2" and path: "test-category-2"
Expected Result:
✔️ The url_path should be "/test-category-1/test-category-2"
3. Change the URL key of the Test category 2 either in the backend or via the api to something like "test-category-2-changed"
Actual Result:
✖️ Category "Test category 2" has attribute values:
url_key: "test-category-2-changed"
url_path: "test-category-2-changed"
Or Am I wrong?
@sergiy-v Could you take a look?
Thanks!
@sergiy-v Thank you for the clarification! |
@lbajsarowicz @eduard13 Could you approve again? |
Hi @eduard13, thank you for the review. |
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.
✔️ Thank you for your contribution.
Hi @lbajsarowicz, thank you for the review. |
Failed functional tests not related to the changes in this PR |
Hi @sergiy-v, thank you for your contribution! |
Description
Added improvements to category repository (save method) to fix level issue.
Fixed Issues (if relevant)
#14080
Manual testing scenarios
See #14080 issue description for details.
Contribution checklist