Skip to content
This repository was archived by the owner on Dec 19, 2019. It is now read-only.

Commit dd85619

Browse files
authored
Merge pull request #185 from magento-pangolin/MC-11505
MC-11505
2 parents 5369557 + 21c504b commit dd85619

9 files changed

+730
-0
lines changed

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="urn:magento:mftf: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>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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+
<clearField selector="{{InlineTranslationModeSection.inputCustomTranslate}}" stepKey="clearField"/>
23+
<fillField userInput="{{translateText}}" selector="{{InlineTranslationModeSection.inputCustomTranslate}}" stepKey="addTranslate"/>
24+
<click selector="{{InlineTranslationModeSection.buttonSubmit}}" stepKey="clickSubmitButton"/>
25+
</actionGroup>
26+
</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=".new-address-popup button 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)