Skip to content

Commit d01133d

Browse files
committed
MFTF has been added.
1 parent 01f3185 commit d01133d

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

app/code/Magento/Customer/Test/Mftf/Section/StorefrontCustomerDashboardAccountInformationSection/StorefrontCustomerAddressSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
<element name="stateProvinceFill" type="input" selector="#region"/>
2020
<element name="zip" type="input" selector="#zip"/>
2121
<element name="country" type="select" selector="#country"/>
22+
<element name="vatId" type="input" selector="#vat_id"/>
2223
<element name="saveAddress" type="button" selector="[data-action='save-address']" timeout="30"/>
2324
</section>
2425
</sections>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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-40016"/>
19+
<group value="Multishipment"/>
20+
</annotations>
21+
<before>
22+
<magentoCLI command="config:set customer/create_account/vat_frontend_visibility 1" stepKey="showVatNumberOnStorefrontYes"/>
23+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheBefore">
24+
<argument name="tags" value="config"/>
25+
</actionGroup>
26+
<createData stepKey="category" entity="SimpleSubCategory"/>
27+
<createData stepKey="product1" entity="SimpleProduct">
28+
<requiredEntity createDataKey="category"/>
29+
</createData>
30+
</before>
31+
<!-- Add product to the cart -->
32+
<amOnPage url="$$product1.name$$.html" stepKey="goToProductPage"/>
33+
<actionGroup ref="AddToCartFromStorefrontProductPageActionGroup" stepKey="addProductToCart">
34+
<argument name="productName" value="$$product1.name$$"/>
35+
</actionGroup>
36+
<!-- Check Out with Multiple Addresses -->
37+
<actionGroup ref="StorefrontOpenCartFromMinicartActionGroup" stepKey="openCart"/>
38+
<waitForElementVisible selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="waitMultipleAddressShippingButton"/>
39+
<click selector="{{MultishippingSection.shippingMultipleCheckout}}" stepKey="clickToMultipleAddressShippingButton"/>
40+
<!--Create an account-->
41+
<waitForElementVisible selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="waitCreateAnAccountButton"/>
42+
<click selector="{{StorefrontCustomerSignInPopupFormSection.createAnAccount}}" stepKey="clickOnCreateAnAccountButton"/>
43+
<waitForPageLoad stepKey="waitForCreateAccountPageToLoad"/>
44+
<!--Check the VAT Number field-->
45+
<seeElement selector="{{StorefrontCustomerAddressSection.vatId}}" stepKey="assertVatIdField"/>
46+
<after>
47+
<magentoCLI command="config:set customer/create_account/vat_frontend_visibility 0" stepKey="showVatNumberOnStorefrontNo"/>
48+
<actionGroup ref="CliCacheFlushActionGroup" stepKey="flushCacheAfter">
49+
<argument name="tags" value="config"/>
50+
</actionGroup>
51+
<deleteData stepKey="deleteCategory" createDataKey="category"/>
52+
<deleteData stepKey="deleteProduct1" createDataKey="product1"/>
53+
</after>
54+
</test>
55+
</tests>

0 commit comments

Comments
 (0)