Skip to content

MFTF: Checkout With Enabled Captcha #32986

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

Merged

Conversation

DmitryTsymbal
Copy link
Contributor

@DmitryTsymbal DmitryTsymbal commented May 10, 2021

This PR contains MFTF test for placing an order with enabled captcha

Steps to reproduce:

1 - Create customer
2 - Create product
3 - Login as customer
4- Add Product into shopping cart
5 - Place an order with incorrect captcha values
6 - Place an order with correct captcha values
7 - Perform assertions

Resolved issues:

  1. resolves [Issue] MFTF: Checkout With Enabled Captcha #32991: MFTF: Checkout With Enabled Captcha

@m2-assistant
Copy link

m2-assistant bot commented May 10, 2021

Hi @DmitryTsymbal. Thank you for your contribution
Here are 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
  13. Semantic Version Checker

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.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 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

@DmitryTsymbal
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

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.

@mrtuvn
Copy link
Contributor

mrtuvn commented May 11, 2021

Hi just curious! Is there any case test cover checkout without captcha

@shikhamis11
Copy link
Member

@magento create issue

@sdzhepa sdzhepa added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label May 11, 2021
@@ -33,6 +33,12 @@
<data key="label">Contact Us</data>
<data key="value">contact_us</data>
</entity>
<entity name="StorefrontCaptchaOnCheckoutConfigData">
Copy link
Member

Choose a reason for hiding this comment

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

@DmitryTsymbal Please add a new entity changes at the end of the file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@shikhamis11 , thanks for noticing. I have moved new entity to the end of the file. Please check

@Den4ik
Copy link
Contributor

Den4ik commented May 26, 2021

@magento run Functional Tests B2B, WebAPI Tests, Database Compare

@magento-automated-testing
Copy link

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.

@Den4ik Den4ik self-assigned this May 26, 2021
@DmitryTsymbal
Copy link
Contributor Author

@magento run all tests

@magento-automated-testing
Copy link

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-engcom-team
Copy link
Contributor

Hi @shikhamis11, thank you for the review.
ENGCOM-9105 has been created to process this Pull Request
✳️ @shikhamis11, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@shikhamis11 shikhamis11 added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label May 31, 2021
@magento-engcom-team
Copy link
Contributor

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

@mrtuvn
Copy link
Contributor

mrtuvn commented Jun 10, 2021

#33200
@DmitryTsymbal Can you help for cover for disabled case captcha ?

@DmitryTsymbal
Copy link
Contributor Author

DmitryTsymbal commented Jun 14, 2021

Hello @mrtuvn , sorry for the long reply.
As far, as I see, there are a lot of cases for checkout with disabled captcha, for example customer and guest checkout:

https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontCustomerCheckoutTest/StorefrontCustomerCheckoutTest.xml

https://github.com/magento/magento2/blob/2.4-develop/app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutTest.xml

Does it work for you, or do we need some special cases to cover?

Thanks!

@mrtuvn
Copy link
Contributor

mrtuvn commented Jun 14, 2021

Thanks you better let do it at another seperate one

@engcom-Charlie
Copy link
Contributor

engcom-Charlie commented Jul 8, 2021

✔️ QA Passed

Preconditions:

  1. Create category
  2. Create Product
  3. Enabled the captcha at store front on payment processing page with length and symbol and in Always mode from Admin panel

Manual testing scenario:

1 - Login to store front
2- Place an order on store front
3- Move to checkout page from mini checkout
4- On second page of checkout i.e. payment page, try to submit the page with correct captcha. Customer can able to place an order.
5- On second page of checkout i.e. payment page, try to submit the page with incorrect captcha, it should throw an error “Incorrect captcha” without further processing.
5 - For above steps also run the StorefrontCaptchaCheckoutWithEnabledCaptchaTest MFTF test

Actual Result: ✔️

  1. Customer should be able to place an order with enabled captcha.

After: ✔️
image

image

image

image

image

image

Tested all the manual scenarios, no impact on regression testing.

@m2-assistant
Copy link

m2-assistant bot commented Oct 23, 2021

Hi @DmitryTsymbal, 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.

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: Captcha Component: Checkout Partner: Atwix Pull Request is created by partner Atwix 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. Progress: accept Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Issue] MFTF: Checkout With Enabled Captcha
8 participants