|
| 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="urn:magento:mftf:Test/etc/testSchema.xsd"> |
| 11 | + <test name="StorefrontOnePageCheckoutPhoneValidationTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Checkout"/> |
| 14 | + <stories value="Checkout validation phone field"/> |
| 15 | + <title value="Validate phone field on checkout page"/> |
| 16 | + <description value="Validate phone field on checkout page, field must not contain alphabetical symbols"/> |
| 17 | + <severity value="MAJOR" /> |
| 18 | + </annotations> |
| 19 | + <before> |
| 20 | + <createData entity="_defaultCategory" stepKey="createCategory"/> |
| 21 | + <createData entity="ApiSimpleProduct" stepKey="createProduct"> |
| 22 | + <requiredEntity createDataKey="createCategory"/> |
| 23 | + </createData> |
| 24 | + </before> |
| 25 | + <after> |
| 26 | + <deleteData createDataKey="createCategory" stepKey="deleteCategory"/> |
| 27 | + <deleteData createDataKey="createProduct" stepKey="deleteProduct"/> |
| 28 | + </after> |
| 29 | + |
| 30 | + <actionGroup ref="StorefrontNavigateCategoryPageActionGroup" stepKey="openCategoryPageOnFrontend"> |
| 31 | + <argument name="category" value="$createCategory$"/> |
| 32 | + </actionGroup> |
| 33 | + |
| 34 | + <actionGroup ref="StorefrontAddSimpleProductToCartActionGroup" stepKey="addToCartFromStorefrontProductPage"> |
| 35 | + <argument name="product" value="$$createProduct$$"/> |
| 36 | + </actionGroup> |
| 37 | + |
| 38 | + <actionGroup ref="StorefrontOpenCheckoutPageActionGroup" stepKey="guestGoToCheckout"/> |
| 39 | + |
| 40 | + <fillField userInput="Sample text" selector="{{CheckoutShippingSection.telephone}}" stepKey="enterAlphabeticalSymbols"/> |
| 41 | + <see userInput="Please enter a valid phone number. For example (123) 456-7890, 123-456-7890, +(123)4567890, +1234567890" selector="{{CheckoutShippingSection.addressFieldValidationError}}" stepKey="checkPhoneFieldValidationIsPassed"/> |
| 42 | + </test> |
| 43 | +</tests> |
0 commit comments