Skip to content

Commit 07a3dcb

Browse files
Manjusha.SManjusha.S
authored andcommitted
Merge branch '2.4-develop' of https://github.com/magento-gl/magento2ce into ACQE-4383
2 parents 147abfd + 1c874bd commit 07a3dcb

File tree

25 files changed

+544
-36
lines changed

25 files changed

+544
-36
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
<argument name="keyword" value="api-simple-product"/>
4040
</actionGroup>
4141
<actionGroup ref="SortProductsByIdDescendingActionGroup" stepKey="sortProductsByIdDescending"/>
42+
<waitForElementClickable selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="waitForSelectThirdProduct"/>
4243
<checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="selectThirdProduct"/>
4344
<checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="selectSecondProduct"/>
4445
<checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('3')}}" stepKey="selectFirstProduct"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
<argument name="keyword" value="api-simple-product"/>
5656
</actionGroup>
5757
<actionGroup ref="SortProductsByIdDescendingActionGroup" stepKey="sortProductsByIdDescending"/>
58+
<waitForElementClickable selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="waitForSelectCheckbox1"/>
5859
<checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('1')}}" stepKey="clickCheckbox1"/>
5960
<checkOption selector="{{AdminProductGridSection.productGridCheckboxOnRow('2')}}" stepKey="clickCheckbox2"/>
6061
<!-- Mass update qty increments -->

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
</actionGroup>
5252
<!--Verify that navigation menu categories level is correct-->
5353
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage1"/>
54+
<waitForElementVisible selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryTwo.name$)}}" stepKey="waitForTopCategoryVisible"/>
5455
<seeElement selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryTwo.name$)}}" stepKey="verifyThatTopCategoryIsSubCategoryTwo"/>
5556
<moveMouseOver selector="{{StorefrontNavigationSection.topCategory($simpleSubCategoryTwo.name$)}}" stepKey="mouseOverSubCategoryTwo"/>
5657
<waitForAjaxLoad stepKey="waitForAjaxOnMouseOverSubCategoryTwo"/>

app/code/Magento/Checkout/Test/Mftf/ActionGroup/AssertStorefrontShoppingCartSummaryItemsActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<waitForElementVisible selector="{{CheckoutCartSummarySection.subtotal}}" stepKey="waitForSubtotalVisible"/>
2222
<see selector="{{CheckoutCartSummarySection.subtotal}}" userInput="{{subtotal}}" stepKey="assertSubtotal"/>
2323
<waitForElementVisible selector="{{CheckoutCartSummarySection.total}}" stepKey="waitForTotalVisible"/>
24-
<waitForElementVisible selector="{{CheckoutCartSummarySection.totalAmount(total)}}" stepKey="waitForTotalAmountVisible"/>
24+
<waitForElementVisible selector="{{CheckoutCartSummarySection.totalAmount(total)}}" time="20" stepKey="waitForTotalAmountVisible"/>
2525
<see selector="{{CheckoutCartSummarySection.total}}" userInput="{{total}}" stepKey="assertTotal"/>
2626
<seeElement selector="{{CheckoutCartSummarySection.proceedToCheckout}}" stepKey="seeProceedToCheckoutButton"/>
2727
</actionGroup>

app/code/Magento/Checkout/Test/Mftf/Test/OnePageCheckoutUsingSignInLinkTest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
<group value="mtf_migrated"/>
2121
</annotations>
2222
<before>
23+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
2324
<!-- Create Simple Product -->
2425
<createData entity="SimpleProduct2" stepKey="createSimpleProduct">
2526
<field key="price">560</field>

app/code/Magento/Checkout/Test/Mftf/Test/StorefrontGuestCheckoutTest/StorefrontGuestCheckoutAddNewAddressTest.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
<group value="checkout"/>
2020
</annotations>
2121
<before>
22+
<magentoCLI command="config:set {{EnableFlatRateConfigData.path}} {{EnableFlatRateConfigData.value}}" stepKey="enableFlatRate"/>
23+
2224
<createData entity="_defaultCategory" stepKey="createCategory"/>
2325
<createData entity="ApiSimpleProduct" stepKey="createProduct">
2426
<requiredEntity createDataKey="createCategory"/>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747

4848
<amOnPage url="{{StorefrontCategoryPage.url($createPreReqCategory.custom_attributes[url_key]$)}}" stepKey="navigateToCategoryPage"/>
4949
<waitForPageLoad stepKey="wait1"/>
50+
<waitForElementVisible selector="{{StorefrontHeaderSection.ProductWidgetLink}}" stepKey="waitForProductLinkButton"/>
5051
<click selector="{{StorefrontHeaderSection.ProductWidgetLink}}" stepKey="clickProductLinkButton"/>
5152
<waitForPageLoad stepKey="wait2"/>
5253
<actionGroup ref="AssertStorefrontProductDetailPageNameActionGroup" stepKey="assertProductNameText">

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
<amOnPage url="{{CmsPagesPage.url}}?filters[title]=$$createPage.title$$" stepKey="navigateToPageGridWithFilters"/>
3434
<waitForPageLoad stepKey="waitForPageGrid"/>
3535
<waitForText selector="{{CmsPagesPageActionsSection.pagesGridRowByTitle($$createPage.title$$)}}" userInput="$$createPage.title$$" stepKey="seePage"/>
36+
<seeInCurrentUrl url="admin/cms/page?filters" stepKey="seeAdminCMSPageFilters"/>
3637
<waitForElementVisible selector="{{CmsPagesPageActionsSection.activeFilter}}" stepKey="seeEnabledFilters"/>
3738
<waitForText selector="{{CmsPagesPageActionsSection.activeFilter}}" userInput="Title: $$createPage.title$$" stepKey="seePageTitleFilter"/>
3839
</test>

app/code/Magento/Config/App/Config/Type/System.php

Lines changed: 40 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ class System implements ConfigTypeInterface
3636
/**
3737
* Config cache tag.
3838
*/
39-
const CACHE_TAG = 'config_scopes';
39+
public const CACHE_TAG = 'config_scopes';
4040

4141
/**
4242
* System config type.
4343
*/
44-
const CONFIG_TYPE = 'system';
44+
public const CONFIG_TYPE = 'system';
4545

4646
/**
4747
* @var string
@@ -173,8 +173,7 @@ public function __construct(
173173
public function get($path = '')
174174
{
175175
if ($path === '') {
176-
$this->data = array_replace_recursive($this->loadAllData(), $this->data);
177-
176+
$this->data = $this->loadAllData();
178177
return $this->data;
179178
}
180179

@@ -193,8 +192,7 @@ private function getWithParts($path)
193192

194193
if (count($pathParts) === 1 && $pathParts[0] !== ScopeInterface::SCOPE_DEFAULT) {
195194
if (!isset($this->data[$pathParts[0]])) {
196-
$data = $this->readData();
197-
$this->data = array_replace_recursive($data, $this->data);
195+
$this->readData();
198196
}
199197

200198
return $this->data[$pathParts[0]];
@@ -204,7 +202,8 @@ private function getWithParts($path)
204202

205203
if ($scopeType === ScopeInterface::SCOPE_DEFAULT) {
206204
if (!isset($this->data[$scopeType])) {
207-
$this->data = array_replace_recursive($this->loadDefaultScopeData($scopeType), $this->data);
205+
$scopeData = $this->loadDefaultScopeData() ?? [];
206+
$this->setDataByScopeType($scopeType, $scopeData);
208207
}
209208

210209
return $this->getDataByPathParts($this->data[$scopeType], $pathParts);
@@ -213,11 +212,8 @@ private function getWithParts($path)
213212
$scopeId = array_shift($pathParts);
214213

215214
if (!isset($this->data[$scopeType][$scopeId])) {
216-
$scopeData = $this->loadScopeData($scopeType, $scopeId);
217-
218-
if (!isset($this->data[$scopeType][$scopeId])) {
219-
$this->data = array_replace_recursive($scopeData, $this->data);
220-
}
215+
$scopeData = $this->loadScopeData($scopeType, $scopeId) ?? [];
216+
$this->setDataByScopeId($scopeType, $scopeId, $scopeData);
221217
}
222218

223219
return isset($this->data[$scopeType][$scopeId])
@@ -256,16 +252,16 @@ private function loadAllData()
256252
/**
257253
* Load configuration data for default scope.
258254
*
259-
* @param string $scopeType
260255
* @return array
261256
*/
262-
private function loadDefaultScopeData($scopeType)
257+
private function loadDefaultScopeData()
263258
{
264259
if (!$this->cacheState->isEnabled(Config::TYPE_IDENTIFIER)) {
265260
return $this->readData();
266261
}
267262

268-
$loadAction = function () use ($scopeType) {
263+
$loadAction = function () {
264+
$scopeType = ScopeInterface::SCOPE_DEFAULT;
269265
$cachedData = $this->cache->load($this->configType . '_' . $scopeType);
270266
$scopeData = false;
271267
if ($cachedData !== false) {
@@ -325,6 +321,35 @@ private function loadScopeData($scopeType, $scopeId)
325321
);
326322
}
327323

324+
/**
325+
* Sets data according to scope type.
326+
*
327+
* @param string|null $scopeType
328+
* @param array $scopeData
329+
* @return void
330+
*/
331+
private function setDataByScopeType(?string $scopeType, array $scopeData): void
332+
{
333+
if (!isset($this->data[$scopeType]) && isset($scopeData[$scopeType])) {
334+
$this->data[$scopeType] = $scopeData[$scopeType];
335+
}
336+
}
337+
338+
/**
339+
* Sets data according to scope type and id.
340+
*
341+
* @param string|null $scopeType
342+
* @param string|null $scopeId
343+
* @param array $scopeData
344+
* @return void
345+
*/
346+
private function setDataByScopeId(?string $scopeType, ?string $scopeId, array $scopeData): void
347+
{
348+
if (!isset($this->data[$scopeType][$scopeId]) && isset($scopeData[$scopeType][$scopeId])) {
349+
$this->data[$scopeType][$scopeId] = $scopeData[$scopeType][$scopeId];
350+
}
351+
}
352+
328353
/**
329354
* Cache configuration data.
330355
*

app/code/Magento/ConfigurableProduct/Test/Mftf/ActionGroup/AdminSetProductQuantityToEachSkusConfigurableProductActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButtonToNavigateToSummaryTab"/>
2020
<click selector="{{AdminCreateProductConfigurationsPanel.next}}" stepKey="clickOnNextButtonToNavigateToGenerateProductsTab"/>
2121
<click selector="{{AdminProductFormActionSection.saveButton}}" stepKey="clickOnSaveButton"/>
22-
<click selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" stepKey="clickOnConfirmInPopup"/>
22+
<conditionalClick selector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" dependentSelector="{{AdminChooseAffectedAttributeSetPopup.confirm}}" visible="true" stepKey="clickOnConfirmInPopup"/>
2323
<seeElement selector="{{AdminProductMessagesSection.successMessage}}" stepKey="seeSaveProductMessage"/>
2424

2525
</actionGroup>

0 commit comments

Comments
 (0)