Skip to content

Commit d2003e5

Browse files
committed
Merge remote-tracking branch 'origin/MAGETWO-87971' into 2.2-develop-pr46
2 parents 053fee8 + bef9215 commit d2003e5

17 files changed

+253
-93
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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" xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="NavigateToConfigurationGeneralPage">
11+
<amOnPage url="{{AdminConfigGeneralPage.url}}" stepKey="navigateToConfigGeneralPage"/>
12+
<waitForPageLoad stepKey="waitForConfigPageLoad"/>
13+
</actionGroup>
14+
15+
<actionGroup name="SelectTopDestinationsCountry">
16+
<arguments>
17+
<argument name="countries"/>
18+
</arguments>
19+
<amOnPage url="{{AdminConfigurationGeneralSectionPage.url('#general_country-link')}}" stepKey="goToConfigurationSectionPage"/>
20+
<selectOption selector="{{AdminConfigurationGeneralSectionCountryOptionsGroupSection.topDestinations}}" parameterArray="[{{countries.country}}]" stepKey="selectTopDestinationsCountry"/>
21+
<click selector="{{AdminMainActionsSection.save}}" stepKey="saveConfiguration"/>
22+
<see userInput="You saved the configuration." stepKey="seeSuccessMessage"/>
23+
</actionGroup>
24+
25+
<actionGroup name="UnSelectTopDestinationsCountry">
26+
<arguments>
27+
<argument name="countries"/>
28+
</arguments>
29+
<amOnPage url="{{AdminConfigurationGeneralSectionPage.url('#general_country-link')}}" stepKey="goToConfigurationSectionPage"/>
30+
<unselectOption selector="{{AdminConfigurationGeneralSectionCountryOptionsGroupSection.topDestinations}}" parameterArray="[{{countries.country}}]" stepKey="unSelectTopDestinationsCountry"/>
31+
<click selector="{{AdminMainActionsSection.save}}" stepKey="saveConfiguration"/>
32+
<see userInput="You saved the configuration." stepKey="seeSuccessMessage"/>
33+
</actionGroup>
34+
</actionGroups>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<pages xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
8+
<page name="AdminConfigurationGeneralSectionPage" url="admin/system_config/edit/section/general/{{group_anchor}}" parameterized="true" area="admin" module="Magento_Config">
9+
<section name="AdminConfigurationGeneralSectionCountryOptionsGroupSection"/>
10+
</page>
11+
</pages>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
-->
7+
<sections xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
8+
<section name="AdminConfigurationGeneralSectionCountryOptionsGroupSection">
9+
<element name="topDestinations" type="multiselect" selector="#general_country_destinations"/>
10+
</section>
11+
</sections>

app/code/Magento/Backend/etc/adminhtml/system.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
<field id="destinations" translate="label" type="multiselect" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="1">
219219
<label>Top destinations</label>
220220
<source_model>Magento\Directory\Model\Config\Source\Country</source_model>
221+
<can_be_empty>1</can_be_empty>
221222
</field>
222223
</group>
223224
<group id="locale" translate="label" type="text" sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="1">

app/code/Magento/Bundle/Test/Mftf/Test/StorefrontEditBundleProductTest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,9 @@
9090
<!-- Go to the shopping cart page and edit the first product -->
9191
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart"/>
9292
<waitForPageLoad stepKey="waitForCartPageLoad"/>
93-
<waitForElementVisible selector="{{CheckoutCartSummarySection.total}}" stepKey="waitForInfoDropdown"/>
93+
<waitForElementVisible selector="{{StorefrontCheckoutCartSummarySection.total}}" stepKey="waitForInfoDropdown"/>
9494
<waitForPageLoad stepKey="waitForCartPageLoad3"/>
95-
<grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalBefore"/>
95+
<grabTextFrom selector="{{StorefrontCheckoutCartSummarySection.total}}" stepKey="grabTotalBefore"/>
9696
<click selector="{{CheckoutCartProductSection.editItemParametersButton('1')}}" stepKey="clickEdit"/>
9797
<waitForPageLoad stepKey="waitForStorefront2"/>
9898

@@ -113,9 +113,9 @@
113113
<!-- Assert that the options are both there and the proce no longer matches -->
114114
<see selector="{{CheckoutCartProductSection.itemOptionsBlock('2')}}" userInput="$$simpleProduct1.sku$$" stepKey="assertBothOptions"/>
115115
<see selector="{{CheckoutCartProductSection.itemOptionsBlock('2')}}" userInput="$$simpleProduct2.sku$$" stepKey="assertBothOptions2"/>
116-
<waitForElementVisible selector="{{CheckoutCartSummarySection.total}}" stepKey="waitForInfoDropdown2"/>
116+
<waitForElementVisible selector="{{StorefrontCheckoutCartSummarySection.total}}" stepKey="waitForInfoDropdown2"/>
117117
<waitForPageLoad stepKey="waitForCartPageLoad4"/>
118-
<grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalAfter"/>
118+
<grabTextFrom selector="{{StorefrontCheckoutCartSummarySection.total}}" stepKey="grabTotalAfter"/>
119119
<assertNotEquals expected="{$grabTotalBefore}" expectedType="string" actual="{$grabTotalAfter}" actualType="string" stepKey="assertNotEquals"/>
120120

121121
<!-- Delete the bundled product -->

app/code/Magento/Catalog/Test/Mftf/Test/AdminApplyTierPriceToProductTest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@
179179
<expectedResult type="string">$1,500.00</expectedResult>
180180
<actualResult type="variable">grabTextFromSubtotalField4</actualResult>
181181
</assertEquals>
182-
<grabTextFrom selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="grabTextFromCheckoutCartSummarySectionSubtotal1"/>
182+
<grabTextFrom selector="{{StorefrontCheckoutCartSummarySection.subtotal}}" stepKey="grabTextFromCheckoutCartSummarySectionSubtotal1"/>
183183
<assertEquals message="Shopping cart summary section should contain subtotal $1,500" stepKey="assertSubtotalFieldFromCheckoutCartSummarySection1">
184184
<expectedResult type="string">$1,500.00</expectedResult>
185185
<actualResult type="variable">grabTextFromCheckoutCartSummarySectionSubtotal1</actualResult>
@@ -256,7 +256,7 @@
256256
<expectedResult type="string">$4,000.00</expectedResult>
257257
<actualResult type="variable">grabTextFromSubtotalField7</actualResult>
258258
</assertEquals>
259-
<grabTextFrom selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="grabTextFromCheckoutCartSummarySectionSubtotal2"/>
259+
<grabTextFrom selector="{{StorefrontCheckoutCartSummarySection.subtotal}}" stepKey="grabTextFromCheckoutCartSummarySectionSubtotal2"/>
260260
<assertEquals message="Shopping cart summary section should contain subtotal $4,000" stepKey="assertSubtotalFieldFromCheckoutCartSummarySection2">
261261
<expectedResult type="string">$4,000.00</expectedResult>
262262
<actualResult type="variable">grabTextFromCheckoutCartSummarySectionSubtotal2</actualResult>

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,15 @@
4949
<waitForElement selector="{{CheckoutPaymentSection.paymentSectionTitle}}" time="30" stepKey="waitForPaymentSectionLoaded"/>
5050
<seeInCurrentUrl url="{{CheckoutPage.url}}/#payment" stepKey="assertCheckoutPaymentUrl"/>
5151
</actionGroup>
52+
53+
<!--Verify country options in checkout top destination section-->
54+
<actionGroup name="VerifyTopDestinationsCountry">
55+
<arguments>
56+
<argument name="country" type="string"/>
57+
<argument name="placeNumber"/>
58+
</arguments>
59+
<waitForElement selector="{{StorefrontCheckoutCartSummarySection.blockSummary}}" stepKey="waitBlockSummaryLoaded"/>
60+
<conditionalClick selector="{{StorefrontCheckoutCartSummarySection.shippingHeading}}" dependentSelector="{{StorefrontCheckoutCartSummarySection.country}}" visible="false" stepKey="openShippingDetails"/>
61+
<see selector="{{StorefrontCheckoutCartSummarySection.countryParameterized('placeNumber')}}" userInput="{{country}}" stepKey="seeCountry"/>
62+
</actionGroup>
5263
</actionGroups>
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+
9+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="TopDestinationCountries" type="countryArray">
12+
<array key="country">
13+
<item>Bahamas</item>
14+
</array>
15+
</entity>
16+
</entities>

app/code/Magento/Checkout/Test/Mftf/Page/CheckoutCartPage.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/PageObject.xsd">
1111
<page name="CheckoutCartPage" url="/checkout/cart" area="storefront" module="Magento_Checkout">
1212
<section name="CheckoutCartProductSection"/>
13-
<section name="CheckoutCartSummarySection"/>
13+
<section name="StorefrontCheckoutCartSummarySection"/>
1414
</page>
1515
</pages>

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutCartSummarySection.xml renamed to app/code/Magento/Checkout/Test/Mftf/Section/StorefrontCheckoutCartSummarySection.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
* See COPYING.txt for license details.
66
*/
77
-->
8-
98
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
109
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
11-
<section name="CheckoutCartSummarySection">
10+
<section name="StorefrontCheckoutCartSummarySection">
1211
<element name="subtotal" type="text" selector="#cart-totals tr.totals.sub span.price"/>
1312
<element name="proceedToCheckout" type="button" selector=".action.primary.checkout span" timeout="30"/>
1413
<element name="total" type="text" selector=".amount[data-th='Order Total'] span"/>
@@ -17,5 +16,8 @@
1716
<element name="postcode" type="text" selector="#block-summary input[name='postcode']" timeout="30"/>
1817
<element name="estimateShippingAndTax" type="text" selector="#block-shipping-heading" timeout="5"/>
1918
<element name="flatRateShippingMethod" type="radio" selector="#s_method_flatrate_flatrate" timeout="30"/>
19+
<element name="countryParameterized" type="select" selector="select[name='country_id'] > option:nth-child({{var}})" timeout="10" parameterized="true"/>
20+
<element name="shippingHeading" type="button" selector="#block-shipping-heading"/>
21+
<element name="blockSummary" type="button" selector="#block-summary"/>
2022
</section>
2123
</sections>

0 commit comments

Comments
 (0)