Skip to content

Commit c9242e8

Browse files
🔃 [Magento Community Engineering] Community Contributions - 2.4-develop daily delivery
Accepted Community Pull Requests: - #30950: Allow backend login without redirect (by @aapokiiso) - #31247: [MFTF] Refactoring of AdminUpdateSimpleProduct...Tests (asserting product details on Storefront) (by @AnnaAPak) - #21857: #21853: Allow mview indexers to use different entity columns. (by @nikunjkotecha) - #31208: Changed Newsletter Enabled/Disable config settings by priority, store scope then default scope (by @saphaljha) Fixed GitHub Issues: - #31042: [Issue] Allow backend login without redirect (reported by @m2-assistant[bot]) has been fixed in #30950 by @aapokiiso in 2.4-develop branch Related commits: 1. df20ae1 2. 62e54bd 3. 760a4e3 4. 73ef59b 5. 217c32c 6. 6e3b5b0 - #31248: [Issue] [MFTF] Refactoring of AdminUpdateSimpleProduct...Tests (asserting product details on Storefront) (reported by @m2-assistant[bot]) has been fixed in #31247 by @AnnaAPak in 2.4-develop branch Related commits: 1. 701a96a 2. 40cf39e 3. ed00875 4. 8ae0c79 5. 791d006 6. 9366f35 - #21853: Not possible to use different column name in multiple indexers for subscription (reported by @nikunjkotecha) has been fixed in #21857 by @nikunjkotecha in 2.4-develop branch Related commits: 1. 891198c 2. 7da4940 3. b59fc5a 4. 4035ec0 5. 320ced7 6. 0d1ac3a 7. 6cbf85f 8. 7c2d2a6 9. 8388a90 10. 3f67ed8 11. 873b814 12. 392dbf6 13. ff56be5 14. e16f2c2 15. 922e029 16. 330d595 17. 4c1094a 18. 69cee97 19. 46429a4 20. 4ad7aae 21. 8a9b768 22. db4cf23 23. 094decc 24. 910eb41 25. be3f84b - #31188: Newsletter enabled setting is always retrieved from the default scope (reported by @savimar06) has been fixed in #31208 by @saphaljha in 2.4-develop branch Related commits: 1. 18aab3c 2. 1de30e3 3. cb4988a 4. 7889a6f 5. 21c0bff 6. 3e1d239 7. 5dab4fa 8. d099df9 9. 1c056ea 10. f3b63dc
2 parents 5fa09cc + 33d322b commit c9242e8

14 files changed

+269
-147
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)