|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | + /** |
| 4 | + * Copyright © Magento, Inc. All rights reserved. |
| 5 | + * See COPYING.txt for license details. |
| 6 | + */ |
| 7 | +--> |
| 8 | + |
| 9 | +<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 10 | + xsi:noNamespaceSchemaLocation="../../../../../../../vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> |
| 11 | + <test name="CaptchaFormsDisplayingTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Captcha"/> |
| 14 | + <stories value="MAGETWO-91552 - [github] CAPTCHA doesn't show when check out as guest"/> |
| 15 | + <title value="Captcha forms displaying"/> |
| 16 | + <description value="Captcha forms displaying"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-93941"/> |
| 19 | + <group value="captcha"/> |
| 20 | + </annotations> |
| 21 | + |
| 22 | + <!--Login as admin--> |
| 23 | + <actionGroup ref="LoginAsAdmin" stepKey="LoginAsAdmin"/> |
| 24 | + <!--Go to Captcha--> |
| 25 | + <actionGroup ref="CaptchaFormsDisplayingActionGroup" stepKey="CaptchaFormsDisplayingActionGroup"/> |
| 26 | + <waitForPageLoad stepKey="WaitForPageLoaded"/> |
| 27 | + <!--Verify fields removed--> |
| 28 | + <grabTextFrom selector="{{CaptchaFormsDisplayingSection.forms}}" stepKey="formItems"/> |
| 29 | + <assertNotContains stepKey="checkoutAsGuest"> |
| 30 | + <expectedResult type="string">{{CaptchaData.checkoutAsGuest}}</expectedResult> |
| 31 | + <actualResult type="variable">$formItems</actualResult> |
| 32 | + </assertNotContains> |
| 33 | + <assertNotContains stepKey="register"> |
| 34 | + <expectedResult type="string">{{CaptchaData.register}}</expectedResult> |
| 35 | + <actualResult type="variable">$formItems</actualResult> |
| 36 | + </assertNotContains> |
| 37 | + <!--Verify fields existence--> |
| 38 | + <grabTextFrom selector="{{CaptchaFormsDisplayingSection.createUser}}" stepKey="createUser"/> |
| 39 | + <assertEquals stepKey="CreateUserFieldIsPresent"> |
| 40 | + <expectedResult type="string">{{CaptchaData.createUser}}</expectedResult> |
| 41 | + <actualResult type="variable">$createUser</actualResult> |
| 42 | + </assertEquals> |
| 43 | + <grabTextFrom selector="{{CaptchaFormsDisplayingSection.userLogin}}" stepKey="login"/> |
| 44 | + <assertEquals stepKey="LoginFieldIsPresent"> |
| 45 | + <expectedResult type="string">{{CaptchaData.login}}</expectedResult> |
| 46 | + <actualResult type="variable">login</actualResult> |
| 47 | + </assertEquals> |
| 48 | + <grabTextFrom selector="{{CaptchaFormsDisplayingSection.forgotpassword}}" stepKey="forgotpassword"/> |
| 49 | + <assertEquals stepKey="PasswordFieldIsPresent"> |
| 50 | + <expectedResult type="string">{{CaptchaData.passwd}}</expectedResult> |
| 51 | + <actualResult type="variable">$forgotpassword</actualResult> |
| 52 | + </assertEquals> |
| 53 | + <grabTextFrom selector="{{CaptchaFormsDisplayingSection.contactUs}}" stepKey="contactUs"/> |
| 54 | + <assertEquals stepKey="contactUsFieldIsPresent"> |
| 55 | + <expectedResult type="string">{{CaptchaData.contactUs}}</expectedResult> |
| 56 | + <actualResult type="variable">$contactUs</actualResult> |
| 57 | + </assertEquals> |
| 58 | + <grabTextFrom selector="{{CaptchaFormsDisplayingSection.userEdit}}" stepKey="userEdit"/> |
| 59 | + <assertEquals stepKey="userEditFieldIsPresent"> |
| 60 | + <expectedResult type="string">{{CaptchaData.changePasswd}}</expectedResult> |
| 61 | + <actualResult type="variable">$userEdit</actualResult> |
| 62 | + </assertEquals> |
| 63 | + |
| 64 | + <!--Roll back configuration--> |
| 65 | + <scrollToTopOfPage stepKey="ScrollToTop"/> |
| 66 | + <click selector="{{CaptchaFormsDisplayingSection.captcha}}" stepKey="ClickToCloseCaptcha"/> |
| 67 | + |
| 68 | + </test> |
| 69 | +</tests> |
0 commit comments