Skip to content

Commit 2b64df6

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MC-15986-story
2 parents 8774f67 + 61a5a30 commit 2b64df6

File tree

53 files changed

+1818
-97
lines changed

Some content is hidden

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

53 files changed

+1818
-97
lines changed

app/code/Magento/Bundle/Test/Mftf/Test/AdminRemoveDefaultImageBundleProductTest.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
<createData entity="SimpleProduct2" stepKey="simpleProduct2"/>
2525
</before>
2626
<after>
27+
<!-- Delete the bundled product we created in the test body -->
28+
<actionGroup ref="deleteProductBySku" stepKey="deleteBundleProduct">
29+
<argument name="sku" value="{{BundleProduct.sku}}"/>
30+
</actionGroup>
2731
<amOnPage url="{{AdminLogoutPage.url}}" stepKey="amOnLogoutPage"/>
2832
<deleteData createDataKey="simpleProduct1" stepKey="deleteSimpleProduct1"/>
2933
<deleteData createDataKey="simpleProduct2" stepKey="deleteSimpleProduct2"/>

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
<element name="filterOptions" type="text" selector=".filter-options-content .items"/>
1313
<element name="filterOption" type="text" selector=".filter-options-content .item"/>
1414
<element name="optionQty" type="text" selector=".filter-options-content .item .count"/>
15+
<element name="filterOptionByLabel" type="button" selector=" div.filter-options-item div[option-label='{{optionLabel}}']" parameterized="true"/>
16+
<element name="removeFilter" type="button" selector="div.filter-current .remove"/>
1517
</section>
1618
<section name="StorefrontCategorySidebarMobileSection">
1719
<element name="shopByButton" type="button" selector="//div[contains(@class, 'filter-title')]/strong[contains(text(), 'Shop By')]"/>
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="AdminAssertDisabledQtyActionGroup">
12+
<annotations>
13+
<description>Goes to the 'Quantity' field and assert disabled attribute.</description>
14+
</annotations>
15+
16+
<seeElement selector="{{AdminProductFormSection.productQuantity}}" stepKey="assertProductQty"/>
17+
<assertElementContainsAttribute selector="{{AdminProductFormSection.productQuantity}}" attribute="disabled" expectedValue="true" stepKey="checkIfQtyIsDisabled" />
18+
</actionGroup>
19+
</actionGroups>

app/code/Magento/CatalogInventory/Ui/DataProvider/Product/Form/Modifier/AdvancedInventory.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
<?php
2-
3-
declare(strict_types=1);
4-
52
/**
63
* Copyright © Magento, Inc. All rights reserved.
74
* See COPYING.txt for license details.
85
*/
6+
declare(strict_types=1);
7+
98
namespace Magento\CatalogInventory\Ui\DataProvider\Product\Form\Modifier;
109

1110
use Magento\Catalog\Controller\Adminhtml\Product\Initialization\StockDataFilter;
@@ -238,7 +237,7 @@ private function prepareMeta()
238237
$this->meta = $this->arrayManager->merge(
239238
$fieldsetPath . '/children',
240239
$this->meta,
241-
['container_quantity_and_stock_status_qty' => $container]
240+
['quantity_and_stock_status_qty' => $container]
242241
);
243242
}
244243
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<element name="totalAmount" type="text" selector="//*[@id='cart-totals']//tr[@class='grand totals']//td//span[@class='price' and contains(text(), '{{amount}}')]" parameterized="true"/>
2121
<element name="proceedToCheckout" type="button" selector=".action.primary.checkout span" timeout="30"/>
2222
<element name="discountAmount" type="text" selector="td[data-th='Discount']"/>
23-
<element name="shippingHeading" type="button" selector="#block-shipping-heading" timeout="60"/>
23+
<element name="shippingHeading" type="button" selector="#block-shipping-heading" timeout="10"/>
2424
<element name="postcode" type="input" selector="input[name='postcode']" timeout="10"/>
2525
<element name="stateProvince" type="select" selector="select[name='region_id']" timeout="10"/>
2626
<element name="stateProvinceInput" type="input" selector="input[name='region']"/>
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+
<suites xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Suite/etc/suiteSchema.xsd">
9+
<suite name="AppConfigDumpSuite">
10+
<before>
11+
<magentoCLI command="app:config:dump" stepKey="configDump"/>
12+
</before>
13+
<after>
14+
</after>
15+
<include>
16+
<test name="AdminCheckInputFieldsDisabledAfterAppConfigDumpTest"/>
17+
</include>
18+
</suite>
19+
</suites>

app/code/Magento/ConfigurableProduct/Ui/DataProvider/Product/Form/Modifier/ConfigurableQty.php

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,12 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\ConfigurableProduct\Ui\DataProvider\Product\Form\Modifier;
79

810
use Magento\Catalog\Ui\DataProvider\Product\Form\Modifier\AbstractModifier;
11+
use Magento\Catalog\Model\Locator\LocatorInterface;
912

1013
/**
1114
* Data provider for quantity in the Configurable products
@@ -16,21 +19,37 @@ class ConfigurableQty extends AbstractModifier
1619
const CODE_QTY_CONTAINER = 'quantity_and_stock_status_qty';
1720

1821
/**
19-
* {@inheritdoc}
22+
* @var LocatorInterface
23+
*/
24+
private $locator;
25+
26+
/**
27+
* ConfigurableQty constructor
28+
*
29+
* @param LocatorInterface $locator
30+
*/
31+
public function __construct(LocatorInterface $locator)
32+
{
33+
$this->locator = $locator;
34+
}
35+
36+
/**
37+
* @inheritdoc
2038
*/
2139
public function modifyData(array $data)
2240
{
2341
return $data;
2442
}
2543

2644
/**
27-
* {@inheritdoc}
45+
* @inheritdoc
2846
*/
2947
public function modifyMeta(array $meta)
3048
{
3149
if ($groupCode = $this->getGroupCodeByField($meta, self::CODE_QTY_CONTAINER)) {
3250
$parentChildren = &$meta[$groupCode]['children'];
33-
if (!empty($parentChildren[self::CODE_QTY_CONTAINER])) {
51+
$isConfigurable = $this->locator->getProduct()->getTypeId() === 'configurable';
52+
if (!empty($parentChildren[self::CODE_QTY_CONTAINER]) && $isConfigurable) {
3453
$parentChildren[self::CODE_QTY_CONTAINER] = array_replace_recursive(
3554
$parentChildren[self::CODE_QTY_CONTAINER],
3655
[
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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="AdminShippingMethodDHLSection">
12+
<element name="carriersDHLTab" type="button" selector="#carriers_dhl-head"/>
13+
<element name="carriersDHLActive" type="input" selector="#carriers_dhl_active_inherit"/>
14+
<element name="carriersDHLTitle" type="input" selector="#carriers_dhl_title_inherit"/>
15+
<element name="carriersDHLAccessId" type="input" selector="#carriers_dhl_id"/>
16+
<element name="carriersDHLPassword" type="input" selector="#carriers_dhl_password"/>
17+
<element name="carriersDHLAccount" type="input" selector="#carriers_dhl_account_inherit"/>
18+
<element name="carriersDHLContentType" type="input" selector="#carriers_dhl_content_type_inherit"/>
19+
<element name="carriersDHLHandlingType" type="input" selector="#carriers_dhl_handling_type_inherit"/>
20+
<element name="carriersDHLHandlingAction" type="input" selector="#carriers_dhl_handling_action_inherit"/>
21+
<element name="carriersDHLDivideOrderWeight" type="input" selector="#carriers_dhl_divide_order_weight_inherit"/>
22+
<element name="carriersDHLUnitOfMeasure" type="input" selector="#carriers_dhl_unit_of_measure_inherit"/>
23+
<element name="carriersDHLSize" type="input" selector="#carriers_dhl_size_inherit"/>
24+
<element name="carriersDHLNonDocAllowedMethod" type="input" selector="#carriers_dhl_nondoc_methods_inherit"/>
25+
<element name="carriersDHLSmartPostHubId" type="input" selector="#carriers_dhl_doc_methods_inherit"/>
26+
<element name="carriersDHLSpecificErrMsg" type="input" selector="#carriers_dhl_specificerrmsg_inherit"/>
27+
<element name="carriersDHLAllowSpecific" type="input" selector="#carriers_dhl_sallowspecific_inherit"/>
28+
<element name="carriersDHLSpecificCountry" type="input" selector="#carriers_dhl_specificcountry"/>
29+
</section>
30+
</sections>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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="AdminCheckInputFieldsDisabledAfterAppConfigDumpTest">
12+
<!--Assert configuration are disabled in DHL section-->
13+
<comment userInput="Assert configuration are disabled in DHL section" stepKey="commentSeeDisabledDHLConfigs"/>
14+
<actionGroup ref="AdminOpenShippingMethodsConfigPageActionGroup" stepKey="openShippingMethodConfigPage"/>
15+
<conditionalClick selector="{{AdminShippingMethodDHLSection.carriersDHLTab}}" dependentSelector="{{AdminShippingMethodDHLSection.carriersDHLActive}}" visible="false" stepKey="expandDHLTab"/>
16+
<waitForElementVisible selector="{{AdminShippingMethodDHLSection.carriersDHLActive}}" stepKey="waitDHLTabOpen"/>
17+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLActive}}" userInput="disabled" stepKey="grabDHLActiveDisabled"/>
18+
<assertEquals expected='true' expectedType="string" actual="$grabDHLActiveDisabled" stepKey="assertDHLActiveDisabled"/>
19+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLTitle}}" userInput="disabled" stepKey="grabDHLTitleDisabled"/>
20+
<assertEquals expected='true' expectedType="string" actual="$grabDHLTitleDisabled" stepKey="assertDHLTitleDisabled"/>
21+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLAccessId}}" userInput="disabled" stepKey="grabDHLAccessIdDisabled"/>
22+
<assertEquals expected='true' expectedType="string" actual="$grabDHLAccessIdDisabled" stepKey="assertDHLAccessIdDisabled"/>
23+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLPassword}}" userInput="disabled" stepKey="grabDHLPasswordDisabled"/>
24+
<assertEquals expected='true' expectedType="string" actual="$grabDHLPasswordDisabled" stepKey="assertDHLPasswordDisabled"/>
25+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLAccount}}" userInput="disabled" stepKey="grabDHLAccountDisabled"/>
26+
<assertEquals expected='true' expectedType="string" actual="$grabDHLAccountDisabled" stepKey="assertDHLAccountDisabled"/>
27+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLContentType}}" userInput="disabled" stepKey="grabDHLContentTypeDisabled"/>
28+
<assertEquals expected='true' expectedType="string" actual="$grabDHLContentTypeDisabled" stepKey="assertDHLContentTypeDisabled"/>
29+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLHandlingType}}" userInput="disabled" stepKey="grabDHLHandlingTypeDisabled"/>
30+
<assertEquals expected='true' expectedType="string" actual="$grabDHLHandlingTypeDisabled" stepKey="assertDHLHandlingTypeDisabled"/>
31+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLHandlingAction}}" userInput="disabled" stepKey="grabDHLHandlingDisabled"/>
32+
<assertEquals expected='true' expectedType="string" actual="$grabDHLHandlingDisabled" stepKey="assertDHLHandlingDisabled"/>
33+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLDivideOrderWeight}}" userInput="disabled" stepKey="grabDHLDivideOrderWeightDisabled"/>
34+
<assertEquals expected='true' expectedType="string" actual="$grabDHLDivideOrderWeightDisabled" stepKey="assertDHLDivideOrderWeightDisabled"/>
35+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLUnitOfMeasure}}" userInput="disabled" stepKey="grabDHLUnitOfMeasureDisabled"/>
36+
<assertEquals expected='true' expectedType="string" actual="$grabDHLUnitOfMeasureDisabled" stepKey="assertDHLUnitOfMeasureDisabled"/>
37+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLSize}}" userInput="disabled" stepKey="grabDHLSizeDisabled"/>
38+
<assertEquals expected='true' expectedType="string" actual="$grabDHLSizeDisabled" stepKey="assertDHLSizeDisabled"/>
39+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLNonDocAllowedMethod}}" userInput="disabled" stepKey="grabDHLNonDocAllowedMethodDisabled"/>
40+
<assertEquals expected='true' expectedType="string" actual="$grabDHLNonDocAllowedMethodDisabled" stepKey="assertDHLNonDocAllowedMethodDisabled"/>
41+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLSmartPostHubId}}" userInput="disabled" stepKey="grabDHLSmartPostHubIdDisabled"/>
42+
<assertEquals expected='true' expectedType="string" actual="$grabDHLSmartPostHubIdDisabled" stepKey="assertDHLSmartPostHubIdDisabled"/>
43+
<grabAttributeFrom selector="{{AdminShippingMethodDHLSection.carriersDHLSpecificErrMsg}}" userInput="disabled" stepKey="grabDHLSpecificErrMsgDisabled"/>
44+
<assertEquals expected='true' expectedType="string" actual="$grabDHLSpecificErrMsgDisabled" stepKey="assertDHLSpecificErrMsgDisabled"/>
45+
</test>
46+
</tests>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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="AdminShippingMethodFedExSection">
12+
<element name="carriersFedExTab" type="button" selector="#carriers_fedex-head"/>
13+
<element name="carriersFedExActive" type="input" selector="#carriers_fedex_active_inherit"/>
14+
<element name="carriersFedExTitle" type="input" selector="#carriers_fedex_title_inherit"/>
15+
<element name="carriersFedExAccountId" type="input" selector="#carriers_fedex_account"/>
16+
<element name="carriersFedExMeterNumber" type="input" selector="#carriers_fedex_meter_number"/>
17+
<element name="carriersFedExKey" type="input" selector="#carriers_fedex_key"/>
18+
<element name="carriersFedExPassword" type="input" selector="#carriers_fedex_password"/>
19+
<element name="carriersFedExSandboxMode" type="input" selector="#carriers_fedex_sandbox_mode_inherit"/>
20+
<element name="carriersFedExShipmentRequestType" type="input" selector="#carriers_fedex_shipment_requesttype_inherit"/>
21+
<element name="carriersFedExPackaging" type="input" selector="#carriers_fedex_packaging_inherit"/>
22+
<element name="carriersFedExDropoff" type="input" selector="#carriers_fedex_dropoff_inherit"/>
23+
<element name="carriersFedExUnitOfMeasure" type="input" selector="#carriers_fedex_unit_of_measure_inherit"/>
24+
<element name="carriersFedExMaxPackageWeight" type="input" selector="#carriers_fedex_max_package_weight_inherit"/>
25+
<element name="carriersFedExHandlingType" type="input" selector="#carriers_fedex_handling_type_inherit"/>
26+
<element name="carriersFedExHandlingAction" type="select" selector="#carriers_fedex_handling_action_inherit"/>
27+
<element name="carriersFedExFreeMethod" type="input" selector="#carriers_fedex_free_method_inherit"/>
28+
<element name="carriersFedExSpecificErrMsg" type="input" selector="#carriers_fedex_specificerrmsg_inherit"/>
29+
<element name="carriersFedExAllowSpecific" type="input" selector="#carriers_fedex_sallowspecific_inherit"/>
30+
<element name="carriersFedExSpecificCountry" type="input" selector="#carriers_fedex_specificcountry"/>
31+
</section>
32+
</sections>

0 commit comments

Comments
 (0)