Skip to content

Commit 33f35ce

Browse files
authored
Merge pull request #4011 from magento-tsg/2.2-develop-pr88
[TSG] Backporting for 2.2 (pr88) (2.2-develop)
2 parents 9d4f9a0 + cf67930 commit 33f35ce

File tree

33 files changed

+594
-82
lines changed

33 files changed

+594
-82
lines changed
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="AdminAccountSetInterfaceLocaleActionGroup">
12+
<arguments>
13+
<argument name="localeName" type="string"/>
14+
</arguments>
15+
<!-- Navigate to admin System Account Page-->
16+
<amOnPage url="{{AdminSystemAccountPage.url}}" stepKey="openAdminSystemAccountPage"/>
17+
<!-- Change Admin locale to {{localeName}} -->
18+
<selectOption selector="{{AdminSystemAccountSection.interfaceLocale}}" userInput="{{localeName}}" stepKey="setInterfaceLocale"/>
19+
<fillField selector="{{AdminSystemAccountSection.currentPassword}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillCurrentPassword"/>
20+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSave"/>
21+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitForSuccessMessage"/>
22+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the account." stepKey="seeSuccessMessage"/>
23+
</actionGroup>
24+
</actionGroups>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="AdminSystemAccountPage" url="admin/system_account/index/" area="admin" module="Magento_Backend">
12+
<section name="AdminSystemAccountSection"/>
13+
</page>
14+
</pages>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminSystemAccountSection">
12+
<element name="interfaceLocale" type="text" selector="#interface_locale"/>
13+
<element name="currentPassword" type="text" selector="#current_password"/>
14+
</section>
15+
</sections>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="StorefrontPayWithPaypalFromMiniCartActionGroup" extends="StorefrontViewAndEditCartFromMiniCartActionGroup">
11+
<remove keyForRemoval="viewAndEditCart"/>
12+
<remove keyForRemoval="seeInCurrentUrl"/>
13+
<waitForElementVisible selector="{{StorefrontMiniCartSection.payWithPayPal}}" stepKey="waitForPaypalButtonIsVisible"/>
14+
<click selector="{{StorefrontMiniCartSection.payWithPayPal}}" stepKey="clickPayWithPaypalButton"/>
15+
</actionGroup>
16+
</actionGroups>

app/code/Magento/Braintree/Test/Mftf/Data/BraintreeData.xml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@
7171
<data key="value"/>
7272
</entity>
7373

74+
<entity name="DefaultBraintreeWithPaypalConfig" extends="DefaultBraintreeConfig">
75+
<requiredEntity type="active_braintree_paypal">DefaultActiveBraintreePaypal</requiredEntity>
76+
</entity>
77+
<entity name="DefaultActiveBraintreePaypal" type="active_braintree_paypal">
78+
<data key="value">0</data>
79+
</entity>
80+
7481
<entity name="SandboxBraintreeConfig" type="braintree_config_state">
7582
<requiredEntity type="title">EnabledTitle</requiredEntity>
7683
<requiredEntity type="payment_action">AuthorizePaymentAction</requiredEntity>
@@ -106,6 +113,13 @@
106113
<data key="value">Magneto</data>
107114
</entity>
108115

116+
<entity name="SandboxBraintreeWithPaypalConfig" extends="SandboxBraintreeConfig">
117+
<requiredEntity type="active_braintree_paypal">EnableActiveBraintreePaypal</requiredEntity>
118+
</entity>
119+
<entity name="EnableActiveBraintreePaypal" type="active_braintree_paypal">
120+
<data key="value">1</data>
121+
</entity>
122+
109123
<entity name="BraintreeCard" type="creditCard">
110124
<data key="cc_type">MasterCard</data>
111125
<data key="card_number">5105105105105100</data>

app/code/Magento/Braintree/Test/Mftf/Metadata/braintree_config-meta.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@
4949
<object key="active" dataType="active">
5050
<field key="value">integer</field>
5151
</object>
52+
<object key="active_braintree_paypal" dataType="active_braintree_paypal">
53+
<field key="value">integer</field>
54+
</object>
5255
</object>
5356
</object>
5457
</object>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="StorefrontPaypalReviewOrderPage" url="/braintree/paypal/review" area="storefront" module="Magento_Braintree">
12+
<section name="StorefrontPaypalReviewOrderShippingSection"/>
13+
<section name="StorefrontPaypalReviewOrderItemsSection"/>
14+
</page>
15+
</pages>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontMiniCartSection">
12+
<element name="payWithPayPal" type="button" selector=".braintree-paypal-button-hidden" timeout="30"/>
13+
<element name="proceedWithSandboxPurchase" type="text" selector="#return_url"/>
14+
</section>
15+
</sections>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontPaypalReviewOrderItemsSection">
12+
<element name="placeOrder" type="button" selector="#review-button" timeout="30"/>
13+
<element name="orderSummaryTotal" type="text" selector="tr.grand.totals span.price"/>
14+
</section>
15+
</sections>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontPaypalReviewOrderShippingSection">
12+
<element name="selectShippingMethodByName" type="select" selector="//select[@id='shipping-method']//option[contains(text(),'{{shippingMethod}}')]" parameterized="true"/>
13+
</section>
14+
</sections>

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,10 @@
277277
<var key="sku" entityType="product" entityKey="sku" />
278278
<requiredEntity type="product_option">ProductOptionDropDownWithLongValuesTitle</requiredEntity>
279279
</entity>
280+
<entity name="ProductWithFileOption" type="product">
281+
<var key="sku" entityType="product" entityKey="sku" />
282+
<requiredEntity type="product_option">ProductOptionFile</requiredEntity>
283+
</entity>
280284
<entity name="SimpleProductWithCustomAttributeSet" type="product">
281285
<data key="sku" unique="suffix">testSku</data>
282286
<data key="type_id">simple</data>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/CheckoutActionGroup.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,4 +106,26 @@
106106
<click selector="{{CheckoutPaymentSection.placeOrder}}" stepKey="clickPlaceOrder"/>
107107
<see selector="{{CheckoutSuccessMainSection.successTitle}}" userInput="Thank you for your purchase!" stepKey="waitForLoadSuccessPage"/>
108108
</actionGroup>
109+
110+
<actionGroup name="CheckoutSelectShippingMethodActionGroup">
111+
<arguments>
112+
<!-- First available shipping method will be selected if value is not passed for shippingMethod -->
113+
<argument name="shippingMethod" defaultValue="" type="string"/>
114+
</arguments>
115+
<conditionalClick selector="{{CheckoutShippingMethodsSection.checkShippingMethodByName(shippingMethod)}}" dependentSelector="{{CheckoutShippingMethodsSection.checkShippingMethodByName(shippingMethod)}}" visible="true" stepKey="selectShippingMethod"/>
116+
<waitForLoadingMaskToDisappear stepKey="waitForNextButton"/>
117+
<click selector="{{CheckoutShippingMethodsSection.next}}" stepKey="clickNext"/>
118+
<waitForPageLoad stepKey="waitForPaymentMethod"/>
119+
<waitForElementVisible selector="{{CheckoutPaymentSection.paymentSectionTitle}}" stepKey="waitForPaymentSectionLoaded"/>
120+
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
121+
</actionGroup>
122+
123+
<actionGroup name="AssertStorefrontErrorMessageOnOrderSubmit">
124+
<arguments>
125+
<argument name="errorMessage" type="string"/>
126+
</arguments>
127+
<waitForElementVisible selector="{{CheckoutPaymentSection.placeOrderNoWait}}" stepKey="waitForPlaceOrderButton"/>
128+
<click selector="{{CheckoutPaymentSection.placeOrderNoWait}}" stepKey="clickPlaceOrder"/>
129+
<waitForText selector="{{StorefrontMessagesSection.errorMessage}}" userInput="{{errorMessage}}" time="30" stepKey="seeShippingMethodError"/>
130+
</actionGroup>
109131
</actionGroups>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/GoToCheckoutFromMinicartActionGroup.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<!-- Go to checkout from minicart -->
1212
<actionGroup name="GoToCheckoutFromMinicartActionGroup">
13+
<waitForPageLoad stepKey="waitForPageLoad"/>
1314
<waitForElement selector="{{StorefrontMinicartSection.showCart}}" stepKey="waitMiniCartSectionShow" />
1415
<click selector="{{StorefrontMinicartSection.showCart}}" stepKey="clickCart"/>
1516
<waitForElementVisible selector="{{StorefrontMinicartSection.goToCheckout}}" time="30" stepKey="waitForGoToCheckoutButtonVisible"/>
1617
<click selector="{{StorefrontMinicartSection.goToCheckout}}" stepKey="clickGoToCheckoutButton"/>
17-
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
<waitForPageLoad stepKey="waitForPageLoad1"/>
1819
</actionGroup>
1920
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<element name="cartItems" type="text" selector=".minicart-items"/>
2626
<element name="billingAddress" type="text" selector="div.billing-address-details"/>
2727
<element name="placeOrder" type="button" selector=".payment-method._active button.action.primary.checkout" timeout="30"/>
28+
<element name="placeOrderNoWait" type="button" selector=".payment-method._active button.action.primary.checkout"/>
2829
<element name="productOptionsByProductItemPrice" type="text" selector="//div[@class='product-item-inner']//div[@class='subtotal']//span[@class='price'][contains(.,'{{price}}')]//ancestor::div[@class='product-item-details']//div[@class='product options']" parameterized="true"/>
2930
<element name="productOptionsActiveByProductItemPrice" type="text" selector="//div[@class='subtotal']//span[@class='price'][contains(.,'{{price}}')]//ancestor::div[@class='product-item-details']//div[@class='product options active']" parameterized="true"/>
3031
<element name="productItemPriceByName" type="text" selector="//div[@class='product-item-details'][contains(., '{{ProductName}}')]//span[@class='price']" parameterized="true"/>
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="SetLocaleOptions" type="locale_options_config">
12+
<requiredEntity type="code">LocaleOptionsFrance</requiredEntity>
13+
</entity>
14+
<entity name="LocaleOptionsFrance" type="code">
15+
<data key="value">fr_FR</data>
16+
</entity>
17+
18+
<entity name="DefaultLocaleOptions" type="locale_options_config">
19+
<requiredEntity type="code">LocaleOptionsUSA</requiredEntity>
20+
</entity>
21+
<entity name="LocaleOptionsUSA" type="code">
22+
<data key="value">en_US</data>
23+
</entity>
24+
</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.
6+
*/
7+
-->
8+
<operations xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataOperation.xsd">
10+
<operation name="GeneralLocaleOptionsConfig" dataType="locale_options_config" type="create" auth="adminFormKey" url="/admin/system_config/save/section/general/" method="POST" successRegex="/messages-message-success/">
11+
<object key="groups" dataType="locale_options_config">
12+
<object key="locale" dataType="locale_options_config">
13+
<object key="fields" dataType="locale_options_config">
14+
<object key="code" dataType="code">
15+
<field key="value">string</field>
16+
</object>
17+
</object>
18+
</object>
19+
</object>
20+
</operation>
21+
</operations>

app/code/Magento/ConfigurableProduct/etc/di.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,4 +248,11 @@
248248
<type name="Magento\Tax\Model\Sales\Total\Quote\CommonTaxCollector">
249249
<plugin name="apply_tax_class_id" type="Magento\ConfigurableProduct\Plugin\Tax\Model\Sales\Total\Quote\CommonTaxCollector" />
250250
</type>
251+
<type name="Magento\Eav\Model\Entity\Attribute\Group">
252+
<arguments>
253+
<argument name="reservedSystemNames" xsi:type="array">
254+
<item name="configurable" xsi:type="string">configurable</item>
255+
</argument>
256+
</arguments>
257+
</type>
251258
</config>

app/code/Magento/Customer/Test/Mftf/ActionGroup/StorefrontCustomerAccountActionGroup.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,10 @@
1717
<waitForPageLoad stepKey="waitForPageLoad"/>
1818
<see selector="{{StorefrontHeaderSection.mainTitle}}" userInput="{{tabName}}" stepKey="checkTabTitle"/>
1919
</actionGroup>
20+
21+
<!--Go to Storefront > Account Information-->
22+
<actionGroup name="StorefrontStartCustomerAccountInformationEdit">
23+
<amOnPage url="{{StorefrontCustomerAccountInformationPage.url}}" stepKey="goToAccountInformationEditPage"/>
24+
<see selector="{{StorefrontCustomerAccountInformationSection.title}}" userInput="Edit Account Information" stepKey="seeEditAccountInformationPageTitle"/>
25+
</actionGroup>
2026
</actionGroups>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="StorefrontCustomerAccountInformationPage" url="/customer/account/edit" area="storefront" module="Magento_Customer">
12+
<section name="StorefrontCustomerSidebarSection"/>
13+
<section name="StorefrontCustomerAccountInformationSection" />
14+
</page>
15+
</pages>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="StorefrontCustomerAccountInformationSection">
12+
<element name="title" type="text" selector=".page-title span"/>
13+
<element name="firstName" type="input" selector="#firstname"/>
14+
<element name="lastName" type="input" selector="#lastname"/>
15+
<element name="changeEmail" type="checkbox" selector="#change_email"/>
16+
<element name="changePassword" type="checkbox" selector="#change_password"/>
17+
<element name="customAttributeFiled" type="input" selector="#{{attribute_code}}" parameterized="true"/>
18+
<element name="saveButton" type="button" selector="#form-validate .action.save.primary" timeout="30"/>
19+
</section>
20+
</sections>

0 commit comments

Comments
 (0)