Skip to content

Commit fef8466

Browse files
committed
Merge remote-tracking branch 'mila/633' into mtf-eol-pr
2 parents f077bbf + 161a513 commit fef8466

File tree

7 files changed

+166
-1
lines changed

7 files changed

+166
-1
lines changed

app/code/Magento/Catalog/Test/Mftf/Data/ProductData.xml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -852,4 +852,21 @@
852852
<data key="attributeGroupId">13</data>
853853
<data key="sortOrder">0</data>
854854
</entity>
855+
<entity name="simpleProductDefault" type="product">
856+
<data key="sku" unique="suffix">sku_simple_product_</data>
857+
<data key="type_id">simple</data>
858+
<data key="attribute_set_id">4</data>
859+
<data key="visibility">4</data>
860+
<data key="name" unique="suffix">Simple Product </data>
861+
<data key="price">560</data>
862+
<data key="urlKey" unique="suffix">simple-product-</data>
863+
<data key="status">1</data>
864+
<data key="quantity">25</data>
865+
<data key="weight">1</data>
866+
<data key="product_has_weight">1</data>
867+
<data key="is_in_stock">1</data>
868+
<data key="tax_class_id">2</data>
869+
<requiredEntity type="product_extension_attribute">EavStockItem</requiredEntity>
870+
<requiredEntity type="custom_attribute_array">CustomAttributeCategoryIds</requiredEntity>
871+
</entity>
855872
</entities>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.z
6+
*/
7+
-->
8+
9+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="ClearShippingAddressActionGroup">
12+
<clearField selector="{{CheckoutShippingSection.firstName}}" stepKey="clearFieldFirstName"/>
13+
<clearField selector="{{CheckoutShippingSection.company}}" stepKey="clearFieldCompany"/>
14+
<clearField selector="{{CheckoutShippingSection.street}}" stepKey="clearFieldStreetAddress"/>
15+
<clearField selector="{{CheckoutShippingSection.city}}" stepKey="clearFieldCityName"/>
16+
<selectOption selector="{{CheckoutShippingSection.region}}" userInput="" stepKey="clearFieldRegion"/>
17+
<clearField selector="{{CheckoutShippingSection.postcode}}" stepKey="clearFieldZip"/>
18+
<selectOption selector="{{CheckoutShippingSection.country}}" userInput="" stepKey="clearFieldCounty"/>
19+
<clearField selector="{{CheckoutShippingSection.telephone}}" stepKey="clearFieldPhoneNumber"/>
20+
</actionGroup>
21+
</actionGroups>
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="FillShippingAddressOneStreetActionGroup">
12+
<arguments>
13+
<argument name="address" type="entity"/>
14+
</arguments>
15+
<fillField stepKey="fillFirstName" selector="{{CheckoutShippingSection.firstName}}" userInput="{{address.firstname}}"/>
16+
<fillField stepKey="fillLastName" selector="{{CheckoutShippingSection.lastName}}" userInput="{{address.lastname}}"/>
17+
<fillField stepKey="fillCompany" selector="{{CheckoutShippingSection.company}}" userInput="{{address.company}}"/>
18+
<fillField stepKey="fillPhoneNumber" selector="{{CheckoutShippingSection.telephone}}" userInput="{{address.telephone}}"/>
19+
<fillField stepKey="fillStreetAddress" selector="{{CheckoutShippingSection.street}}" userInput="{{address.street[0]}}"/>
20+
<fillField stepKey="fillCityName" selector="{{CheckoutShippingSection.city}}" userInput="{{address.city}}"/>
21+
<selectOption stepKey="selectCounty" selector="{{CheckoutShippingSection.country}}" userInput="{{address.country_id}}"/>
22+
<fillField stepKey="fillZip" selector="{{CheckoutShippingSection.postcode}}" userInput="{{address.postcode}}"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<!-- Add Product to Cart from the category page and check message -->
12+
<actionGroup name="StorefrontAddSimpleProductToCartActionGroup">
13+
<arguments>
14+
<argument name="product" type="entity"/>
15+
</arguments>
16+
<moveMouseOver selector="{{StorefrontCategoryProductSection.ProductInfoByName(product.name)}}" stepKey="moveMouseOverProduct" />
17+
<click selector="{{StorefrontCategoryProductSection.ProductAddToCartByName(product.name)}}" stepKey="clickAddToCart" />
18+
<waitForElementVisible selector="{{StorefrontCategoryMainSection.SuccessMsg}}" stepKey="waitForSuccessMessage" />
19+
<see selector="{{StorefrontCategoryMainSection.SuccessMsg}}" userInput="You added {{product.name}} to your shopping cart." stepKey="assertSuccessMessage"/>
20+
</actionGroup>
21+
</actionGroups>
22+

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutShippingSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<element name="country" type="select" selector="select[name=country_id]"/>
2828
<element name="telephone" type="input" selector="input[name=telephone]"/>
2929
<element name="saveAddress" type="button" selector=".action-save-address"/>
30+
<element name="cancelChangeAddress" type="button" selector=".action-hide-popup"/>
3031
<element name="updateAddress" type="button" selector=".action-update"/>
3132
<element name="next" type="button" selector="button.button.action.continue.primary" timeout="30"/>
3233
<element name="firstShippingMethod" type="radio" selector="//*[@id='checkout-shipping-method-load']//input[@class='radio']"/>
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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="EditShippingAddressOnePageCheckoutTest">
12+
<annotations>
13+
<features value="Checkout"/>
14+
<stories value="Edit Shipping Address"/>
15+
<title value="Edit Shipping Address on Checkout Page."/>
16+
<description value="Edit Shipping Address on Checkout Page."/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-14680"/>
19+
<group value="shoppingCart"/>
20+
<group value="mtf_migrated"/>
21+
</annotations>
22+
<before>
23+
<createData entity="_defaultCategory" stepKey="createCategory"/>
24+
<createData entity="simpleProductDefault" stepKey="createProduct">
25+
<requiredEntity createDataKey="createCategory"/>
26+
</createData>
27+
<createData entity="Simple_US_Customer_NY" stepKey="createCustomer"/>
28+
</before>
29+
<after>
30+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
31+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
32+
<deleteData createDataKey="createCustomer" stepKey="deleteCustomer"/>
33+
</after>
34+
35+
<!-- Go to Frontend as Customer -->
36+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="customerLogin">
37+
<argument name="Customer" value="$$createCustomer$$" />
38+
</actionGroup>
39+
40+
<!-- Add product to cart -->
41+
<amOnPage url="{{StorefrontCategoryPage.url($$createCategory.name$$)}}" stepKey="onCategoryPage"/>
42+
<actionGroup ref="StorefrontAddSimpleProductToCartActionGroup" stepKey="addProductToCart">
43+
<argument name="product" value="$$createProduct$$"/>
44+
</actionGroup>
45+
46+
<!-- Go to checkout page -->
47+
<actionGroup ref="GoToCheckoutFromMinicartActionGroup" stepKey="customerGoToCheckoutFromMinicart" />
48+
49+
<!-- *New Address* button on 1st checkout step -->
50+
<click selector="{{CheckoutShippingSection.newAddressButton}}" stepKey="addNewAddress"/>
51+
52+
<!--Fill in required fields and click *Save address* button-->
53+
<actionGroup ref="FillShippingAddressOneStreetActionGroup" stepKey="changeAddress">
54+
<argument name="address" value="UK_Not_Default_Address"/>
55+
</actionGroup>
56+
<click selector="{{CheckoutShippingSection.saveAddress}}" stepKey="saveNewAddress"/>
57+
58+
<!--Select Shipping Rate-->
59+
<scrollTo selector="{{CheckoutShippingMethodsSection.next}}" stepKey="scrollToShippingRate"/>
60+
<click selector="{{CheckoutShippingMethodsSection.shippingMethodFlatRate}}" stepKey="selectShippingMethod"/>
61+
62+
<!-- Click *Edit* button for the new address -->
63+
<click selector="{{CheckoutShippingSection.editActiveAddress}}" stepKey="editNewAddress"/>
64+
65+
<!--Remove values from required fields and click *Cancel* button -->
66+
<actionGroup ref="ClearShippingAddressActionGroup" stepKey="clearRequiredFields"/>
67+
<click selector="{{CheckoutShippingSection.cancelChangeAddress}}" stepKey="cancelEditAddress"/>
68+
69+
<!-- Go to *Next* -->
70+
<scrollTo selector="{{CheckoutShippingMethodsSection.next}}" stepKey="scrollToButtonNext"/>
71+
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="goNext"/>
72+
73+
<!-- Select payment solution -->
74+
<checkOption selector="{{CheckoutPaymentSection.billingAddressNotSameCheckbox}}" stepKey="selectPaymentSolution" />
75+
76+
<!--Refresh Page and Place Order-->
77+
<reloadPage stepKey="reloadPage"/>
78+
<actionGroup ref="ClickPlaceOrderActionGroup" stepKey="placeOrder"/>
79+
</test>
80+
</tests>

dev/tests/functional/tests/app/Magento/Checkout/Test/TestCase/EditShippingAddressOnePageCheckoutTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../../vendor/magento/mtf/etc/variations.xsd">
99
<testCase name="Magento\Checkout\Test\TestCase\EditShippingAddressOnePageCheckoutTest" summary="Customer can place order with new addresses that was edited during checkout with several conditions" ticketId="MAGETWO-67837">
1010
<variation name="EditShippingAddressOnePageCheckoutTestVariation1">
11-
<data name="tag" xsi:type="string">severity:S1</data>
11+
<data name="tag" xsi:type="string">severity:S1, mftf_migrated:yes</data>
1212
<data name="customer/dataset" xsi:type="string">johndoe_with_addresses</data>
1313
<data name="shippingAddress/dataset" xsi:type="string">UK_address_without_email</data>
1414
<data name="editShippingAddress/dataset" xsi:type="string">empty_UK_address_without_email</data>

0 commit comments

Comments
 (0)