|
| 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="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/testSchema.xsd"> |
| 11 | + <test name="AddressStateFieldShouldNotAcceptJustIntegerValuesTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="MAGETWO-91465"/> |
| 15 | + <title value="Guest Checkout"/> |
| 16 | + <description value="Address State field should not allow just integer values"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MAGETWO-93203"/> |
| 19 | + <group value="checkout"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 23 | + <createData entity="ApiSimpleProduct" stepKey="createProduct"> |
| 24 | + <requiredEntity createDataKey="createCategory"/> |
| 25 | + </createData> |
| 26 | + </before> |
| 27 | + <after> |
| 28 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 29 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 30 | + </after> |
| 31 | + |
| 32 | + <amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/> |
| 33 | + <waitForPageLoad stepKey="waitForPageLoad1"/> |
| 34 | + <moveMouseOver selector="{{StorefrontCategoryMainSection.ProductItemInfo}}" stepKey="hoverProduct"/> |
| 35 | + <click selector="{{StorefrontCategoryMainSection.AddToCartBtn}}" stepKey="addToCart"/> |
| 36 | + <waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" time="30" stepKey="waitForProductAdded"/> |
| 37 | + <see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added $$createProduct.name$$ to your shopping cart." stepKey="seeAddedToCartMessage"/> |
| 38 | + <see selector="{{StorefrontMinicartSection.quantity}}" userInput="1" stepKey="seeCartQuantity"/> |
| 39 | + <actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="guestGoToCheckoutFromMinicart" /> |
| 40 | + <selectOption stepKey="selectCounty" selector="{{CheckoutShippingSection.country}}" userInput="{{UK_Address.country_id}}"/> |
| 41 | + <waitForPageLoad stepKey="waitFormToReload"/> |
| 42 | + <fillField selector="{{CheckoutShippingSection.stateInput}}" userInput="1" stepKey="enterStateAsIntegerValue"/> |
| 43 | + <waitForPageLoad stepKey="waitforFormValidation"/> |
| 44 | + <see userInput="First character must be letter." stepKey="seeTheErrorMessageDisplayed"/> |
| 45 | + <fillField selector="{{CheckoutShippingSection.stateInput}}" userInput=" 1" stepKey="enterStateAsIntegerValue1"/> |
| 46 | + <waitForPageLoad stepKey="waitforFormValidation1"/> |
| 47 | + <see userInput="First character must be letter." stepKey="seeTheErrorMessageDisplayed1"/> |
| 48 | + <fillField selector="{{CheckoutShippingSection.stateInput}}" userInput="ABC1" stepKey="enterStateAsIntegerValue2"/> |
| 49 | + <waitForPageLoad stepKey="waitforFormValidation2"/> |
| 50 | + <dontSee userInput="First character must be letter." stepKey="seeTheErrorMessageIsNotDisplayed"/> |
| 51 | + </test> |
| 52 | +</tests> |
0 commit comments