Skip to content

Commit fd3cf88

Browse files
merge magento-commerce/2.4-develop into magento-honey-badgers/MC-38927
2 parents d10d88f + c9242e8 commit fd3cf88

File tree

39 files changed

+437
-212
lines changed

39 files changed

+437
-212
lines changed

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

+2-1
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

+3-4
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/Test/Mftf/Test/AdminUpdateSimpleProductTieredPriceTest.xml

+22-16
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,10 @@
6868
<fillField selector="{{AdminProductFormSection.productWeight}}" userInput="{{simpleProductTierPrice300InStock.weight}}" stepKey="fillSimpleProductWeight"/>
6969
<selectOption selector="{{AdminProductFormSection.productWeightSelect}}" userInput="{{simpleProductTierPrice300InStock.weightSelect}}" stepKey="selectProductWeight"/>
7070
<click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="clickCategoriesDropDown"/>
71-
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$initialCategoryEntity.name$$" stepKey="fillSearchForInitialCategory" />
71+
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$initialCategoryEntity.name$$" stepKey="fillSearchForInitialCategory"/>
7272
<waitForPageLoad stepKey="waitForCategory1"/>
7373
<click selector="{{AdminProductFormSection.selectCategory($$initialCategoryEntity.name$$)}}" stepKey="unselectInitialCategory"/>
74-
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$categoryEntity.name$$" stepKey="fillSearchCategory" />
74+
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$categoryEntity.name$$" stepKey="fillSearchCategory"/>
7575
<waitForPageLoad stepKey="waitForCategory2"/>
7676
<click selector="{{AdminProductFormSection.selectCategory($$categoryEntity.name$$)}}" stepKey="clickOnCategory"/>
7777
<actionGroup ref="AdminSubmitCategoriesPopupActionGroup" stepKey="clickOnDoneAdvancedCategorySelect"/>
@@ -122,23 +122,29 @@
122122
<see selector="{{StorefrontCategoryMainSection.productLink}}" userInput="{{simpleProductTierPrice300InStock.name}}" stepKey="seeSimpleProductNameOnCategoryPage"/>
123123

124124
<!-- Verify customer see updated simple product (from the above step) on the storefront page -->
125-
<amOnPage url="{{StorefrontProductPage.url(simpleProductTierPrice300InStock.urlKey)}}" stepKey="goToProductPage"/>
126-
<waitForPageLoad stepKey="waitForStorefrontProductPageLoad"/>
127-
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{simpleProductTierPrice300InStock.name}}" stepKey="seeSimpleProductNameOnStoreFrontPage"/>
128-
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="{{simpleProductTierPrice300InStock.price}}" stepKey="seeSimpleProductPriceOnStoreFrontPage"/>
125+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="goToProductPage">
126+
<argument name="productUrlKey" value="{{simpleProductTierPrice300InStock.urlKey}}"/>
127+
</actionGroup>
128+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="waitForStorefrontProductPageLoad"/>
129+
130+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeSimpleProductNameOnStoreFrontPage">
131+
<argument name="productName" value="{{simpleProductTierPrice300InStock.name}}"/>
132+
</actionGroup>
133+
134+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeSimpleProductPriceOnStoreFrontPage">
135+
<argument name="productPrice" value="{{simpleProductTierPrice300InStock.price}}"/>
136+
</actionGroup>
137+
129138
<actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeProductSku">
130139
<argument name="productSku" value="{{simpleProductTierPrice300InStock.sku}}"/>
131140
</actionGroup>
132-
<grabTextFrom selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="productStockAvailableStatus"/>
133-
<assertEquals stepKey="assertStockAvailableOnProductPage">
134-
<expectedResult type="string">{{simpleProductTierPrice300InStock.storefrontStatus}}</expectedResult>
135-
<actualResult type="variable">productStockAvailableStatus</actualResult>
136-
</assertEquals>
137-
<grabTextFrom selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="productPriceAmount"/>
138-
<assertEquals stepKey="assertOldPriceTextOnProductPage">
139-
<expectedResult type="string">${{simpleProductTierPrice300InStock.price}}</expectedResult>
140-
<actualResult type="variable">productPriceAmount</actualResult>
141-
</assertEquals>
141+
142+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="productStockAvailableStatus"/>
143+
<actionGroup ref="AssertStorefrontProductStockStatusOnProductPageActionGroup" stepKey="assertStockAvailableOnProductPage">
144+
<argument name="productStockStatus" value="{{simpleProductTierPrice300InStock.storefrontStatus}}"/>
145+
</actionGroup>
146+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="productPriceAmount"/>
147+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="assertOldPriceTextOnProductPage"/>
142148

143149
<!--Verify customer see updated simple product link on magento storefront page and is searchable by sku -->
144150
<amOnPage url="{{StorefrontProductPage.url(simpleProductTierPrice300InStock.urlKey)}}" stepKey="goToMagentoStorefrontPage"/>

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

+22-16
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
<selectOption selector="{{AdminProductFormSection.stockStatus}}" userInput="{{simpleProductRegularPrice245InStock.status}}" stepKey="selectStockStatusInStock"/>
5252
<fillField selector="{{AdminProductFormSection.productWeight}}" userInput="{{simpleProductRegularPrice245InStock.weight}}" stepKey="fillSimpleProductWeight"/>
5353
<click selector="{{AdminProductFormSection.categoriesDropdown}}" stepKey="clickCategoriesDropDown"/>
54-
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$initialCategoryEntity.name$$" stepKey="fillSearchForInitialCategory" />
54+
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$initialCategoryEntity.name$$" stepKey="fillSearchForInitialCategory"/>
5555
<waitForPageLoad stepKey="waitForCategory1"/>
5656
<click selector="{{AdminProductFormSection.selectCategory($$initialCategoryEntity.name$$)}}" stepKey="unselectInitialCategory"/>
57-
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$categoryEntity.name$$" stepKey="fillSearchCategory" />
57+
<fillField selector="{{AdminProductFormSection.searchCategory}}" userInput="$$categoryEntity.name$$" stepKey="fillSearchCategory"/>
5858
<waitForPageLoad stepKey="waitForCategory2"/>
5959
<click selector="{{AdminProductFormSection.selectCategory($$categoryEntity.name$$)}}" stepKey="clickOnCategory"/>
6060
<actionGroup ref="AdminSubmitCategoriesPopupActionGroup" stepKey="clickOnDoneAdvancedCategorySelect"/>
@@ -102,23 +102,29 @@
102102
<see selector="{{StorefrontCategoryMainSection.productLink}}" userInput="{{simpleProductRegularPrice245InStock.name}}" stepKey="seeSimpleProductNameOnCategoryPage"/>
103103

104104
<!-- Verify customer see updated simple product (from the above step) on the storefront page -->
105-
<amOnPage url="{{StorefrontProductPage.url(simpleProductRegularPrice245InStock.urlKey)}}" stepKey="goToProductPage"/>
106-
<waitForPageLoad stepKey="waitForStorefrontProductPageLoad"/>
107-
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{simpleProductRegularPrice245InStock.name}}" stepKey="seeSimpleProductNameOnStoreFrontPage"/>
108-
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="{{simpleProductRegularPrice245InStock.price}}" stepKey="seeSimpleProductPriceOnStoreFrontPage"/>
105+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="goToProductPage">
106+
<argument name="productUrlKey" value="{{simpleProductRegularPrice245InStock.urlKey}}"/>
107+
</actionGroup>
108+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="waitForStorefrontProductPageLoad"/>
109+
110+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeSimpleProductNameOnStoreFrontPage">
111+
<argument name="productName" value="{{simpleProductRegularPrice245InStock.name}}"/>
112+
</actionGroup>
113+
114+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeSimpleProductPriceOnStoreFrontPage">
115+
<argument name="productPrice" value="{{simpleProductRegularPrice245InStock.price}}"/>
116+
</actionGroup>
117+
109118
<actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeSimpleProductSkuOnStoreFrontPage">
110119
<argument name="productSku" value="{{simpleProductRegularPrice245InStock.sku}}"/>
111120
</actionGroup>
112-
<grabTextFrom selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="productStockAvailableStatus"/>
113-
<assertEquals stepKey="assertStockAvailableOnProductPage">
114-
<expectedResult type="string">{{simpleProductRegularPrice245InStock.storefrontStatus}}</expectedResult>
115-
<actualResult type="variable">productStockAvailableStatus</actualResult>
116-
</assertEquals>
117-
<grabTextFrom selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="productPriceAmount"/>
118-
<assertEquals stepKey="assertOldPriceTextOnProductPage">
119-
<expectedResult type="string">${{simpleProductRegularPrice245InStock.price}}</expectedResult>
120-
<actualResult type="variable">productPriceAmount</actualResult>
121-
</assertEquals>
121+
122+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="productStockAvailableStatus"/>
123+
<actionGroup ref="AssertStorefrontProductStockStatusOnProductPageActionGroup" stepKey="assertStockAvailableOnProductPage">
124+
<argument name="productStockStatus" value="{{simpleProductRegularPrice245InStock.storefrontStatus}}"/>
125+
</actionGroup>
126+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="productPriceAmount"/>
127+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="assertOldPriceTextOnProductPage"/>
122128

123129
<!--Verify customer see updated simple product link on magento storefront page and is searchable by sku -->
124130
<amOnPage url="{{StorefrontProductPage.url(simpleProductRegularPrice245InStock.urlKey)}}" stepKey="goToMagentoStorefrontPage"/>

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

+20-14
Original file line numberDiff line numberDiff line change
@@ -102,23 +102,29 @@
102102
<see selector="{{StorefrontCategoryMainSection.productLink}}" userInput="{{simpleProductRegularPrice32501InStock.name}}" stepKey="seeSimpleProductNameOnCategoryPage"/>
103103

104104
<!-- Verify customer see updated simple product (from the above step) on the storefront page -->
105-
<amOnPage url="{{StorefrontProductPage.url(simpleProductRegularPrice32501InStock.urlKey)}}" stepKey="goToProductPage"/>
106-
<waitForPageLoad stepKey="waitForStorefrontProductPageLoad"/>
107-
<see selector="{{StorefrontProductInfoMainSection.productName}}" userInput="{{simpleProductRegularPrice32501InStock.name}}" stepKey="seeSimpleProductNameOnStoreFrontPage"/>
108-
<see selector="{{StorefrontProductInfoMainSection.productPrice}}" userInput="{{simpleProductRegularPrice32501InStock.price}}" stepKey="seeSimpleProductPriceOnStoreFrontPage"/>
105+
<actionGroup ref="OpenStoreFrontProductPageActionGroup" stepKey="goToProductPage">
106+
<argument name="productUrlKey" value="{{simpleProductRegularPrice32501InStock.urlKey}}"/>
107+
</actionGroup>
108+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="waitForStorefrontProductPageLoad"/>
109+
110+
<actionGroup ref="StorefrontAssertProductNameOnProductPageActionGroup" stepKey="seeSimpleProductNameOnStoreFrontPage">
111+
<argument name="productName" value="{{simpleProductRegularPrice32501InStock.name}}"/>
112+
</actionGroup>
113+
114+
<actionGroup ref="StorefrontAssertProductPriceOnProductPageActionGroup" stepKey="seeSimpleProductPriceOnStoreFrontPage">
115+
<argument name="productPrice" value="{{simpleProductRegularPrice32501InStock.price}}"/>
116+
</actionGroup>
117+
109118
<actionGroup ref="StorefrontAssertProductSkuOnProductPageActionGroup" stepKey="seeProductSku">
110119
<argument name="productSku" value="{{simpleProductRegularPrice32501InStock.sku}}"/>
111120
</actionGroup>
112-
<grabTextFrom selector="{{StorefrontProductInfoMainSection.productStockStatus}}" stepKey="productStockAvailableStatus"/>
113-
<assertEquals stepKey="assertStockAvailableOnProductPage">
114-
<expectedResult type="string">{{simpleProductRegularPrice32501InStock.storefrontStatus}}</expectedResult>
115-
<actualResult type="variable">productStockAvailableStatus</actualResult>
116-
</assertEquals>
117-
<grabTextFrom selector="{{StorefrontProductInfoMainSection.productPrice}}" stepKey="productPriceAmount"/>
118-
<assertEquals stepKey="assertOldPriceTextOnProductPage">
119-
<expectedResult type="string">${{simpleProductRegularPrice32501InStock.price}}</expectedResult>
120-
<actualResult type="variable">productPriceAmount</actualResult>
121-
</assertEquals>
121+
122+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="productStockAvailableStatus"/>
123+
<actionGroup ref="AssertStorefrontProductStockStatusOnProductPageActionGroup" stepKey="assertStockAvailableOnProductPage">
124+
<argument name="productStockStatus" value="{{simpleProductRegularPrice32501InStock.storefrontStatus}}"/>
125+
</actionGroup>
126+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="productPriceAmount"/>
127+
<comment userInput="Comment is added to preserve the step key for backward compatibilityr" stepKey="assertOldPriceTextOnProductPage"/>
122128

123129
<!--Verify customer don't see updated simple product link on magento storefront page and is searchable by sku -->
124130
<amOnPage url="{{StorefrontProductPage.url(simpleProductRegularPrice32501InStock.urlKey)}}" stepKey="goToMagentoStorefrontPage"/>

0 commit comments

Comments
 (0)