|
| 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="StoreFrontCheckVatIdAtAccountCreateWithMultishipmentTest"> |
| 12 | + <annotations> |
| 13 | + <features value="Multishipment"/> |
| 14 | + <stories value="Checking vat id field at account create page with 'Check Out with Multiple Addresses'"/> |
| 15 | + <title value="Checking vat id field at account create page with 'Check Out with Multiple Addresses'"/> |
| 16 | + <description value="'VAT Number' field should be available at create account page if 'Show VAT Number on Storefront' is Yes"/> |
| 17 | + <severity value="MAJOR"/> |
| 18 | + <testCaseId value="MC-40397"/> |
| 19 | + <group value="Multishipment"/> |
| 20 | + </annotations> |
| 21 | + <before> |
| 22 | + <magentoCLI command="config:set customer/create_account/vat_frontend_visibility 1" stepKey="showVatNumberOnStorefrontYes"/> |
| 23 | + <createData entity="SimpleSubCategory" stepKey="category"/> |
| 24 | + <createData entity="SimpleProduct" stepKey="product"> |
| 25 | + <requiredEntity createDataKey="category"/> |
| 26 | + </createData> |
| 27 | + </before> |
| 28 | + <after> |
| 29 | + <magentoCLI command="config:set customer/create_account/vat_frontend_visibility 0" stepKey="showVatNumberOnStorefrontNo"/> |
| 30 | + <actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfter"> |
| 31 | + <argument name="tags" value="config"/> |
| 32 | + </actionGroup> |
| 33 | + <deleteData createDataKey="category" stepKey="deleteCategory"/> |
| 34 | + <deleteData createDataKey="product" stepKey="deleteproduct"/> |
| 35 | + </after> |
| 36 | + <!-- Add product to the cart --> |
| 37 | + <amOnPage url="$$product.name$$.html" stepKey="goToProductPage"/> |
| 38 | + <actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart"> |
| 39 | + <argument name="productName" value="$$product.name$$"/> |
| 40 | + </actionGroup> |
| 41 | + <!-- Check Out with Multiple Addresses --> |
| 42 | + <actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/> |
| 43 | + <waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/> |
| 44 | + <click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/> |
| 45 | + <!--Create an account--> |
| 46 | + <waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="waitCreateAnAccountButton"/> |
| 47 | + <click selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/> |
| 48 | + <waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/> |
| 49 | + <!--Check the VAT Number field--> |
| 50 | + <seeElement selector="{{StorefrontCustomerAddressSection.vatId}}" stepKey="assertVatIdField"/> |
| 51 | + </test> |
| 52 | +</tests> |
0 commit comments