-
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
Replace repetitive actions with Action Groups in AdminAddBundleItemsTest #34075
Replace repetitive actions with Action Groups in AdminAddBundleItemsTest #34075
Conversation
Hi @kate-kyzyma. 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. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
@magento run all tests |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests EE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
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 @kate-kyzyma
Thanks for your work.
Please check my comments
<grabValueFrom selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity('0', '0')}}" stepKey="grabbedFirstBundleOptionQuantity"/> | ||
<assertEquals stepKey="assertFirstBundleOptionDefaultQuantity"> | ||
<expectedResult type="string">1</expectedResult> | ||
<expectedResult type="string">50</expectedResult> |
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 looks little bit strange that PR that replace mftf test with action groups contain expectation of different value.
Could you please explain why expected result changed from 1 to 50?
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, @Den4ik!
As you may see I use existing ActionGroup here - AddBundleOptionWithTwoProductsActionGroup. Unfortunately, this ActionGroup doesn't allow us to set specific product qty. We have prefiled value - 50.
Code from ActionGroup - AddBundleOptionWithTwoProductsActionGroup:
<fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity(x, '0')}}" userInput="50" stepKey="fillQuantity1"/> <fillField selector="{{AdminProductFormBundleSection.bundleOptionXProductYQuantity(x, '1')}}" userInput="50" stepKey="fillQuantity2"/>
That's why I changed product qty to 50 in the test. As I may see it is not critical for the test.
If you think it is bad idea, I will try to find some other actions groups to modify the test code.
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.
@kate-kyzyma Thanks for the answer. No all clear for me and looks good
Hi @Den4ik, thank you for the review.
|
@sidolov Please assign priority to this PR |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
2 similar comments
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Hi @eduard13, thank you for the review. |
Description (*)
Related Pull Requests
Fixed Issues (if relevant)
Test is refactored according to the best practices followed by MFTF.
Manual testing scenarios (*)
Questions or comments
Contribution checklist (*)
Resolved issues: