Skip to content

Commit 06d5f72

Browse files
committed
Merge branch '2.3-develop' into issue-316-delete-admin-user-entity
# Conflicts: # app/code/Magento/User/Test/Mftf/ActionGroup/AdminOpenUserEditPageActionGroup.xml
2 parents 3a27f1c + 63f34c6 commit 06d5f72

File tree

118 files changed

+3504
-85
lines changed

Some content is hidden

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

118 files changed

+3504
-85
lines changed
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="AdminClickFormActionButtonActionGroup">
12+
<arguments>
13+
<argument name="buttonSelector" type="string" />
14+
</arguments>
15+
<waitForElementVisible selector="{{buttonSelector}}" stepKey="waitForButton"/>
16+
<click selector="{{buttonSelector}}" stepKey="clickButton"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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="AdminFilterLegacyGridActionGroup">
12+
<arguments>
13+
<argument name="fieldSelector" type="string"/>
14+
<argument name="value" type="string"/>
15+
<argument name="button" type="string" defaultValue="{{AdminLegacyDataGridFilterSection.apply}}"/>
16+
</arguments>
17+
<click selector="{{AdminLegacyDataGridFilterSection.clear}}" stepKey="resetFilters" />
18+
<waitForPageLoad stepKey="waitForFilterReset" />
19+
<fillField selector="{{field}}" userInput="{{value}}" stepKey="fillFieldInFilter"/>
20+
<click selector="{{button}}" stepKey="clickSearchButton"/>
21+
<waitForPageLoad stepKey="waitForFiltersApply" />
22+
</actionGroup>
23+
</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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminResetLegacyGridFilterActionGroup">
12+
<arguments>
13+
<argument name="selector" type="string" defaultValue="{{AdminLegacyDataGridFilterSection.clear}}"/>
14+
</arguments>
15+
<click selector="{{selector}}" stepKey="clickResetButton"/>
16+
</actionGroup>
17+
</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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminLegacyDataGridFilterSection">
12+
<element name="filterForm" type="block" selector="[data-role='filter-form']" />
13+
<element name="inputFieldByNameAttr" type="input" selector="[data-role='filter-form'] input[name='{{inputNameAttr}}']" parameterized="true" />
14+
<element name="apply" type="button" selector=".admin__data-grid-header [data-action='grid-filter-apply']" />
15+
<element name="clear" type="button" selector=".admin__data-grid-header [data-action='grid-filter-reset']" />
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="AdminLegacyDataGridTableSection">
12+
<element name="rowTemplateStrict" type="block" selector="//tbody/tr[td[text()[normalize-space()='{{text}}']]]" parameterized="true" />
13+
<element name="rowTemplate" type="block" selector="//tbody/tr[td[contains(.,normalize-space('{{text}}'))]]" parameterized="true" />
14+
<element name="columnTemplateStrict" type="block" selector="//tbody/tr[td[contains(.,normalize-space('{{text}}'))]]/td[@data-column='{{dataColumn}}']" parameterized="true" />
15+
<element name="columnTemplate" type="block" selector="//tbody/tr[td[contains(.,normalize-space('{{text}}'))]]/td[@data-column='{{dataColumn}}']" parameterized="true" />
16+
</section>
17+
</sections>

app/code/Magento/Backend/Test/Mftf/Section/AdminMainActionsSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,7 @@
1313
<element name="saveAndContinue" type="button" selector="button[id*=save_and_continue]" timeout="30"/>
1414
<element name="delete" type="button" selector="#delete" timeout="30"/>
1515
<element name="add" type="button" selector="#add" timeout="30"/>
16+
<element name="cancelDelete" type="button" selector=".modal-popup.confirm button.action-dismiss" timeout="10"/>
17+
<element name="confirmDelete" type="button" selector=".modal-popup.confirm button.action-accept" timeout="10"/>
1618
</section>
1719
</sections>

app/code/Magento/Bundle/Test/Mftf/Section/AdminProductFormBundleSection.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,9 @@
4141
<element name="contentDropDownIfNotShowing" type="button" selector="//div[@data-index='content']//div[contains(@class, '_hide')]"/>
4242
<element name="longDescription" type="input" selector="#product_form_description"/>
4343
<element name="shortDescription" type="input" selector="#product_form_short_description"/>
44-
<!--BundleOptinsDropDown-->
44+
<!--BundleOptionsDropDown-->
4545
<element name="bundleOptionsDropDown" type="button" selector="div[data-index='bundle-items']" timeout="30"/>
46+
<element name="currentBundleOption" type="text" selector="//div[@data-index='bundle-items']//div[contains(@class, 'admin__collapsible-title')]/span"/>
4647
<!--AddingAnOption-->
4748
<element name="addOptions" type="button" selector="//tr[@data-repeat-index='0']//td[4]" timeout="30"/>
4849
<!--SEODropdownTab-->

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@
249249
<waitForPageLoad time="60" stepKey="WaitForProductSave1"/>
250250
<see userInput="You saved the product." stepKey="seeSaveConfirmation"/>
251251
</actionGroup>
252+
<actionGroup name="ProductSetAdvancedTierFixedPricing" extends="ProductSetAdvancedPricing">
253+
<remove keyForRemoval="selectProductTierPricePriceInput"/>
254+
<fillField selector="{{AdminProductFormAdvancedPricingSection.productTierPriceFixedPriceInput('0')}}" userInput="{{amount}}" stepKey="selectProductTierPricePriceInput" after="selectProductTierPriceValueType"/>
255+
</actionGroup>
252256

253257
<!--Assert text in Related, Up-Sell or Cross-Sell section in Admin Product page-->
254258
<actionGroup name="AssertTextInAdminProductRelatedUpSellCrossSellSection">

app/code/Magento/CatalogImportExport/Model/Import/Product/Option.php

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -669,6 +669,7 @@ protected function _findNewOptionsWithTheSameTitles()
669669
*
670670
* @param array $sourceProductData
671671
* @return array
672+
* phpcs:disable Generic.Metrics.NestingLevel
672673
*/
673674
protected function _getNewOptionsWithTheSameTitlesErrorRows(array $sourceProductData)
674675
{
@@ -697,6 +698,7 @@ protected function _getNewOptionsWithTheSameTitlesErrorRows(array $sourceProduct
697698
* Find options with the same titles in DB
698699
*
699700
* @return array
701+
* phpcs:disable Generic.Metrics.NestingLevel
700702
*/
701703
protected function _findOldOptionsWithTheSameTitles()
702704
{
@@ -730,6 +732,7 @@ protected function _findOldOptionsWithTheSameTitles()
730732
* Find source file options, which have analogs in DB with the same name, but with different type
731733
*
732734
* @return array
735+
* phpcs:disable Generic.Metrics.NestingLevel
733736
*/
734737
protected function _findNewOldOptionsTypeMismatch()
735738
{
@@ -1067,7 +1070,7 @@ protected function _isSecondaryOptionRow(array $rowData)
10671070
*
10681071
* @param array &$options
10691072
* @param array &$titles
1070-
* @param array $typeValues
1073+
* @param array $typeValues
10711074
* @return bool
10721075
*/
10731076
protected function _isReadyForSaving(array &$options, array &$titles, array $typeValues)
@@ -1414,9 +1417,9 @@ protected function _initProductsSku()
14141417
/**
14151418
* Collect custom option main data to import
14161419
*
1417-
* @param array $rowData
1418-
* @param int &$prevOptionId
1419-
* @param int &$nextOptionId
1420+
* @param array $rowData
1421+
* @param int &$prevOptionId
1422+
* @param int &$nextOptionId
14201423
* @param array &$products
14211424
* @param array &$prices
14221425
* @return array|null
@@ -1454,9 +1457,9 @@ protected function _collectOptionMainData(
14541457
/**
14551458
* Collect custom option type data to import
14561459
*
1457-
* @param array $rowData
1458-
* @param int &$prevOptionId
1459-
* @param int &$nextValueId
1460+
* @param array $rowData
1461+
* @param int &$prevOptionId
1462+
* @param int &$nextValueId
14601463
* @param array &$typeValues
14611464
* @param array &$typePrices
14621465
* @param array &$typeTitles
@@ -1504,6 +1507,9 @@ protected function _collectOptionTypeData(
15041507
$specificTypeData = $this->_getSpecificTypeData($rowData, 0, false);
15051508
//For others stores
15061509
if ($specificTypeData) {
1510+
if (isset($specificTypeData['price'])) {
1511+
$typePrices[$nextValueId][$this->_rowStoreId] = $specificTypeData['price'];
1512+
}
15071513
$typeTitles[$nextValueId++][$this->_rowStoreId] = $specificTypeData['title'];
15081514
}
15091515
}
@@ -1512,8 +1518,8 @@ protected function _collectOptionTypeData(
15121518
/**
15131519
* Collect custom option title to import
15141520
*
1515-
* @param array $rowData
1516-
* @param int $prevOptionId
1521+
* @param array $rowData
1522+
* @param int $prevOptionId
15171523
* @param array &$titles
15181524
* @return void
15191525
*/
@@ -1788,29 +1794,30 @@ protected function _getPriceData(array $rowData, $optionId, $type)
17881794
*/
17891795
protected function _getSpecificTypeData(array $rowData, $optionTypeId, $defaultStore = true)
17901796
{
1797+
$data = [];
1798+
$priceData = [];
1799+
$customOptionRowPrice = $rowData[self::COLUMN_ROW_PRICE];
1800+
if (!empty($customOptionRowPrice) || $customOptionRowPrice === '0') {
1801+
$priceData['price'] = (double)rtrim($rowData[self::COLUMN_ROW_PRICE], '%');
1802+
$priceData['price_type'] = ('%' == substr($rowData[self::COLUMN_ROW_PRICE], -1)) ? 'percent' : 'fixed';
1803+
}
17911804
if (!empty($rowData[self::COLUMN_ROW_TITLE]) && $defaultStore && empty($rowData[self::COLUMN_STORE])) {
17921805
$valueData = [
17931806
'option_type_id' => $optionTypeId,
17941807
'sort_order' => empty($rowData[self::COLUMN_ROW_SORT]) ? 0 : abs($rowData[self::COLUMN_ROW_SORT]),
17951808
'sku' => !empty($rowData[self::COLUMN_ROW_SKU]) ? $rowData[self::COLUMN_ROW_SKU] : '',
17961809
];
1797-
1798-
$priceData = false;
1799-
$customOptionRowPrice = $rowData[self::COLUMN_ROW_PRICE];
1800-
if (!empty($customOptionRowPrice) || $customOptionRowPrice === '0') {
1801-
$priceData = [
1802-
'price' => (double)rtrim($rowData[self::COLUMN_ROW_PRICE], '%'),
1803-
'price_type' => 'fixed',
1804-
];
1805-
if ('%' == substr($rowData[self::COLUMN_ROW_PRICE], -1)) {
1806-
$priceData['price_type'] = 'percent';
1807-
}
1808-
}
1809-
return ['value' => $valueData, 'title' => $rowData[self::COLUMN_ROW_TITLE], 'price' => $priceData];
1810+
$data['value'] = $valueData;
1811+
$data['title'] = $rowData[self::COLUMN_ROW_TITLE];
1812+
$data['price'] = $priceData;
18101813
} elseif (!empty($rowData[self::COLUMN_ROW_TITLE]) && !$defaultStore && !empty($rowData[self::COLUMN_STORE])) {
1811-
return ['title' => $rowData[self::COLUMN_ROW_TITLE]];
1814+
if ($priceData) {
1815+
$data['price'] = $priceData;
1816+
}
1817+
$data['title'] = $rowData[self::COLUMN_ROW_TITLE];
18121818
}
1813-
return false;
1819+
1820+
return $data ?: false;
18141821
}
18151822

18161823
/**
@@ -1868,7 +1875,9 @@ protected function _saveTitles(array $titles)
18681875
{
18691876
$titleRows = [];
18701877
foreach ($titles as $optionId => $storeInfo) {
1871-
foreach ($storeInfo as $storeId => $title) {
1878+
//for use default
1879+
$uniqStoreInfo = array_unique($storeInfo);
1880+
foreach ($uniqStoreInfo as $storeId => $title) {
18721881
$titleRows[] = ['option_id' => $optionId, 'store_id' => $storeId, 'title' => $title];
18731882
}
18741883
}
@@ -1963,7 +1972,9 @@ protected function _saveSpecificTypeTitles(array $typeTitles)
19631972
{
19641973
$optionTypeTitleRows = [];
19651974
foreach ($typeTitles as $optionTypeId => $storesData) {
1966-
foreach ($storesData as $storeId => $title) {
1975+
//for use default
1976+
$uniqStoresData = array_unique($storesData);
1977+
foreach ($uniqStoresData as $storeId => $title) {
19671978
$optionTypeTitleRows[] = [
19681979
'option_type_id' => $optionTypeId,
19691980
'store_id' => $storeId,
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="CheckoutFillEstimateShippingAndTaxActionGroup">
12+
<arguments>
13+
<argument name="address" defaultValue="US_Address_TX" type="entity"/>
14+
</arguments>
15+
<conditionalClick selector="{{CheckoutCartSummarySection.estimateShippingAndTax}}" dependentSelector="{{CheckoutCartSummarySection.estimateShippingAndTaxSummary}}" visible="false" stepKey="openShippingDetails"/>
16+
<selectOption selector="{{CheckoutCartSummarySection.country}}" userInput="{{address.country_id}}" stepKey="selectCountry"/>
17+
<selectOption selector="{{CheckoutCartSummarySection.stateProvince}}" userInput="{{address.state}}" stepKey="selectState"/>
18+
<waitForElementVisible selector="{{CheckoutCartSummarySection.postcode}}" stepKey="waitForPostCodeVisible"/>
19+
<fillField selector="{{CheckoutCartSummarySection.postcode}}" userInput="{{address.postcode}}" stepKey="selectPostCode"/>
20+
<waitForLoadingMaskToDisappear stepKey="waitForLoadingMaskToDiappear"/>
21+
</actionGroup>
22+
</actionGroups>

0 commit comments

Comments
 (0)