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

AC-13325 Issue#39347 grouped product qty validation issue fix #39377

Conversation

Mohamed-Asar
Copy link
Contributor

Description (*)

Fix for Grouped Product Quantity Validation Displays Errors for All Inputs When One Input Is Invalid

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Grouped Product Quantity Validation Displays Errors for All Inputs When One Input Is Invalid #39347

Manual testing scenarios (*)

  1. Go to grouped product PDP
  2. Add invalid qty in any one of the simple product qty input
  3. Verify the error message display below only invalid qty textbox.

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)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

Copy link

m2-assistant bot commented Nov 17, 2024

Hi @Mohamed-Asar. Thank you for your contribution!
Here are some useful tips on how you can test your changes using Magento test environment.
❗ 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
  13. Semantic Version Checker

You can find more information about the builds here
ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.


For more details, review the Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-github-services m2-github-services added Partner: Ziffity partners-contribution Pull Request is created by Magento Partner labels Nov 17, 2024
@m2-community-project m2-community-project bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Nov 17, 2024
@Mohamed-Asar
Copy link
Contributor Author

@magento run all tests

@Mohamed-Asar
Copy link
Contributor Author

@magento run Static Tests, Functional Tests B2B

@engcom-Hotel engcom-Hotel self-requested a review November 29, 2024 12:14
Copy link
Contributor

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Mohamed-Asar,

Thanks for your contribution!

It seems the issue has been fixed already. We request you to please look into this #39347 (comment).

Thanks

@Mohamed-Asar
Copy link
Contributor Author

Hello @engcom-Hotel ,

No, Still the issue exists on the latest 2.4-develop, i verified in my local env

image

Copy link
Contributor

@engcom-Hotel engcom-Hotel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @Mohamed-Asar,

Thanks for the contribution!

Please cover the PR changes with some automated tests in accordance with DOD and also please fix the build failures.

Thanks

@Mohamed-Asar
Copy link
Contributor Author

@engcom-Hotel Do i need to add MFTF ? or Jasmine test case ? and also i don't know see any build failure related to this PR, could you please let me know, what are the build failure regarding this PR ?

@engcom-Hotel
Copy link
Contributor

Hello @Mohamed-Asar,

I would suggest you add an MFTF to verify the code changes.

for build failures lets try to re-run the tests, they might be flaky.

Thanks

@engcom-Hotel
Copy link
Contributor

@magento run all tests

@engcom-Hotel
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE, Functional Tests EE, Static Tests, Unit Tests

@engcom-Hotel
Copy link
Contributor

@magento run Functional Tests EE, Static Tests

1 similar comment
@engcom-Hotel
Copy link
Contributor

@magento run Functional Tests EE, Static Tests

@engcom-Bravo
Copy link
Contributor

@magento run all tests

@engcom-Bravo
Copy link
Contributor

Hi @Mohamed-Asar,

Thanks for the collaboration & contribution!

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Steps to reproduce

  • Go to grouped product PDP
  • Add invalid qty in any one of the simple product qty input
  • Verify the error message display below only invalid qty textbox.

Before: ✖️ 

Grouppp-12-20-2024_09_22_AM

After: ✔️

Grouppp-12-20-2024_09_33_AM

Builds are failed. Hence, moving this PR to Extended Testing.

Thanks.

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests EE, Integration Tests, Static Tests

@engcom-Charlie
Copy link
Contributor

@magento run all tests

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE, Functional Tests CE, Static Tests

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Dec 24, 2024

The Static test failure does not show any error in the Allure report. I checked the Jenkin build's console output; the error is a known issue. It's not part of the PR.
https://jira.corp.adobe.com/browse/AC-13542

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Dec 30, 2024

Hi @Mohamed-Asar,

Thank you for your contribution!

It seems that, the mentioned issue has been recently resolved in 56463d5 under internal JIRA https://jira.corp.adobe.com/browse/ACP2E-3469

It's not reproducible now, hence closing it now. Please feel free to reopen for any further updates.

image

@Mohamed-Asar
Copy link
Contributor Author

Mohamed-Asar commented Dec 30, 2024

@engcom-Charlie @engcom-Hotel ,

This is the third time that both the internal team and I have worked on the same issue. Is there a way to avoid this duplication so that I don’t waste time on redundant efforts?

Regarding the code, I reviewed the commit on this line and noticed that the .each function is unnecessary because it loops through all the simple product inputs for every single product. Instead, we should only check the current one, as I’ve implemented in my changes.

If a grouped product contains 10 simple products, the quantity input for each simple product is validated 10 times instead of just once.

Please refer to the screenshot below for verification in the 2.4-develop branch.

image

vs my branch

image

@Mohamed-Asar
Copy link
Contributor Author

@engcom-Charlie @engcom-Hotel ,

This is the third time that both the internal team and I have worked on the same issue. Is there a way to avoid this duplication so that I don’t waste time on redundant efforts?

Regarding the code, I reviewed the commit on this line and noticed that the .each function is unnecessary because it loops through all the simple product inputs for every single product. Instead, we should only check the current one, as I’ve implemented in my changes.

If a grouped product contains 10 simple products, the quantity input for each simple product is validated 10 times instead of just once.

Please refer to the screenshot below for verification in the 2.4-develop branch.

image

vs my branch

image

@engcom-Hotel @engcom-Charlie did you get a chance to review this comment ?

@Mohamed-Asar
Copy link
Contributor Author

@engcom-Hotel @engcom-Charlie did you get a chance to review the last comment ?

@engcom-Charlie
Copy link
Contributor

Hi @Mohamed-Asar,

Thank you for your contribution!!

Regarding your query on internal team's PR implementation here, we have reached out to the reviewer and following up with the team. Once we get any information on this, we will keep you posted.

Thank you!

@Mohamed-Asar
Copy link
Contributor Author

Hi @engcom-Charlie,
Thanks! Looking forward for your response

@Mohamed-Asar
Copy link
Contributor Author

@engcom-Charlie is there any update from internal team ? if no update then please re-open the pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Ziffity partners-contribution Pull Request is created by Magento Partner Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Project: Community Picked PRs upvoted by the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Grouped Product Quantity Validation Displays Errors for All Inputs When One Input Is Invalid
6 participants