Skip to content

Commit 6252001

Browse files
authored
Merge pull request #186 from magento-pangolin/MC-8647
MC-8647 Backport for MC-11505
2 parents e72c183 + e81b81a commit 6252001

15 files changed

+769
-5
lines changed

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,4 +161,9 @@
161161
<entity name="DefaultEnableSolution" type="active">
162162
<data key="value">0</data>
163163
</entity>
164+
165+
<entity name="StoredPaymentMethods">
166+
<data key="cardNumberEnding">5100</data>
167+
<data key="cardExpire">12/2020</data>
168+
</entity>
164169
</entities>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddProductToCartActionGroup.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<argument name="product" defaultValue="product"/>
1414
</arguments>
1515
<amOnPage stepKey="navigateProductPage" url="/{{product.name}}.html"/>
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
1617
<click stepKey="addToCart" selector="{{StorefrontProductPageSection.addToCartBtn}}"/>
1718
<waitForElementVisible selector="{{StorefrontProductPageSection.successMsg}}" time="30" stepKey="waitForProductAdded"/>
1819
</actionGroup>
@@ -38,4 +39,8 @@
3839
<waitForElementVisible selector="{{StorefrontProductPageSection.qtyInput}}" time="30" before="addToCart" stepKey="waitQuantityFieldVisible"/>
3940
<fillField selector="{{StorefrontProductPageSection.qtyInput}}" userInput="{{quantity}}" after="waitQuantityFieldVisible" stepKey="fillQuantityField"/>
4041
</actionGroup>
42+
43+
<actionGroup name="AddSimpleProductToCartWithUrlKeyActionGroup" extends="AddSimpleProductToCart">
44+
<amOnPage url="{{StorefrontProductPage.url(product.custom_attributes[url_key])}}" stepKey="navigateProductPage"/>
45+
</actionGroup>
4146
</actionGroups>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Page/etc/SectionObject.xsd">
1111
<section name="StorefrontMinicartSection">
12+
<element name="blockMiniCart" type="block" selector=".block-minicart" timeout="30"/>
1213
<element name="productCount" type="text" selector="//header//div[contains(@class, 'minicart-wrapper')]//a[contains(@class, 'showcart')]//span[@class='counter-number']"/>
1314
<element name="productLinkByName" type="button" selector="//header//ol[@id='mini-cart']//div[@class='product-item-details']//a[contains(text(), '{{var1}}')]" parameterized="true"/>
1415
<element name="productPriceByName" type="text" selector="//header//ol[@id='mini-cart']//div[@class='product-item-details'][.//a[contains(text(), '{{var1}}')]]//span[@class='price']" parameterized="true"/>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="EnableTranslateInlineForStorefront">
12+
<data key="path">dev/translate_inline/active</data>
13+
<data key="scope_id">0</data>
14+
<data key="label">Yes</data>
15+
<data key="value">1</data>
16+
</entity>
17+
18+
<entity name="DisableTranslateInlineForStorefront">
19+
<!-- Default value -->
20+
<data key="path">dev/translate_inline/active</data>
21+
<data key="scope_id">0</data>
22+
<data key="label">No</data>
23+
<data key="value">0</data>
24+
</entity>
25+
</entities>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="AssertStorefrontCustomerSavedCardActionGroup">
1212
<arguments>
13-
<argument name="card" type="entity"/>
13+
<argument name="card" type="entity" defaultValue="StoredPaymentMethods"/>
1414
</arguments>
1515
<see selector="{{StorefrontCustomerStoredPaymentMethodsSection.cardNumber}}" userInput="{{card.cardNumberEnding}}" stepKey="verifyCardNumber"/>
1616
<see selector="{{StorefrontCustomerStoredPaymentMethodsSection.expirationDate}}" userInput="{{card.cardExpire}}" stepKey="verifyCardExpire"/>
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="StoreFrontSignOutSection">
12+
<element name="customerAccount" type="button" selector=".customer-name"/>
13+
<element name="signOut" type="button" selector="div.customer-menu li.authorization-link"/>
14+
</section>
15+
</sections>

app/code/Magento/Sales/Test/Mftf/ActionGroup/AdminOrderGridActionGroup.xml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10-
xsi:noNamespaceSchemaLocation="../../../../../../../dev/tests/acceptance/vendor/magento/magento2-functional-testing-framework/src/Magento/FunctionalTestingFramework/Test/etc/actionGroupSchema.xsd">
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<!--Filter order grid by order id field-->
1212
<actionGroup name="filterOrderGridById">
1313
<arguments>
@@ -27,4 +27,16 @@
2727
<click selector="{{AdminDataGridTableSection.firstRow}}" after="clickOrderApplyFilters" stepKey="openOrderViewPage"/>
2828
<waitForPageLoad after="openOrderViewPage" stepKey="waitForOrderViewPageOpened"/>
2929
</actionGroup>
30+
31+
<actionGroup name="OpenOrderByName" extends="filterOrderGridById">
32+
<arguments>
33+
<argument name="orderName" type="string"/>
34+
</arguments>
35+
<remove keyForRemoval="openOrderGridFilters"/>
36+
<remove keyForRemoval="fillOrderIdFilter"/>
37+
<remove keyForRemoval="clickOrderApplyFilters"/>
38+
39+
<click selector="{{AdminDataGridTableSection.rowTemplate(orderName)}}" stepKey="openOrderViewPage"/>
40+
<waitForPageLoad after="openOrderViewPage" stepKey="waitForOrderViewPageOpened"/>
41+
</actionGroup>
3042
</actionGroups>

app/code/Magento/Sales/Test/Mftf/Test/AdminReorderWithCatalogPriceTest.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@
5252
</after>
5353
<!-- Login as admin -->
5454
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>
55-
<!--Open order by Id-->
56-
<actionGroup ref="OpenOrderById" stepKey="openOrderById">
55+
56+
<actionGroup ref="OpenOrderByName" stepKey="openOrderById">
5757
<argument name="orderId" value="$createGuestCart.return$"/>
58+
<argument name="orderName" value="{{ShippingAddressTX.fullname}}"/>
5859
</actionGroup>
5960
<!--Reorder-->
6061
<click selector="{{AdminOrderDetailsMainActionsSection.reorder}}" stepKey="clickReorder"/>
@@ -63,7 +64,7 @@
6364
<see selector="{{AdminOrderItemsOrderedSection.productPrice('2')}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderItemPrice"/>
6465
<!--Verify totals on Order page-->
6566
<scrollTo selector="{{AdminOrderFormTotalSection.grandTotal}}" stepKey="scrollToOrderGrandTotal"/>
66-
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" stepKey="waitOrderSubtotalToBeVisible"/>
67+
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total( 'Subtotal')}}" stepKey="waitOrderSubtotalToBeVisible"/>
6768
<see selector="{{AdminOrderFormTotalSection.total('Subtotal')}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.subtotal}}" stepKey="seeOrderSubTotal"/>
6869
<waitForElementVisible selector="{{AdminOrderFormTotalSection.total('Shipping')}}" stepKey="waitOrderShippingToBeVisible"/>
6970
<see selector="{{AdminOrderFormTotalSection.total('Shipping')}}" userInput="${{AdminOrderSimpleProductWithCatalogRule.shipping}}" stepKey="seeOrderShipping"/>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AdminTranslateElementActionGroup">
12+
<arguments>
13+
<argument name="elementSelector" type="string"/>
14+
<argument name="translateText" type="string"/>
15+
</arguments>
16+
17+
<executeJS function="jQuery('{{elementSelector}}').mousemove()" stepKey="moveMouseOverSelector"/>
18+
<executeJS function="jQuery('{{InlineTranslationModeSection.bookIcon}}').click()" stepKey="clickBookIcon"/>
19+
<waitForPageLoad stepKey="waitForLoadWindow"/>
20+
21+
<seeElement selector="{{InlineTranslationModeSection.popUpTranslate}}" stepKey="seeTranslateForm"/>
22+
<fillField userInput="{{translateText}}" selector="{{InlineTranslationModeSection.inputCustomTranslate}}" stepKey="addTranslate"/>
23+
<click selector="{{InlineTranslationModeSection.buttonSubmit}}" stepKey="clickSubmitButton"/>
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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="AssertElementInTranslateInlineModeActionGroup">
12+
<arguments>
13+
<argument name="elementSelector" type="string"/>
14+
</arguments>
15+
16+
<executeJS function="return window.getComputedStyle(document.querySelector('{{elementSelector}}')).getPropertyValue('outline-color')" stepKey="getBorderColor"/>
17+
<executeJS function="return window.getComputedStyle(document.querySelector('{{elementSelector}}')).getPropertyValue('outline-style')" stepKey="getBorderType"/>
18+
<executeJS function="return window.getComputedStyle(document.querySelector('{{elementSelector}}')).getPropertyValue('outline-width')" stepKey="getBorderWidth"/>
19+
20+
<assertContains actual="$getBorderColor" expected="{{TranslateInlineModeStyleData.borderColor}}" expectedType="string" stepKey="assertBorderColor"/>
21+
<assertContains actual="$getBorderType" expected="{{TranslateInlineModeStyleData.borderType}}" expectedType="string" stepKey="assertBorderType"/>
22+
<assertContains actual="$getBorderWidth" expected="{{TranslateInlineModeStyleData.borderWidth}}" expectedType="string" stepKey="assertBorderWidth"/>
23+
24+
</actionGroup>
25+
</actionGroups>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
12+
<entity name="TranslateInlineModeStyleData">
13+
<data key="borderColor">rgb(255, 0, 0)</data>
14+
<data key="borderType">dotted</data>
15+
<data key="borderWidth">1px</data>
16+
</entity>
17+
</entities>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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="InlineTranslationModeCheckoutSection">
12+
<!-- Shipping Step -->
13+
<element name="progressBarActive" type="text" selector=".opc-progress-bar ._active span"/>
14+
<element name="stepTitleShipping" type="text" selector="#shipping div.step-title"/>
15+
<element name="buttonShippingHere" type="button" selector="button.action-select-shipping-item span"/>
16+
<element name="buttonNewAddress" type="button" selector=".action-show-popup span"/>
17+
<element name="titleShippingMethod" type="text" selector=".checkout-shipping-method .step-title"/>
18+
<element name="buttonNext" type="button" selector="#shipping-method-buttons-container button.primary span"/>
19+
<!-- Step Review & Payments -->
20+
<element name="titlePayment" type="text" selector=".payment-group .step-title"/>
21+
<element name="checkboxSameBillingAddress" type="text" selector=".billing-address-same-as-shipping-block span"/>
22+
<element name="buttonPlaceOrder" type="text" selector=".actions-toolbar button.checkout span"/>
23+
<element name="textApplyDiscountCode" type="text" selector="#block-discount-heading span"/>
24+
<!-- Sidebar "Order Summary" -->
25+
<element name="titleOrderSummary" type="text" selector=".opc-block-summary span.title"/>
26+
<element name="itemsInCartText" type="text" selector=".items-in-cart strong span:nth-of-type(2)"/>
27+
<element name="textCartSubtotal" type="text" selector=".totals.sub th.mark"/>
28+
<element name="textShippingTotal" type="text" selector=".totals.shipping span.label"/>
29+
<element name="textOrderTotal" type="text" selector=".grand.totals th strong"/>
30+
<element name="titleShipTo" type="text" selector=".ship-to>.shipping-information-title>span"/>
31+
<element name="titleShopVia" type="text" selector=".ship-via>.shipping-information-title>span"/>
32+
</section>
33+
</sections>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="InlineTranslationModeMiniCartSection">
12+
<element name="viewAndEditCart" type="text" selector=".action.viewcart span"/>
13+
<element name="visibleItemsCountText" type="text" selector=".items-total > span:nth-of-type(2)"/>
14+
<element name="textCartSubtotal" type="text" selector=".subtotal .label span" />
15+
<element name="labelQty" type="text" selector=".details-qty label"/>
16+
</section>
17+
</sections>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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="InlineTranslationModeSection">
12+
<element name="bookIcon" type="button" selector=".translate-edit-icon"/>
13+
<element name="popUpTranslate" type="block" selector="#translate-inline-form"/>
14+
<element name="inputCustomTranslate" type="input" selector="#translate-inline-form input.input-text"/>
15+
<element name="buttonSubmit" type="button" selector="button.action-primary" timeout="30"/>
16+
</section>
17+
</sections>

0 commit comments

Comments
 (0)