Skip to content

Commit 771ce44

Browse files
merge magento/2.4-develop into magento-chaika/Chaika-PR24-2020-01-22
2 parents c0db7de + 2c553dd commit 771ce44

File tree

43 files changed

+1235
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1235
-203
lines changed

app/code/Magento/Backend/view/adminhtml/web/js/translate.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ define([
3535
* @return {String}
3636
*/
3737
this.translate = function (text) {
38-
return _data[text] ? _data[text] : text;
38+
return typeof _data[text] === 'string' ? _data[text] : text;
3939
};
4040

4141
return this;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<argument name="value" type="string"/>
1717
</arguments>
1818

19-
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSeoSection"/>
19+
<conditionalClick selector="{{AdminCategorySEOSection.SectionHeader}}" dependentSelector="{{AdminCategorySEOSection.sectionBody}}" visible="false" stepKey="openSeoSection"/>
2020
<fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{value}}" stepKey="enterURLKey"/>
2121
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
2222
<seeElement selector="{{AdminCategoryMessagesSection.SuccessMessage}}" stepKey="assertSuccessMessage"/>

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<argument name="value" type="string"/>
1717
</arguments>
1818

19-
<click selector="{{AdminCategorySEOSection.SectionHeader}}" stepKey="openSeoSection"/>
19+
<conditionalClick selector="{{AdminCategorySEOSection.SectionHeader}}" dependentSelector="{{AdminCategorySEOSection.sectionBody}}" visible="false" stepKey="openSeoSection"/>
2020
<uncheckOption selector="{{AdminCategorySEOSection.UrlKeyDefaultValueCheckbox}}" stepKey="uncheckDefaultValue"/>
2121
<fillField selector="{{AdminCategorySEOSection.UrlKeyInput}}" userInput="{{value}}" stepKey="enterURLKey"/>
2222
<click selector="{{AdminCategoryMainActionsSection.SaveButton}}" stepKey="saveCategory"/>
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="StorefrontProductPageSelectDropDownOptionValueActionGroup">
12+
<annotations>
13+
<description>Selects the provided Product Option Value under the provided DropDown Product Option Title on a Storefront Product page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="attributeLabel" type="string" defaultValue="{{ProductAttributeFrontendLabel.label}}"/>
17+
<argument name="optionLabel" type="string" defaultValue="{{productAttributeOption1.label}}"/>
18+
</arguments>
19+
20+
<selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelect(attributeLabel)}}" userInput="{{optionLabel}}" stepKey="fillDropDownAttributeOption"/>
21+
</actionGroup>
22+
</actionGroups>
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="StorefrontProductPageSelectRadioButtonOptionValueActionGroup">
12+
<annotations>
13+
<description>Selects the provided Product Option Value under the provided Radio Button Product Option Title on a Storefront Product page.</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="attributeLabel" type="string" defaultValue="{{ProductAttributeFrontendLabel.label}}"/>
17+
<argument name="optionLabel" type="string" defaultValue="{{productAttributeOption1.label}}"/>
18+
</arguments>
19+
20+
<checkOption selector="{{StorefrontProductInfoMainSection.productAttributeOptionsRadioButtonByName(attributeLabel, optionLabel)}}" stepKey="fillRadioButtonAttributeOption"/>
21+
</actionGroup>
22+
</actionGroups>
Lines changed: 72 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,72 @@
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="RememberPaginationCatalogStorefrontConfig" type="catalog_storefront_config">
12-
<requiredEntity type="grid_per_page_values">GridPerPageValues</requiredEntity>
13-
<requiredEntity type="remember_pagination">RememberCategoryPagination</requiredEntity>
14-
</entity>
15-
16-
<entity name="GridPerPageValues" type="grid_per_page_values">
17-
<data key="value">9,12,20,24</data>
18-
</entity>
19-
20-
<entity name="RememberCategoryPagination" type="remember_pagination">
21-
<data key="value">1</data>
22-
</entity>
23-
24-
<entity name="DefaultCatalogStorefrontConfiguration" type="default_catalog_storefront_config">
25-
<requiredEntity type="catalogStorefrontFlagZero">DefaultCatalogStorefrontFlagZero</requiredEntity>
26-
<data key="list_allow_all">DefaultListAllowAll</data>
27-
<data key="flat_catalog_product">DefaultFlatCatalogProduct</data>
28-
</entity>
29-
30-
<entity name="DefaultCatalogStorefrontFlagZero" type="catalogStorefrontFlagZero">
31-
<data key="value">0</data>
32-
</entity>
33-
34-
<entity name="DefaultListAllowAll" type="list_allow_all">
35-
<data key="value">0</data>
36-
</entity>
37-
38-
<entity name="DefaultFlatCatalogProduct" type="flat_catalog_product">
39-
<data key="value">0</data>
40-
</entity>
41-
42-
<entity name="UseFlatCatalogCategoryAndProduct" type="catalog_storefront_config">
43-
<requiredEntity type="flat_catalog_product">UseFlatCatalogProduct</requiredEntity>
44-
<requiredEntity type="flat_catalog_category">UseFlatCatalogCategory</requiredEntity>
45-
</entity>
46-
47-
<entity name="UseFlatCatalogProduct" type="flat_catalog_product">
48-
<data key="value">1</data>
49-
</entity>
50-
51-
<entity name="UseFlatCatalogCategory" type="flat_catalog_category">
52-
<data key="value">1</data>
53-
</entity>
54-
55-
<entity name="DefaultFlatCatalogCategoryAndProduct" type="catalog_storefront_config">
56-
<requiredEntity type="flat_catalog_product">DefaultFlatCatalogProduct</requiredEntity>
57-
<requiredEntity type="flat_catalog_category">DefaultFlatCatalogCategory</requiredEntity>
58-
</entity>
59-
60-
<entity name="DefaultFlatCatalogCategory" type="flat_catalog_category">
61-
<data key="value">0</data>
62-
</entity>
63-
</entities>
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="RememberPaginationCatalogStorefrontConfig" type="catalog_storefront_config">
12+
<requiredEntity type="grid_per_page_values">GridPerPageValues</requiredEntity>
13+
<requiredEntity type="remember_pagination">RememberCategoryPagination</requiredEntity>
14+
</entity>
15+
16+
<entity name="GridPerPageValues" type="grid_per_page_values">
17+
<data key="value">9,12,20,24</data>
18+
</entity>
19+
20+
<entity name="RememberCategoryPagination" type="remember_pagination">
21+
<data key="value">1</data>
22+
</entity>
23+
24+
<entity name="DefaultCatalogStorefrontConfiguration" type="default_catalog_storefront_config">
25+
<requiredEntity type="catalogStorefrontFlagZero">DefaultCatalogStorefrontFlagZero</requiredEntity>
26+
<data key="list_allow_all">DefaultListAllowAll</data>
27+
<data key="flat_catalog_product">DefaultFlatCatalogProduct</data>
28+
</entity>
29+
30+
<entity name="DefaultCatalogStorefrontFlagZero" type="catalogStorefrontFlagZero">
31+
<data key="value">0</data>
32+
</entity>
33+
34+
<entity name="DefaultListAllowAll" type="list_allow_all">
35+
<data key="value">0</data>
36+
</entity>
37+
38+
<entity name="DefaultFlatCatalogProduct" type="flat_catalog_product">
39+
<data key="value">0</data>
40+
</entity>
41+
42+
<entity name="UseFlatCatalogCategoryAndProduct" type="catalog_storefront_config">
43+
<requiredEntity type="flat_catalog_product">UseFlatCatalogProduct</requiredEntity>
44+
<requiredEntity type="flat_catalog_category">UseFlatCatalogCategory</requiredEntity>
45+
</entity>
46+
47+
<entity name="UseFlatCatalogProduct" type="flat_catalog_product">
48+
<data key="value">1</data>
49+
</entity>
50+
51+
<entity name="UseFlatCatalogCategory" type="flat_catalog_category">
52+
<data key="value">1</data>
53+
</entity>
54+
55+
<entity name="DefaultFlatCatalogCategoryAndProduct" type="catalog_storefront_config">
56+
<requiredEntity type="flat_catalog_product">DefaultFlatCatalogProduct</requiredEntity>
57+
<requiredEntity type="flat_catalog_category">DefaultFlatCatalogCategory</requiredEntity>
58+
</entity>
59+
60+
<entity name="DefaultFlatCatalogCategory" type="flat_catalog_category">
61+
<data key="value">0</data>
62+
</entity>
63+
64+
<entity name="DefaultGridPerPageValuesConfigData">
65+
<data key="path">catalog/frontend/grid_per_page_values</data>
66+
<data key="value">12,24,36</data>
67+
</entity>
68+
<entity name="CustomGridPerPageValuesConfigData">
69+
<data key="path">catalog/frontend/grid_per_page_values</data>
70+
<data key="value">1,2</data>
71+
</entity>
72+
</entities>

app/code/Magento/Catalog/Test/Mftf/Section/AdminCategorySEOSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminCategorySEOSection">
12-
<element name="SectionHeader" type="button" selector="div[data-index='search_engine_optimization']" timeout="30"/>
12+
<element name="SectionHeader" type="button" selector="div[data-index='search_engine_optimization'] .fieldset-wrapper-title" timeout="30"/>
13+
<element name="sectionBody" type="text" selector="div[data-index='search_engine_optimization'] .admin__fieldset-wrapper-content"/>
1314
<element name="UrlKeyInput" type="input" selector="input[name='url_key']"/>
1415
<element name="UrlKeyDefaultValueCheckbox" type="button" selector="input[name='use_default[url_key]']"/>
1516
<element name="UrlKeyRedirectCheckbox" type="button" selector="[data-index='url_key_create_redirect'] input[type='checkbox']"/>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontCategoryBottomToolbarSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
<element name="previousPage" type="button" selector=".//*[@class='toolbar toolbar-products'][2]//a[contains(@class, 'previous')]" timeout="30"/>
1313
<element name="pageNumber" type="text" selector="//*[@class='toolbar toolbar-products'][2]//a[contains(@class, 'page')]//span[2][contains(text() ,'{{var1}}')]" parameterized="true"/>
1414
<element name="perPage" type="select" selector="//*[@class='toolbar toolbar-products'][2]//select[@id='limiter']"/>
15+
<element name="currentPage" type="text" selector=".products.wrapper + .toolbar-products .pages .current span:nth-of-type(2)"/>
1516
</section>
1617
</sections>

app/code/Magento/Catalog/Test/Mftf/Section/StorefrontProductInfoMainSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@
6262
<element name="productAttributeOptionsPrice" type="text" selector="//label[contains(.,'{{var1}}')]//span[@data-price-amount='{{var2}}']" parameterized="true"/>
6363
<element name="productAttributeOptionsDropDown" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[@price='{{var2}}']" parameterized="true"/>
6464
<element name="productAttributeOptionsRadioButtons" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//span[@data-price-amount='{{var2}}']" parameterized="true"/>
65+
<element name="productAttributeOptionsRadioButtonByName" type="checkbox" selector="//*[@id='product-options-wrapper']//div[contains(@class,'fieldset')]//label[contains(.,'{{attributeName}}')]/../div[contains(@class,'control')]//label[contains(@class,'label') and contains(.,'{{optionName}}')]/preceding-sibling::input[@type='radio']" parameterized="true"/>
6566
<element name="productAttributeOptionsCheckbox" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//span[@data-price-amount='{{var2}}']" parameterized="true"/>
6667
<element name="productAttributeOptionsMultiselect" type="text" selector="//label[contains(.,'{{var1}}')]/../div[@class='control']//select//option[@price='{{var2}}']" parameterized="true"/>
6768
<element name="productAttributeOptionsData" type="text" selector="//span[contains(.,'{{var1}}')]/../span[@class='price-notice']//span[@data-price-amount='{{var2}}']" parameterized="true"/>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<severity value="CRITICAL"/>
1818
<group value="catalog"/>
1919
<group value="mtf_migrated"/>
20+
<skip>
21+
<issueId value="MC-30682"/>
22+
</skip>
2023
</annotations>
2124
<before>
2225
<actionGroup ref="LoginAsAdmin" stepKey="loginAsAdmin"/>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<severity value="CRITICAL"/>
1717
<testCaseId value="MAGETWO-76273"/>
1818
<group value="category"/>
19+
<skip>
20+
<issueId value="MC-30720"/>
21+
</skip>
1922
</annotations>
2023
<before>
2124
<createData entity="SimpleSubCategory" stepKey="simpleSubCategoryOne"/>

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<severity value="CRITICAL"/>
1818
<group value="catalog"/>
1919
<group value="mtf_migrated"/>
20+
<skip>
21+
<issueId value="MC-30166"/>
22+
</skip>
2023
</annotations>
2124

2225
<before>
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
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="AdminCatalogPriceRuleDeleteAllActionGroup">
11+
<annotations>
12+
<description>Open Catalog Price Rule grid and delete all rules one by one. Need to avoid interference with other tests that test catalog price rules.</description>
13+
</annotations>
14+
<amOnPage url="{{AdminCatalogPriceRuleGridPage.url}}" stepKey="goToAdminCatalogPriceRuleGridPage"/>
15+
<!-- It sometimes is loading too long for default 10s -->
16+
<waitForPageLoad time="60" stepKey="waitForPageFullyLoaded"/>
17+
<conditionalClick selector="{{AdminDataGridHeaderSection.clearFilters}}" dependentSelector="{{AdminDataGridHeaderSection.clearFilters}}" visible="true" stepKey="clearExistingFilters"/>
18+
<executeInSelenium
19+
function="
20+
function ($webdriver) use ($I) {
21+
$rows = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::cssSelector('table.data-grid tbody tr[data-role=row]:not(.data-grid-tr-no-data):nth-of-type(1)'));
22+
while(!empty($rows)) {
23+
$rows[0]->click();
24+
$I->waitForPageLoad(30);
25+
$I->click('#delete');
26+
$I->waitForPageLoad(30);
27+
$I->waitForElementVisible('aside.confirm .modal-footer button.action-accept', 10);
28+
$I->waitForPageLoad(60);
29+
$I->click('aside.confirm .modal-footer button.action-accept');
30+
$I->waitForPageLoad(60);
31+
$I->waitForLoadingMaskToDisappear();
32+
$I->waitForElementVisible('#messages div.message-success', 10);
33+
$I->see('You deleted the rule.', '#messages div.message-success');
34+
$rows = $webdriver->findElements(\Facebook\WebDriver\WebDriverBy::cssSelector('table.data-grid tbody tr[data-role=row]:not(.data-grid-tr-no-data):nth-of-type(1)'));
35+
}
36+
}"
37+
stepKey="deleteAllCatalogPriceRulesOneByOne"/>
38+
<waitForElementVisible selector="{{AdminDataGridTableSection.dataGridEmpty}}" stepKey="waitDataGridEmptyMessageAppears"/>
39+
<see selector="{{AdminDataGridTableSection.dataGridEmpty}}" userInput="We couldn't find any records." stepKey="assertDataGridEmptyMessage"/>
40+
</actionGroup>
41+
</actionGroups>
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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="AdminCatalogPriceRuleFillActionsActionGroup">
11+
<annotations>
12+
<description>Fill Catalog Price Rule actions fields: Apply, Discount Amount, Discard subsequent rules.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="apply" type="string" defaultValue="{{_defaultCatalogRule.simple_action}}"/>
16+
<argument name="discountAmount" type="string" defaultValue="{{_defaultCatalogRule.discount_amount}}"/>
17+
<argument name="discardSubsequentRules" type="string" defaultValue="Yes"/>
18+
</arguments>
19+
20+
<conditionalClick selector="{{AdminNewCatalogPriceRule.actionsTabTitle}}" dependentSelector="{{AdminNewCatalogPriceRule.actionsTabBody}}" visible="false" stepKey="openActionSectionIfNeeded"/>
21+
<scrollTo selector="{{AdminNewCatalogPriceRule.actionsTabTitle}}" stepKey="scrollToActionsFieldset"/>
22+
<waitForElementVisible selector="{{AdminNewCatalogPriceRuleActions.apply}}" stepKey="waitActionsFieldsetFullyOpened"/>
23+
<selectOption selector="{{AdminNewCatalogPriceRuleActions.apply}}" userInput="{{apply}}" stepKey="fillDiscountType"/>
24+
<fillField selector="{{AdminNewCatalogPriceRuleActions.discountAmount}}" userInput="{{discountAmount}}" stepKey="fillDiscountAmount"/>
25+
<selectOption selector="{{AdminNewCatalogPriceRuleActions.disregardRules}}" userInput="{{discardSubsequentRules}}" stepKey="fillDiscardSubsequentRules"/>
26+
</actionGroup>
27+
</actionGroups>

0 commit comments

Comments
 (0)