Skip to content

Commit e2882ea

Browse files
committed
MC-32977: Unskip StorefrontButtonsInlineTranslationTest (MC-12735) and check it green on Jenkins
1 parent 4a3cebd commit e2882ea

7 files changed

+157
-7
lines changed

app/code/Magento/Translation/Test/Mftf/ActionGroup/AdminTranslateElementActionGroup.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,15 @@
88

99
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11-
<actionGroup name="AdminTranslateElementActionGroup">
11+
<actionGroup name="AdminTranslateElementActionGroup" deprecated="Avoid using super-ActionGroups. Use StorefrontOpenInlineTranslationPopupActionGroup, AssertStorefrontInlineTranslationPopupAppearsActionGroup, StorefrontFillTranslationFieldActionGroup and StorefrontSubmitInlineTranslationFormActionGroup">
12+
<annotations>
13+
<description>DEPRECATED. Avoid using super-ActionGroups. Use StorefrontOpenInlineTranslationPopupActionGroup, AssertStorefrontInlineTranslationPopupAppearsActionGroup, StorefrontFillTranslationFieldActionGroup and StorefrontSubmitInlineTranslationFormActionGroup.</description>
14+
</annotations>
1215
<arguments>
1316
<argument name="elementSelector" type="string"/>
1417
<argument name="translateText" type="string"/>
1518
</arguments>
16-
19+
1720
<executeJS function="jQuery('{{elementSelector}}').mousemove()" stepKey="moveMouseOverSelector"/>
1821
<executeJS function="jQuery('{{InlineTranslationModeSection.bookIcon}}').click()" stepKey="clickBookIcon"/>
1922
<waitForPageLoad stepKey="waitForLoadWindow"/>
@@ -23,4 +26,4 @@
2326
<fillField userInput="{{translateText}}" selector="{{InlineTranslationModeSection.inputCustomTranslate}}" stepKey="addTranslate"/>
2427
<click selector="{{InlineTranslationModeSection.buttonSubmit}}" stepKey="clickSubmitButton"/>
2528
</actionGroup>
26-
</actionGroups>
29+
</actionGroups>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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="AssertStorefrontInlineTranslationPopupAppearsActionGroup">
12+
<annotations>
13+
<description>Validate that the Inline Translation popup appears on the page.</description>
14+
</annotations>
15+
16+
<waitForElementVisible selector="{{InlineTranslationModeSection.popUpTranslate}}" stepKey="waitForPopupVisible"/>
17+
<seeElement selector="{{InlineTranslationModeSection.popUpTranslate}}" stepKey="seeTranslateForm"/>
18+
</actionGroup>
19+
</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+
<actionGroup name="StorefrontFillTranslationFieldActionGroup">
12+
<annotations>
13+
<description>Fill the field in the Inline Translation form by provided text.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="translateText" type="string" defaultValue="Translated"/>
17+
</arguments>
18+
19+
<clearField selector="{{InlineTranslationModeSection.inputCustomTranslate}}" stepKey="clearField"/>
20+
<fillField selector="{{InlineTranslationModeSection.inputCustomTranslate}}" userInput="{{translateText}}" stepKey="fillTranslateField"/>
21+
</actionGroup>
22+
</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+
<actionGroup name="StorefrontOpenInlineTranslationPopupActionGroup">
12+
<annotations>
13+
<description>Open the Inline Translation popup for provided element.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="elementSelector" type="string" defaultValue="{{StorefrontHeaderSection.welcomeMessage}}"/>
17+
</arguments>
18+
19+
<executeJS function="jQuery('{{elementSelector}}').mousemove()" stepKey="moveMouseOverSelector"/>
20+
<executeJS function="jQuery('{{InlineTranslationModeSection.bookIcon}}').click()" stepKey="clickBookIcon"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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="StorefrontSubmitInlineTranslationFormActionGroup">
12+
<annotations>
13+
<description>Click on the Inline Translation form submit button.</description>
14+
</annotations>
15+
16+
<click selector="{{InlineTranslationModeSection.buttonSubmit}}" stepKey="clickSubmitButton"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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="StorefrontButtonsInlineTranslation2Test">
12+
<annotations>
13+
<features value="Translation"/>
14+
<stories value="Inline Translation"/>
15+
<title value="[Inline Translation] Buttons inline translation"/>
16+
<description value="A merchant should be able to translate buttons by an inline translation tool"/>
17+
<severity value="CRITICAL"/>
18+
<testCaseId value="MC-12735"/>
19+
<useCaseId value="MC-20127"/>
20+
<group value="translation"/>
21+
<group value="catalog"/>
22+
<group value="developer_mode_only"/>
23+
</annotations>
24+
<before>
25+
<!-- Enable Translate Inline For Storefront -->
26+
<magentoCLI command="config:set {{EnableTranslateInlineForStorefront.path}} {{EnableTranslateInlineForStorefront.value}}" stepKey="enableTranslateInlineForStorefront"/>
27+
<!-- Create Category -->
28+
<createData entity="ApiCategory" stepKey="createCategory"/>
29+
<!-- Create Simple Product -->
30+
<createData entity="ApiSimpleProduct" stepKey="createProduct">
31+
<requiredEntity createDataKey="createCategory"/>
32+
</createData>
33+
</before>
34+
<after>
35+
<!-- Disable Translate Inline For Storefront -->
36+
<magentoCLI command="config:set {{DisableTranslateInlineForStorefront.path}} {{DisableTranslateInlineForStorefront.value}}" stepKey="disableTranslateInlineForStorefront"/>
37+
<!-- Delete Simple Product -->
38+
<deleteData createDataKey="createProduct" stepKey="deleteProduct"/>
39+
<!-- Delete Category -->
40+
<deleteData createDataKey="createCategory" stepKey="deleteCategory"/>
41+
</after>
42+
43+
<!-- Add product to cart on storefront -->
44+
<amOnPage url="{{StorefrontCategoryPage.url($createCategory.custom_attributes[url_key]$)}}" stepKey="goToCategoryPage"/>
45+
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
46+
<actionGroup ref="StorefrontAddProductToCartFromCategoryActionGroup" stepKey="addProductToCart">
47+
<argument name="productName" value="$createProduct.name$"/>
48+
</actionGroup>
49+
50+
<!-- Open Mini Cart -->
51+
<actionGroup ref="StorefrontOpenMiniCartActionGroup" stepKey="openMiniCart"/>
52+
53+
<!-- Check button "Proceed to Checkout". There must be red borders and "book" icons on labels that can be translated. -->
54+
<actionGroup ref="AssertElementInTranslateInlineModeActionGroup" stepKey="assertRedBordersAndBookIcon">
55+
<argument name="elementSelector" value="{{StorefrontMinicartSection.goToCheckout}}"/>
56+
</actionGroup>
57+
58+
<!-- Open Inline Translation popup -->
59+
<actionGroup ref="StorefrontOpenInlineTranslationPopupActionGroup" stepKey="openInlineTranslationPopup">
60+
<argument name="elementSelector" value="{{StorefrontMinicartSection.goToCheckout}}"/>
61+
</actionGroup>
62+
63+
<!-- Assert that Inline Translation popup appears -->
64+
<actionGroup ref="AssertStorefrontInlineTranslationPopupAppearsActionGroup" stepKey="assertInlineTranslationPopupAppears"/>
65+
</test>
66+
</tests>

app/code/Magento/Translation/Test/Mftf/Test/StorefrontButtonsInlineTranslationTest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88

99
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11-
<test name="StorefrontButtonsInlineTranslationTest">
11+
<test name="StorefrontButtonsInlineTranslationTest" deprecated="Use StorefrontButtonsInlineTranslation2Test instead.">
1212
<annotations>
1313
<features value="Translation"/>
1414
<stories value="Inline Translation"/>
15-
<title value="[Inline Translation] Buttons inline translation"/>
16-
<description value="[Inline Translation] Buttons inline translation"/>
15+
<title value="DEPRECATED [Inline Translation] Buttons inline translation"/>
16+
<description value="DEPRECATED [Inline Translation] Buttons inline translation"/>
1717
<severity value="CRITICAL"/>
1818
<testCaseId value="MC-12735"/>
1919
<group value="translation"/>
2020
<skip>
21-
<issueId value="MC-20127"/>
21+
<issueId value="DEPRECATED">Use StorefrontButtonsInlineTranslation2Test instead.</issueId>
2222
</skip>
2323
</annotations>
2424
<before>

0 commit comments

Comments
 (0)