|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 3 | + xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 4 | + <test name="CaptchaWithDisabledGuestCheckoutTest"> |
| 5 | + <annotations> |
| 6 | + <features value="Captcha"/> |
| 7 | + <stories value="MC-5602 - CAPTCHA doesn't appear in login popup after refreshing page."/> |
| 8 | + <title value="Captcha is displaying on login form with disabled guest checkout"/> |
| 9 | + <description value="Captcha is displaying on login form with disabled guest checkout"/> |
| 10 | + <severity value="MAJOR"/> |
| 11 | + <testCaseId value="MAGETWO-96691"/> |
| 12 | + <group value="captcha"/> |
| 13 | + </annotations> |
| 14 | + <before> |
| 15 | + <magentoCLI command="config:set checkout/options/guest_checkout 0" stepKey="disableGuestCheckout"/> |
| 16 | + <magentoCLI command="config:set customer/captcha/failed_attempts_login 1" stepKey="decreaseLoginAttempt"/> |
| 17 | + <createData entity="ApiCategory" stepKey="createCategory"/> |
| 18 | + <createData entity="ApiSimpleProduct" stepKey="createSimpleProduct"> |
| 19 | + <requiredEntity createDataKey="createCategory"/> |
| 20 | + </createData> |
| 21 | + <magentoCron stepKey="runCronIndex" groups="index"/> |
| 22 | + </before> |
| 23 | + <after> |
| 24 | +<!-- <magentoCLI command="config:set checkout/options/guest_checkout 1" stepKey="enableGuestCheckout"/>--> |
| 25 | +<!-- <magentoCLI command="config:set customer/captcha/failed_attempts_login 3" stepKey="increaseLoginAttempt"/>--> |
| 26 | +<!-- <deleteData createDataKey="createCategory" stepKey="deleteCategory"/>--> |
| 27 | +<!-- <deleteData createDataKey="createSimpleProduct" stepKey="deleteSimpleProduct1"/>--> |
| 28 | + </after> |
| 29 | + <amOnPage url="{{StorefrontProductPage.url($$createSimpleProduct.sku$$)}}" stepKey="openProductPage"/> |
| 30 | + <waitForPageLoad stepKey="waitForPageLoad"/> |
| 31 | + <click selector="{{StorefrontProductActionSection.addToCart}}" stepKey="addToCart"/> |
| 32 | + <waitForPageLoad stepKey="waitForAddToCart"/> |
| 33 | + <waitForElementVisible selector="{{StorefrontMessagesSection.success}}" stepKey="waitForSuccessMessage"/> |
| 34 | + <waitForText userInput="You added $$createSimpleProduct.name$$ to your shopping cart." stepKey="waitForText"/> |
| 35 | + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/> |
| 36 | + <click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout"/> |
| 37 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="waitEmailFieldVisible"/> |
| 38 | + <fillField selector="{{StorefrontCustomerSignInPopupFormSection.email}}" userInput="{{Simple_US_Customer.email}}" stepKey="fillCustomerEmail"/> |
| 39 | + <fillField selector="{{StorefrontCustomerSignInPopupFormSection.password}}" userInput="incorrectPassword" stepKey="fillIncorrectCustomerPassword"/> |
| 40 | + <click selector="{{StorefrontCustomerSignInPopupFormSection.signIn}}" stepKey="clickSignIn"/> |
| 41 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.errorMessage}}" stepKey="seeErrorMessage"/> |
| 42 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaField}}" stepKey="seeCaptchaField"/> |
| 43 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaImg}}" stepKey="seeCaptchaImage"/> |
| 44 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaReload}}" stepKey="seeCaptchaReloadButton"/> |
| 45 | + <reloadPage stepKey="refreshPage"/> |
| 46 | + <waitForPageLoad stepKey="waitForPageLoad2"/> |
| 47 | + <click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart2"/> |
| 48 | + <click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="goToCheckout2"/> |
| 49 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.email}}" stepKey="waitEmailFieldVisible2"/> |
| 50 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaField}}" stepKey="seeCaptchaField2"/> |
| 51 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaImg}}" stepKey="seeCaptchaImage2"/> |
| 52 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.captchaReload}}" stepKey="seeCaptchaReloadButton2"/> |
| 53 | + </test> |
| 54 | +</tests> |
0 commit comments