Skip to content

Commit 8b141e1

Browse files
author
Shawn Abramson
committed
Merge remote-tracking branch 'upstream/2.4-develop' into 26909-grouped-product-restapi
2 parents d5160db + 1e28f35 commit 8b141e1

File tree

534 files changed

+13208
-2737
lines changed

Some content is hidden

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

534 files changed

+13208
-2737
lines changed

app/code/Magento/Amqp/Test/Unit/Setup/ConfigOptionsListTest.php

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,16 @@
66

77
namespace Magento\Amqp\Test\Unit\Setup;
88

9+
use Magento\Amqp\Setup\ConnectionValidator;
10+
use Magento\Framework\Config\Data\ConfigData;
911
use Magento\Framework\TestFramework\Unit\Helper\ObjectManager;
1012
use Magento\Amqp\Setup\ConfigOptionsList;
1113
use Magento\Framework\Setup\Option\TextConfigOption;
1214
use Magento\Framework\App\DeploymentConfig;
15+
use PHPUnit\Framework\MockObject\MockObject;
16+
use PHPUnit\Framework\TestCase;
1317

14-
class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
18+
class ConfigOptionsListTest extends TestCase
1519
{
1620
/**
1721
* @var ObjectManager
@@ -24,12 +28,12 @@ class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
2428
private $model;
2529

2630
/**
27-
* @var \Magento\Amqp\Setup\ConnectionValidator|\PHPUnit_Framework_MockObject_MockObject
31+
* @var ConnectionValidator|MockObject
2832
*/
2933
private $connectionValidatorMock;
3034

3135
/**
32-
* @var \Magento\Framework\App\DeploymentConfig|\PHPUnit_Framework_MockObject_MockObject
36+
* @var DeploymentConfig|MockObject
3337
*/
3438
private $deploymentConfigMock;
3539

@@ -38,7 +42,7 @@ class ConfigOptionsListTest extends \PHPUnit\Framework\TestCase
3842
*/
3943
private $options;
4044

41-
protected function setUp()
45+
protected function setUp(): void
4246
{
4347
$this->options = [
4448
ConfigOptionsList::INPUT_KEY_QUEUE_AMQP_HOST => 'host',
@@ -51,18 +55,18 @@ protected function setUp()
5155
];
5256

5357
$this->objectManager = new ObjectManager($this);
54-
$this->connectionValidatorMock = $this->getMockBuilder(\Magento\Amqp\Setup\ConnectionValidator::class)
58+
$this->connectionValidatorMock = $this->getMockBuilder(ConnectionValidator::class)
5559
->disableOriginalConstructor()
5660
->setMethods([])
5761
->getMock();
5862

59-
$this->deploymentConfigMock = $this->getMockBuilder(\Magento\Framework\App\DeploymentConfig::class)
63+
$this->deploymentConfigMock = $this->getMockBuilder(DeploymentConfig::class)
6064
->disableOriginalConstructor()
6165
->setMethods([])
6266
->getMock();
6367

6468
$this->model = $this->objectManager->getObject(
65-
\Magento\Amqp\Setup\ConfigOptionsList::class,
69+
ConfigOptionsList::class,
6670
[
6771
'connectionValidator' => $this->connectionValidatorMock,
6872
]
@@ -135,9 +139,9 @@ public function testCreateConfig($options, $expectedConfigData)
135139
$result = $this->model->createConfig($options, $this->deploymentConfigMock);
136140
$this->assertInternalType('array', $result);
137141
$this->assertNotEmpty($result);
138-
/** @var \Magento\Framework\Config\Data\ConfigData $configData */
142+
/** @var ConfigData $configData */
139143
$configData = $result[0];
140-
$this->assertInstanceOf(\Magento\Framework\Config\Data\ConfigData::class, $configData);
144+
$this->assertInstanceOf(ConfigData::class, $configData);
141145
$this->assertEquals($expectedConfigData, $configData->getData());
142146
}
143147

app/code/Magento/AsynchronousOperations/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
},
77
"require": {
88
"magento/framework": "*",
9+
"magento/framework-message-queue": "*",
910
"magento/framework-bulk": "*",
1011
"magento/module-authorization": "*",
1112
"magento/module-backend": "*",

app/code/Magento/Backend/Test/Mftf/ActionGroup/AssertAdminSuccessLoginActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@
1414
</annotations>
1515

1616
<waitForElementVisible selector="{{AdminHeaderSection.adminUserAccountText}}" stepKey="waitForAdminAccountTextVisible"/>
17+
<seeElement selector="{{AdminHeaderSection.adminUserAccountText}}" stepKey="assertAdminAccountTextElement"/>
1718
</actionGroup>
1819
</actionGroups>

app/code/Magento/Backend/Test/Mftf/Test/AdminDashboardWithChartsChart.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@
8383
<waitForLoadingMaskToDisappear stepKey="waitForSearchingOrder"/>
8484
<!-- Create invoice -->
8585
<comment userInput="Create invoice" stepKey="createInvoice"/>
86-
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
87-
<waitForPageLoad stepKey="waitForOrderPageToLoad"/>
86+
87+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
8888
<click selector="{{AdminOrderDetailsMainActionsSection.invoice}}" stepKey="clickInvoiceButton"/>
8989
<waitForPageLoad stepKey="waitForInvoicePageToLoad"/>
9090
<see selector="{{AdminHeaderSection.pageTitle}}" userInput="New Invoice" stepKey="seeNewInvoiceInPageTitle" after="clickInvoiceButton"/>
@@ -95,8 +95,7 @@
9595
<comment userInput="Create Shipment for the order" stepKey="createShipmentForOrder"/>
9696
<amOnPage url="{{AdminOrdersPage.url}}" stepKey="onOrdersPage2"/>
9797
<waitForPageLoad time="30" stepKey="waitForOrderListPageLoading"/>
98-
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="openOrderPageForShip"/>
99-
<waitForPageLoad stepKey="waitForOrderDetailsPage"/>
98+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="openOrderPageForShip"/>
10099
<click selector="{{AdminOrderDetailsMainActionsSection.ship}}" stepKey="clickShipAction"/>
101100
<waitForPageLoad stepKey="waitForShipmentPagePage"/>
102101
<seeInCurrentUrl url="{{AdminShipmentNewPage.url}}" stepKey="seeOrderShipmentUrl"/>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
<actionGroup ref="FilterOrderGridByIdActionGroup" stepKey="filterOrderById">
7171
<argument name="orderId" value="$grabOrderNumber"/>
7272
</actionGroup>
73-
<click selector="{{AdminOrdersGridSection.firstRow}}" stepKey="clickOrderRow"/>
74-
<waitForPageLoad stepKey="waitForAdminOrderPageLoad"/>
73+
74+
<actionGroup ref="AdminOrderGridClickFirstRowActionGroup" stepKey="clickOrderRow"/>
7575
<scrollTo selector="{{AdminOrderTotalSection.subTotal}}" stepKey="scrollToOrderTotalSection"/>
7676
<see selector="{{AdminOrderTotalSection.subTotal}}" userInput="$0.00" stepKey="checkSubtotal"/>
7777
</test>

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@
8080
<waitForPageLoad stepKey="waitForElementAdded"/>
8181

8282
<!-- Go to the shopping cart page and grab the value of the option title -->
83-
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart"/>
84-
<waitForPageLoad stepKey="waitForCartPageLoad"/>
83+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="onPageShoppingCart"/>
8584
<grabTextFrom selector="{{CheckoutCartProductSection.nthBundleOptionName('1')}}" stepKey="grabTotalBefore"/>
8685

8786
<!-- Find the product that we just created using the product grid -->
@@ -101,8 +100,7 @@
101100
<see stepKey="assertSuccess2" selector="{{AdminProductMessagesSection.successMessage}}" userInput="You saved the product."/>
102101

103102
<!-- Go to the shopping cart page and make sure the title has changed -->
104-
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart1"/>
105-
<waitForPageLoad stepKey="waitForCartPageLoad1"/>
103+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="onPageShoppingCart1"/>
106104
<grabTextFrom selector="{{CheckoutCartProductSection.nthBundleOptionName('1')}}" stepKey="grabTotalAfter"/>
107105
<assertNotEquals stepKey="assertNotEquals">
108106
<actualResult type="string">{$grabTotalAfter}</actualResult>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@
100100
<see selector="{{StorefrontMessagesSection.success}}" userInput="You added {{BundleProduct.name}} to your shopping cart." stepKey="seeAddToCartSuccessMessage"/>
101101

102102
<!-- Verify cart contents -->
103-
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="goToCart"/>
104-
<waitForPageLoad stepKey="waitForCart"/>
103+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="goToCart"/>
105104
<see selector="{{StorefrontBundledSection.nthItemOptionsTitle('1')}}" userInput="Option One" stepKey="seeOption1"/>
106105
<see selector="{{StorefrontBundledSection.nthItemOptionsTitle('2')}}" userInput="Option Two" stepKey="seeOption2"/>
107106
<see selector="{{StorefrontBundledSection.nthItemOptionsTitle('3')}}" userInput="Option Three" stepKey="seeOption3"/>

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@
3636
<deleteData createDataKey="simpleProduct4" stepKey="deleteSimpleProduct4"/>
3737
</after>
3838
<!--Make category-->
39-
<amOnPage url="{{AdminCategoryPage.url}}" stepKey="goToCategoryPage"/>
40-
<waitForPageLoad stepKey="waitForCategoryPageLoad"/>
39+
<actionGroup ref="AdminOpenCategoryPageActionGroup" stepKey="goToCategoryPage"/>
4140
<actionGroup ref="CreateCategoryActionGroup" stepKey="createASubcategory">
4241
<argument name="categoryEntity" value="SimpleSubCategory"/>
4342
</actionGroup>

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,7 @@
8989
<waitForPageLoad stepKey="waitForElementAdded2"/>
9090

9191
<!-- Go to the shopping cart page and edit the first product -->
92-
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart"/>
93-
<waitForPageLoad stepKey="waitForCartPageLoad"/>
92+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="onPageShoppingCart"/>
9493
<waitForElementVisible stepKey="waitForInfoDropdown" selector="{{CheckoutCartSummarySection.total}}"/>
9594
<waitForPageLoad stepKey="waitForCartPageLoad3"/>
9695
<grabTextFrom selector="{{CheckoutCartSummarySection.total}}" stepKey="grabTotalBefore"/>
@@ -107,8 +106,7 @@
107106
<waitForPageLoad stepKey="waitForElementAdded3"/>
108107

109108
<!-- Go to the shopping cart page -->
110-
<amOnPage url="{{CheckoutCartPage.url}}" stepKey="onPageShoppingCart2"/>
111-
<waitForPageLoad stepKey="waitForCartPageLoad2"/>
109+
<actionGroup ref="StorefrontCartPageOpenActionGroup" stepKey="onPageShoppingCart2"/>
112110

113111
<!-- Assert that the options are both there and the proce no longer matches -->
114112
<see stepKey="assertBothOptions" selector="{{CheckoutCartProductSection.nthItemOption('2')}}" userInput="$$simpleProduct1.sku$$"/>

app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/Form/Modifier/BundlePriceTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ public function testModifyMeta()
6868
];
6969
$priceParams = [
7070
'imports' => [
71-
'disabled' => 'ns = ${ $.ns }, index = ' . BundlePrice::CODE_PRICE_TYPE . ':checked'
71+
'disabled' => 'ns = ${ $.ns }, index = ' . BundlePrice::CODE_PRICE_TYPE . ':checked',
72+
'__disableTmpl' => ['disabled' => false],
7273
]
7374
];
7475
$priceMeta = [

app/code/Magento/Bundle/Test/Unit/Ui/DataProvider/Product/Form/Modifier/BundleWeightTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function testModifyMeta()
5858
$weightParams = [
5959
'imports' => [
6060
'disabled' => 'ns = ${ $.ns }, index = ' . BundleWeight::CODE_WEIGHT_TYPE . ':checked',
61+
'__disableTmpl' => ['disabled' => false],
6162
]
6263
];
6364
$hasWeightParams = [

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundleAdvancedPricing.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public function __construct(ArrayManager $arrayManager)
3434
}
3535

3636
/**
37-
* {@inheritdoc}
37+
* @inheritdoc
3838
*/
3939
public function modifyMeta(array $meta)
4040
{
@@ -63,7 +63,7 @@ public function modifyMeta(array $meta)
6363
}
6464

6565
/**
66-
* {@inheritdoc}
66+
* @inheritdoc
6767
*/
6868
public function modifyData(array $data)
6969
{
@@ -88,7 +88,8 @@ private function modifyMsrpMeta(array $meta)
8888
$meta,
8989
[
9090
'imports' => [
91-
'disabled' => 'ns = ${ $.ns }, index = ' . static::CODE_PRICE_TYPE . ':checked'
91+
'disabled' => 'ns = ${ $.ns }, index = ' . static::CODE_PRICE_TYPE . ':checked',
92+
'__disableTmpl' => ['disabled' => false],
9293
]
9394
]
9495
);
@@ -103,7 +104,8 @@ private function modifyMsrpMeta(array $meta)
103104
$meta,
104105
[
105106
'imports' => [
106-
'disabled' => 'ns = ${ $.ns }, index = ' . static::CODE_PRICE_TYPE . ':checked'
107+
'disabled' => 'ns = ${ $.ns }, index = ' . static::CODE_PRICE_TYPE . ':checked',
108+
'__disableTmpl' => ['disabled' => false],
107109
]
108110
]
109111
);

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundleCustomOptions.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
class BundleCustomOptions extends AbstractModifier
1616
{
1717
/**
18-
* {@inheritdoc}
18+
* @inheritdoc
1919
*/
2020
public function modifyMeta(array $meta)
2121
{
@@ -55,6 +55,7 @@ public function modifyCustomOptionsButton(array $meta, $group, $container, $butt
5555
if (!empty($meta[$group]['children'][$container]['children'][$button])) {
5656
$meta[$group]['children'][$container]['children'][$button]['arguments']['data']['config']['imports'] = [
5757
'visible' => '!ns = ${ $.ns }, index = ' . BundlePrice::CODE_PRICE_TYPE . ':checked',
58+
'__disableTmpl' => ['visible' => false],
5859
];
5960
}
6061
return $meta;
@@ -79,6 +80,7 @@ public function getErrorMessage($sortOrder)
7980
'sortOrder' => $sortOrder,
8081
'imports' => [
8182
'visible' => 'ns = ${ $.ns }, index = ' . BundlePrice::CODE_PRICE_TYPE . ':checked',
83+
'__disableTmpl' => ['visible' => false],
8284
],
8385
],
8486
],
@@ -87,7 +89,7 @@ public function getErrorMessage($sortOrder)
8789
}
8890

8991
/**
90-
* {@inheritdoc}
92+
* @inheritdoc
9193
*/
9294
public function modifyData(array $data)
9395
{

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ protected function getBundleHeader()
319319
* Get Bundle Options structure
320320
*
321321
* @return array
322+
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
322323
*/
323324
protected function getBundleOptions()
324325
{
@@ -348,7 +349,8 @@ protected function getBundleOptions()
348349
'component' => 'Magento_Ui/js/dynamic-rows/record',
349350
'positionProvider' => 'product_bundle_container.position',
350351
'imports' => [
351-
'label' => '${ $.name }' . '.product_bundle_container.option_info.title:value'
352+
'label' => '${ $.name }' . '.product_bundle_container.option_info.title:value',
353+
'__disableTmpl' => ['label' => false],
352354
],
353355
],
354356
],
@@ -381,6 +383,7 @@ protected function getBundleOptions()
381383
'template' => 'ui/dynamic-rows/templates/default',
382384
'provider' => 'product_form.product_form_data_source',
383385
'dataProvider' => '${ $.dataScope }' . '.bundle_button_proxy',
386+
'__disableTmpl' => ['dataProvider' => false],
384387
'identificationDRProperty' => 'product_id',
385388
'identificationProperty' => 'product_id',
386389
'map' => [
@@ -395,9 +398,13 @@ protected function getBundleOptions()
395398
'selection_price_value' => '',
396399
'selection_qty' => '',
397400
],
398-
'links' => ['insertData' => '${ $.provider }:${ $.dataProvider }'],
401+
'links' => [
402+
'insertData' => '${ $.provider }:${ $.dataProvider }',
403+
'__disableTmpl' => ['insertData' => false],
404+
],
399405
'imports' => [
400406
'inputType' => '${$.provider}:${$.dataScope}.type',
407+
'__disableTmpl' => ['inputType' => false],
401408
],
402409
'source' => 'product',
403410
],
@@ -619,9 +626,11 @@ protected function getBundleSelections()
619626
'is_collection' => true,
620627
'imports' => [
621628
'inputType' => '${$.parentName}:inputType',
629+
'__disableTmpl' => ['inputType' => false],
622630
],
623631
'exports' => [
624632
'isDefaultValue' => '${$.parentName}:isDefaultValue.${$.index}',
633+
'__disableTmpl' => ['isDefaultValue' => false],
625634
],
626635
],
627636
],
@@ -702,7 +711,8 @@ protected function getBundleSelections()
702711
'validate-greater-than-zero' => true
703712
],
704713
'imports' => [
705-
'isInteger' => '${ $.provider }:${ $.parentScope }.selection_qty_is_integer'
714+
'isInteger' => '${ $.provider }:${ $.parentScope }.selection_qty_is_integer',
715+
'__disableTmpl' => ['isInteger' => false],
706716
],
707717
],
708718
],
@@ -723,6 +733,7 @@ protected function getBundleSelections()
723733
'sortOrder' => 110,
724734
'imports' => [
725735
'inputType' => '${$.parentName}:inputType',
736+
'__disableTmpl' => ['inputType' => false],
726737
],
727738
],
728739
],
@@ -764,7 +775,8 @@ protected function getSelectionPriceValue()
764775
'dataScope' => 'selection_price_value',
765776
'value' => '0.00',
766777
'imports' => [
767-
'visible' => '!ns = ${ $.ns }, index = ' . BundlePrice::CODE_PRICE_TYPE . ':checked'
778+
'visible' => '!ns = ${ $.ns }, index = ' . BundlePrice::CODE_PRICE_TYPE . ':checked',
779+
'__disableTmpl' => ['visible' => false],
768780
],
769781
'sortOrder' => 80,
770782
],
@@ -801,7 +813,8 @@ protected function getSelectionPriceType()
801813
]
802814
],
803815
'imports' => [
804-
'visible' => '!ns = ${ $.ns }, index = ' . BundlePrice::CODE_PRICE_TYPE . ':checked'
816+
'visible' => '!ns = ${ $.ns }, index = ' . BundlePrice::CODE_PRICE_TYPE . ':checked',
817+
'__disableTmpl' => ['visible' => false],
805818
],
806819
'sortOrder' => 90,
807820
],

app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePrice.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ public function modifyMeta(array $meta)
7171
$meta,
7272
[
7373
'imports' => [
74-
'disabled' => 'ns = ${ $.ns }, index = ' . static::CODE_PRICE_TYPE . ':checked'
74+
'disabled' => 'ns = ${ $.ns }, index = ' . static::CODE_PRICE_TYPE . ':checked',
75+
'__disableTmpl' => ['disabled' => false],
7576
]
7677
]
7778
);
@@ -86,7 +87,8 @@ public function modifyMeta(array $meta)
8687
$meta,
8788
[
8889
'imports' => [
89-
'disabled' => 'ns = ${ $.ns }, index = ' . static::CODE_PRICE_TYPE . ':checked'
90+
'disabled' => 'ns = ${ $.ns }, index = ' . static::CODE_PRICE_TYPE . ':checked',
91+
'__disableTmpl' => ['disabled' => false],
9092
]
9193
]
9294
);

0 commit comments

Comments
 (0)