Skip to content

Commit 7da12c1

Browse files
author
Gabriel da Gama
authored
Merge branch '2.4-develop' into bugfix/issue-12584
2 parents dc3226b + c9242e8 commit 7da12c1

File tree

106 files changed

+1894
-458
lines changed

Some content is hidden

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

106 files changed

+1894
-458
lines changed

app/code/Magento/Backend/App/Action/Plugin/Authentication.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ protected function _redirectIfNeededAfterLogin(\Magento\Framework\App\RequestInt
225225

226226
// Checks, whether secret key is required for admin access or request uri is explicitly set
227227
if ($this->_url->useSecretKey()) {
228-
$requestUri = $this->_url->getUrl('*/*/*', ['_current' => true]);
228+
$requestParts = explode('/', trim($request->getRequestUri(), '/'), 2);
229+
$requestUri = $this->_url->getUrl(array_pop($requestParts));
229230
} elseif ($request) {
230231
$requestUri = $request->getRequestUri();
231232
}

app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ public function execute()
4949
}
5050

5151
$requestUrl = $this->getRequest()->getUri();
52-
$backendUrl = $this->getUrl('*');
53-
// redirect according to rewrite rule
54-
if ($requestUrl != $backendUrl) {
55-
return $this->getRedirect($backendUrl);
52+
if (!$requestUrl->isValid()) {
53+
return $this->getRedirect($this->getUrl('*'));
5654
}
55+
5756
return $this->resultPageFactory->create();
5857
}
5958

app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,12 @@ public function addWebsiteFilter($websites = null)
916916
}
917917

918918
$this->_productLimitationFilters['website_ids'] = $websites;
919-
$this->_applyProductLimitations();
919+
920+
if ($this->getStoreId() == Store::DEFAULT_STORE_ID) {
921+
$this->_productLimitationJoinWebsite();
922+
} else {
923+
$this->_applyProductLimitations();
924+
}
920925

921926
return $this;
922927
}
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10+
<actionGroup name="AssertStorefrontProductNameIsNotOnProductMainPageActionGroup">
11+
<annotations>
12+
<description>Validates that the provided Product Name is NOT present on a Storefront page.</description>
13+
</annotations>
14+
<arguments>
15+
<argument name="productName" type="string"/>
16+
</arguments>
17+
18+
<waitForPageLoad stepKey="waitForTheProductPageToLoad"/>
19+
<dontSee selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{productName}}" stepKey="dontSeeProductName"/>
20+
</actionGroup>
21+
</actionGroups>

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

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<fillField selector="{{AdminProductFormSection.productQuantity}}" userInput="100" stepKey="fillProductQty"/>
5656
<actionGroup ref="AdminSetStockStatusActionGroup" stepKey="selectStockStatus">
5757
<argument name="stockStatus" value="In Stock"/>
58-
</actionGroup>
58+
</actionGroup>
5959

6060
<!-- Create New Product Attribute -->
6161
<click selector="{{AdminProductFormSection.addAttributeBtn}}" stepKey="clickOnAddAttribute"/>
@@ -128,10 +128,14 @@
128128
<!--Verify Product Attribute present in search page -->
129129
<amOnPage url="$$createCategory.name$$.html" stepKey="goToStorefrontPage1"/>
130130
<waitForPageLoad stepKey="waitForProductFrontPageToLoad1"/>
131-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{ProductAttributeOption8.value}}" stepKey="fillAttribute"/>
132-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
133-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
134-
<waitForPageLoad stepKey="waitForSearch"/>
135-
<see selector="{{StorefrontCategoryMainSection.productName}}" userInput="{{SimpleProduct.name}}" stepKey="seeProductNameInCategoryPage"/>
131+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillAttribute">
132+
<argument name="phrase" value="{{ProductAttributeOption8.value}}"/>
133+
</actionGroup>
134+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
135+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
136+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
137+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeProductNameInCategoryPage">
138+
<argument name="productName" value="{{SimpleProduct.name}}"/>
139+
</actionGroup>
136140
</test>
137141
</tests>

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

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,15 @@
125125
<!-- Verify customer see created virtual product with custom options suite and import options(from above step) on storefront page and is searchable by sku -->
126126
<amOnPage url="{{StorefrontProductPage.url(virtualProductCustomImportOptions.urlKey)}}" stepKey="goToProductPage"/>
127127
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
128-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{virtualProductCustomImportOptions.sku}}" stepKey="fillVirtualProductName"/>
129-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
130-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
131-
<waitForPageLoad stepKey="waitForSearch"/>
132-
<see selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="{{virtualProductCustomImportOptions.name}}" stepKey="seeVirtualProductName"/>
128+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillVirtualProductName">
129+
<argument name="phrase" value="{{virtualProductCustomImportOptions.sku}}"/>
130+
</actionGroup>
131+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
132+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
133+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
134+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeVirtualProductName">
135+
<argument name="productName" value="{{virtualProductCustomImportOptions.name}}"/>
136+
</actionGroup>
133137
<click selector="{{StorefrontQuickSearchResultsSection.productLink}}" stepKey="openSearchedProduct"/>
134138

135139
<!-- Verify we see created virtual product with custom options suite and import options on the storefront page -->

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,16 @@
102102

103103
<!-- Verify customer see created virtual product with tier price(from above step) on storefront page and is searchable by sku -->
104104
<actionGroup ref="StorefrontOpenHomePageActionGroup" stepKey="goToHomePage"/>
105-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="{{virtualProductBigQty.sku}}" stepKey="fillVirtualProductName"/>
106-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
107-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
108-
<waitForPageLoad stepKey="waitForSearch"/>
109-
<see selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="{{virtualProductBigQty.name}}" stepKey="seeVirtualProductName"/>
105+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillVirtualProductName">
106+
<argument name="phrase" value="{{virtualProductBigQty.sku}}"/>
107+
</actionGroup>
108+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
109+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
110+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
111+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeVirtualProductName">
112+
<argument name="productName" value="{{virtualProductBigQty.name}}"/>
113+
</actionGroup>
114+
110115
<grabTextFrom selector="{{StorefrontQuickSearchResultsSection.asLowAsLabel}}" stepKey="tierPriceTextOnStorefrontPage"/>
111116
<assertEquals stepKey="assertTierPriceTextOnCategoryPage">
112117
<expectedResult type="string">As low as ${{tierPriceOnVirtualProduct.price}}</expectedResult>

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

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,31 @@
7171
<!--Verify customer see default simple product name on magento storefront page -->
7272
<amOnPage url="{{StorefrontProductPage.url($$initialSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="goToMagentoStorefrontPage"/>
7373
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
74-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="$$initialSimpleProduct.sku$$" stepKey="fillDefaultSimpleProductSkuInSearchTextBox"/>
75-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
76-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
77-
<waitForPageLoad stepKey="waitForSearch"/>
78-
<see selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="$$initialSimpleProduct.name$$" stepKey="seeDefaultProductName"/>
74+
75+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillDefaultSimpleProductSkuInSearchTextBox">
76+
<argument name="phrase" value="$$initialSimpleProduct.sku$$"/>
77+
</actionGroup>
78+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
79+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
80+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
81+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeDefaultProductName">
82+
<argument name="productName" value="$$initialSimpleProduct.name$$"/>
83+
</actionGroup>
7984

8085
<!--Verify customer see simple product with updated name on magento storefront page under store view section -->
8186
<click selector="{{StorefrontHeaderSection.storeViewSwitcher}}" stepKey="clickStoreViewSwitcher"/>
8287
<waitForPageLoad stepKey="waitForStoreSwitcherLoad"/>
8388
<click selector="{{StorefrontHeaderSection.storeView(customStoreFR.name)}}" stepKey="clickStoreViewOption"/>
84-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="$$initialSimpleProduct.sku$$" stepKey="fillDefaultSimpleProductSkuInSearch"/>
85-
<waitForPageLoad stepKey="waitForSearchTextBoxLoad"/>
86-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextButton"/>
87-
<waitForPageLoad stepKey="waitForTextSearchLoad"/>
88-
<see selector="{{StorefrontQuickSearchResultsSection.productLink}}" userInput="{{simpleProductDataOverriding.name}}" stepKey="seeUpdatedSimpleProductName"/>
89+
90+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillDefaultSimpleProductSkuInSearch">
91+
<argument name="phrase" value="$$initialSimpleProduct.sku$$"/>
92+
</actionGroup>
93+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBoxLoad"/>
94+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextButton"/>
95+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForTextSearchLoad"/>
96+
<actionGroup ref="StorefrontAssertProductNameOnProductMainPageActionGroup" stepKey="seeUpdatedSimpleProductName">
97+
<argument name="productName" value="{{simpleProductDataOverriding.name}}"/>
98+
</actionGroup>
99+
89100
</test>
90101
</tests>

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

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,24 @@
6969
<!-- Verify customer see simple product with updated price on magento storefront page -->
7070
<amOnPage url="{{StorefrontProductPage.url($$initialSimpleProduct.custom_attributes[url_key]$$)}}" stepKey="goToMagentoStorefrontPage"/>
7171
<waitForPageLoad stepKey="waitForStoreFrontProductPageLoad"/>
72-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="$$initialSimpleProduct.sku$$" stepKey="fillDefaultSimpleProductSkuInSearchTextBox"/>
73-
<waitForPageLoad stepKey="waitForSearchTextBox"/>
74-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextBoxButton"/>
75-
<waitForPageLoad stepKey="waitForSearch"/>
72+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillDefaultSimpleProductSkuInSearchTextBox">
73+
<argument name="phrase" value="$$initialSimpleProduct.sku$$"/>
74+
</actionGroup>
75+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBox"/>
76+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextBoxButton"/>
77+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearch"/>
7678
<see selector="{{StorefrontQuickSearchResultsSection.regularPrice}}" userInput="{{simpleProductDataOverriding.price}}" stepKey="seeUpdatedProductPriceOnStorefrontPage"/>
7779

7880
<!-- Verify customer see simple product with updated price on magento storefront page under store view section -->
7981
<click selector="{{StorefrontHeaderSection.storeViewSwitcher}}" stepKey="clickStoreViewSwitcher"/>
8082
<waitForPageLoad stepKey="waitForStoreSwitcherLoad"/>
8183
<click selector="{{StorefrontHeaderSection.storeView(customStoreFR.name)}}" stepKey="clickStoreViewOption"/>
82-
<fillField selector="{{StorefrontQuickSearchResultsSection.searchTextBox}}" userInput="$$initialSimpleProduct.sku$$" stepKey="fillDefaultSimpleProductSkuInSearch"/>
83-
<waitForPageLoad stepKey="waitForSearchTextBoxLoad"/>
84-
<click selector="{{StorefrontQuickSearchResultsSection.searchTextBoxButton}}" stepKey="clickSearchTextButton"/>
85-
<waitForPageLoad stepKey="waitForTextSearchLoad"/>
84+
<actionGroup ref="StorefrontCheckQuickSearchStringActionGroup" stepKey="fillDefaultSimpleProductSkuInSearch">
85+
<argument name="phrase" value="$$initialSimpleProduct.sku$$"/>
86+
</actionGroup>
87+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForSearchTextBoxLoad"/>
88+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="clickSearchTextButton"/>
89+
<comment userInput="Comment is added to preserve the step key for backward compatibility" stepKey="waitForTextSearchLoad"/>
8690
<see selector="{{StorefrontQuickSearchResultsSection.regularPrice}}" userInput="{{simpleProductDataOverriding.price}}" stepKey="seeUpdatedProductPriceOnStorefrontPageUnderStoreViewSection"/>
8791
</test>
8892
</tests>

0 commit comments

Comments
 (0)