Skip to content

Commit f7cea1b

Browse files
author
mastiuhin-olexandr
committed
Merge remote-tracking branch 'origin/2.4-develop' into MC-33288
2 parents ecce591 + 3bcbd95 commit f7cea1b

File tree

84 files changed

+2041
-244
lines changed

Some content is hidden

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

84 files changed

+2041
-244
lines changed

app/code/Magento/Catalog/Helper/Product/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ public function initProductLayout(ResultPage $resultPage, $product, $params = nu
193193
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku], $handle);
194194
}
195195
}
196-
196+
197197
$resultPage->addPageLayoutHandles(['type' => $product->getTypeId()], null, false);
198198
$resultPage->addPageLayoutHandles(['id' => $product->getId(), 'sku' => $urlSafeSku]);
199199

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@
127127
<waitForPageLoad stepKey="waitForCustomersPage"/>
128128
<see userInput="You saved the customer." stepKey="CustomerIsSaved"/>
129129

130-
<amOnPage url="{{AdminCustomerPage.url}}" stepKey="navigateToCustomers"/>
131-
<waitForPageLoad stepKey="waitForPageLoad1" />
130+
<actionGroup ref="AdminOpenCustomersGridActionGroup" stepKey="navigateToCustomers"/>
132131
<click selector="{{AdminCustomerFiltersSection.clearAll}}" stepKey="ClearFilters"/>
133132
<waitForPageLoad stepKey="waitForFiltersClear"/>
134133

app/code/Magento/Checkout/view/frontend/layout/checkout_index_index.xml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,10 @@
3232
</item>
3333
<item name="children" xsi:type="array">
3434
<item name="errors" xsi:type="array">
35-
<item name="sortOrder" xsi:type="string">0</item>
3635
<item name="component" xsi:type="string">Magento_Ui/js/view/messages</item>
3736
<item name="displayArea" xsi:type="string">messages</item>
3837
</item>
3938
<item name="authentication" xsi:type="array">
40-
<item name="sortOrder" xsi:type="string">1</item>
4139
<item name="component" xsi:type="string">Magento_Checkout/js/view/authentication</item>
4240
<item name="displayArea" xsi:type="string">authentication</item>
4341
<item name="children" xsi:type="array">
@@ -50,7 +48,6 @@
5048
</item>
5149
</item>
5250
<item name="progressBar" xsi:type="array">
53-
<item name="sortOrder" xsi:type="string">0</item>
5451
<item name="component" xsi:type="string">Magento_Checkout/js/view/progress-bar</item>
5552
<item name="displayArea" xsi:type="string">progressBar</item>
5653
<item name="config" xsi:type="array">
@@ -61,7 +58,6 @@
6158
</item>
6259
</item>
6360
<item name="estimation" xsi:type="array">
64-
<item name="sortOrder" xsi:type="string">10</item>
6561
<item name="component" xsi:type="string">Magento_Checkout/js/view/estimation</item>
6662
<item name="displayArea" xsi:type="string">estimation</item>
6763
<item name="config" xsi:type="array">
@@ -335,7 +331,6 @@
335331
</item>
336332
</item>
337333
<item name="sidebar" xsi:type="array">
338-
<item name="sortOrder" xsi:type="string">50</item>
339334
<item name="component" xsi:type="string">Magento_Checkout/js/view/sidebar</item>
340335
<item name="displayArea" xsi:type="string">sidebar</item>
341336
<item name="config" xsi:type="array">
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="AdminOpenCmsBlocksGridActionGroup">
12+
<annotations>
13+
<description>Goes to the Cms Blocks grid page.</description>
14+
</annotations>
15+
<amOnPage url="{{CmsBlocksPage.url}}" stepKey="navigateToCMSBlocksGrid"/>
16+
<waitForPageLoad stepKey="waitForPageLoad"/>
17+
</actionGroup>
18+
</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="AdminPressAddNewCmsBlockButtonActionGroup">
12+
<annotations>
13+
<description>Press Add new block button on Cms Blocks gid page</description>
14+
</annotations>
15+
16+
<click selector="{{BlockPageActionsSection.addNewBlock}}" stepKey="clickOnAddNewBlockButton"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</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="AdminPressSaveCmsBlockButtonActionGroup">
12+
<annotations>
13+
<description>Press save button on Cms Block page</description>
14+
</annotations>
15+
16+
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="clickOnSaveBlock"/>
17+
<waitForPageLoad stepKey="waitForPageLoad"/>
18+
</actionGroup>
19+
</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="AdminSelectCMSBlockStoreViewActionGroup">
12+
<arguments>
13+
<argument name="storeViewName" type="string"/>
14+
</arguments>
15+
16+
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="{{storeViewName}}" stepKey="selectStoreView"/>
17+
</actionGroup>
18+
</actionGroups>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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="AssertAdminProperUrlIsShownActionGroup">
12+
<annotations>
13+
<description>Assert current page has proper URL</description>
14+
</annotations>
15+
<arguments>
16+
<argument name="target_path" type="string"/>
17+
</arguments>
18+
19+
<seeInCurrentUrl url="{{target_path}}" stepKey="seePropertUrl"/>
20+
</actionGroup>
21+
</actionGroups>

app/code/Magento/Cms/Test/Mftf/Test/CheckStaticBlocksTest.xml

Lines changed: 44 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
</annotations>
2222

2323
<before>
24-
<actionGroup ref="AdminLoginActionGroup" stepKey="LoginAsAdmin"/>
25-
24+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
2625
<actionGroup ref="AdminCreateWebsiteActionGroup" stepKey="createAdditionalWebsite">
2726
<argument name="newWebsiteName" value="{{customWebsite.name}}"/>
2827
<argument name="websiteCode" value="{{customWebsite.code}}"/>
@@ -39,49 +38,60 @@
3938
</before>
4039

4140
<after>
42-
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="DeleteWebsite">
41+
<actionGroup ref="AdminDeleteWebsiteActionGroup" stepKey="deleteWebsite">
4342
<argument name="websiteName" value="{{customWebsite.name}}"/>
4443
</actionGroup>
45-
<actionGroup ref="DeleteCMSBlockActionGroup" stepKey="DeleteCMSBlockActionGroup"/>
44+
<actionGroup ref="DeleteCMSBlockActionGroup" stepKey="deleteCMSBlock"/>
45+
<actionGroup ref="DeleteCMSBlockActionGroup" stepKey="deleteSecondCMSBlock"/>
4646
<actionGroup ref="AdminClearFiltersActionGroup" stepKey="clearFilters"/>
47+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logout"/>
4748
</after>
4849

4950
<!--Go to Cms blocks page-->
50-
<amOnPage url="{{CmsBlocksPage.url}}" stepKey="navigateToCMSPagesGrid"/>
51-
<waitForPageLoad stepKey="waitForPageLoad1"/>
52-
<seeInCurrentUrl url="cms/block/" stepKey="VerifyPageIsOpened"/>
51+
<actionGroup ref="AdminOpenCmsBlocksGridActionGroup" stepKey="navigateToCMSBlocksGrid"/>
52+
<actionGroup ref="AssertAdminProperUrlIsShownActionGroup" stepKey="verifyPageIsOpened">
53+
<argument name="target_path" value="cms/block/"/>
54+
</actionGroup>
55+
5356
<!--Click to create new block-->
54-
<click selector="{{BlockPageActionsSection.addNewBlock}}" stepKey="ClickToAddNewBlock"/>
55-
<waitForPageLoad stepKey="waitForPageLoad2"/>
56-
<seeInCurrentUrl url="cms/block/new" stepKey="VerifyNewBlockPageIsOpened"/>
57+
<actionGroup ref="AdminPressAddNewCmsBlockButtonActionGroup" stepKey="clickOnAddNewBlockButton"/>
58+
<actionGroup ref="AssertAdminProperUrlIsShownActionGroup" stepKey="verifyNewCmsBlockPageIsOpened">
59+
<argument name="target_path" value="cms/block/new"/>
60+
</actionGroup>
5761
<actionGroup ref="FillOutBlockContent" stepKey="FillOutBlockContent"/>
58-
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="ClickToSaveBlock"/>
59-
<waitForPageLoad stepKey="waitForPageLoad3"/>
60-
<see userInput="You saved the block." stepKey="VerifyBlockIsSaved"/>
61-
<!--Click to go back and add new block-->
62-
<click selector="{{BlockNewPagePageActionsSection.back}}" stepKey="ClickToGoBack"/>
63-
<waitForPageLoad stepKey="waitForPageLoad4"/>
64-
<click selector="{{BlockPageActionsSection.addNewBlock}}" stepKey="ClickToAddNewBlock1"/>
65-
<waitForPageLoad stepKey="waitForPageLoad5"/>
66-
<seeInCurrentUrl url="cms/block/new" stepKey="VerifyNewBlockPageIsOpened1"/>
62+
<actionGroup ref="AdminPressSaveCmsBlockButtonActionGroup" stepKey="saveCmsBlock"/>
63+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertSuccessMessage">
64+
<argument name="message" value="You saved the block."/>
65+
</actionGroup>
66+
6767
<!--Add new BLock with the same data-->
68+
<actionGroup ref="AdminOpenCmsBlocksGridActionGroup" stepKey="openCmsBlocksGrid"/>
69+
<actionGroup ref="AdminPressAddNewCmsBlockButtonActionGroup" stepKey="pressAddNewBlockButton"/>
70+
<actionGroup ref="AssertAdminProperUrlIsShownActionGroup" stepKey="assertNewCmsBlockPageIsOpened">
71+
<argument name="target_path" value="cms/block/new"/>
72+
</actionGroup>
6873
<actionGroup ref="FillOutBlockContent" stepKey="FillOutBlockContent1"/>
69-
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="ClickToSaveBlock1"/>
70-
<waitForPageLoad stepKey="waitForPageLoad6"/>
71-
<!--Verify that corresponding message is displayed-->
72-
<see userInput="A block identifier with the same properties already exists in the selected store." stepKey="VerifyBlockIsSaved1"/>
73-
<!--Click to go back and add new block-->
74-
<click selector="{{BlockNewPagePageActionsSection.back}}" stepKey="ClickToGoBack1"/>
75-
<waitForPageLoad stepKey="waitForPageLoad7"/>
76-
<click selector="{{BlockPageActionsSection.addNewBlock}}" stepKey="ClickToAddNewBlock2"/>
77-
<waitForPageLoad stepKey="waitForPageLoad8"/>
78-
<seeInCurrentUrl url="cms/block/new" stepKey="VerifyNewBlockPageIsOpened2"/>
74+
<actionGroup ref="AdminPressSaveCmsBlockButtonActionGroup" stepKey="clickOnSaveButton"/>
75+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="assertErrorMessage">
76+
<argument name="messageType" value="error"/>
77+
<argument name="message" value="A block identifier with the same properties already exists in the selected store."/>
78+
</actionGroup>
79+
7980
<!--Add new BLock with the same data for another store view-->
81+
<actionGroup ref="AdminOpenCmsBlocksGridActionGroup" stepKey="goToCmsBlocksGrid"/>
82+
<actionGroup ref="AdminPressAddNewCmsBlockButtonActionGroup" stepKey="clickToAddNewButton"/>
83+
<actionGroup ref="AssertAdminProperUrlIsShownActionGroup" stepKey="confirmNewCmsBlockPageIsOpened">
84+
<argument name="target_path" value="cms/block/new"/>
85+
</actionGroup>
8086
<actionGroup ref="FillOutBlockContent" stepKey="FillOutBlockContent2"/>
81-
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="Default Store View" stepKey="selectDefaultStoreView" />
82-
<selectOption selector="{{BlockNewPageBasicFieldsSection.storeView}}" userInput="{{customStore.name}}" stepKey="selectSecondStoreView1" />
83-
<click selector="{{BlockNewPagePageActionsSection.saveBlock}}" stepKey="ClickToSaveBlock2"/>
84-
<waitForPageLoad stepKey="waitForPageLoad9"/>
85-
<see userInput="You saved the block." stepKey="VerifyBlockIsSaved2"/>
87+
88+
<actionGroup ref="AdminSelectCMSBlockStoreViewActionGroup" stepKey="selectCustomStoreView">
89+
<argument name="storeViewName" value="{{customStore.name}}"/>
90+
</actionGroup>
91+
92+
<actionGroup ref="AdminPressSaveCmsBlockButtonActionGroup" stepKey="saveNewCmsBlock"/>
93+
<actionGroup ref="AssertMessageInAdminPanelActionGroup" stepKey="verifyBlockIsSaved">
94+
<argument name="message" value="You saved the block."/>
95+
</actionGroup>
8696
</test>
8797
</tests>

app/code/Magento/Config/Model/Config/Backend/Serialized.php

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Config\Model\Config\Backend;
77

8+
use Magento\Framework\App\Config\ScopeConfigInterface;
89
use Magento\Framework\App\ObjectManager;
910
use Magento\Framework\Serialize\Serializer\Json;
1011

@@ -84,4 +85,26 @@ public function beforeSave()
8485
parent::beforeSave();
8586
return $this;
8687
}
88+
89+
/**
90+
* Get old value from existing config
91+
*
92+
* @return string
93+
*/
94+
public function getOldValue()
95+
{
96+
// If the value is retrieved from defaults defined in config.xml
97+
// it may be returned as an array.
98+
$value = $this->_config->getValue(
99+
$this->getPath(),
100+
$this->getScope() ?: ScopeConfigInterface::SCOPE_TYPE_DEFAULT,
101+
$this->getScopeCode()
102+
);
103+
104+
if (is_array($value)) {
105+
return $this->serializer->serialize($value);
106+
}
107+
108+
return (string)$value;
109+
}
87110
}

0 commit comments

Comments
 (0)