Skip to content

Commit 7da6573

Browse files
committed
Merge branch 'MC-39606' into 2.4-develop-sidecar-pr13
2 parents 8615dd1 + 22be2ab commit 7da6573

File tree

154 files changed

+4093
-701
lines changed

Some content is hidden

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

154 files changed

+4093
-701
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
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+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="AwsS3AdminImportSimpleAndConfigurableProductsWithAssignedImagesTest" extends="AdminImportSimpleAndConfigurableProductsWithAssignedImagesTest">
12+
<annotations>
13+
<features value="AwsS3"/>
14+
<stories value="Import Products"/>
15+
<title value="S3 - Import Configurable Product With Simple Child Products With Images"/>
16+
<description value="Imports a .csv file containing a configurable product with 3 child simple products that
17+
have images. Verifies that products are imported successfully and that the images are attached to the
18+
products as expected."/>
19+
<severity value="MAJOR"/>
20+
<group value="importExport"/>
21+
<group value="remote_storage_aws_s3"/>
22+
<skip>
23+
<issueId value="MC-39280"/>
24+
</skip>
25+
</annotations>
26+
27+
<before>
28+
<!-- Enable AWS S3 Remote Storage -->
29+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.enable_options}}" stepKey="enableRemoteStorage"/>
30+
</before>
31+
32+
<after>
33+
<!-- Disable AWS S3 Remote Storage -->
34+
<magentoCLI command="setup:config:set {{RemoteStorageAwsS3ConfigData.disable_options}}" stepKey="disableRemoteStorage"/>
35+
</after>
36+
</test>
37+
</tests>

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>
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
9+
<actionGroup name="StorefrontNavigateToCategoryUrlActionGroup">
10+
<annotations>
11+
<description>Goes to the Storefront Category page for the provided Category URL.</description>
12+
</annotations>
13+
<arguments>
14+
<argument name="categoryUrl" type="string"/>
15+
</arguments>
16+
<amOnPage url="{{StorefrontCategoryPage.url(categoryUrl)}}" stepKey="goToStorefrontCategoryPage"/>
17+
</actionGroup>
18+
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/ActionGroup/StorefrontProductPageSelectDropDownOptionValueActionGroup.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
</arguments>
1919

2020
<selectOption selector="{{StorefrontProductInfoMainSection.productOptionSelect(attributeLabel)}}" userInput="{{optionLabel}}" stepKey="fillDropDownAttributeOption"/>
21+
<waitForPageLoad stepKey="waitForPageLoad"/>
2122
</actionGroup>
2223
</actionGroups>

app/code/Magento/Catalog/Test/Mftf/Section/AdminProductImagesSection.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<element name="imageFileUpload" type="input" selector="#fileupload"/>
1414
<element name="imageUploadButton" type="button" selector="div.image div.fileinput-button"/>
1515
<element name="imageFile" type="text" selector="//*[@id='media_gallery_content']//img[contains(@src, '{{url}}')]" parameterized="true"/>
16+
<element name="imageElement" type="text" selector="#media_gallery_content img"/>
1617
<element name="removeImageButton" type="button" selector=".action-remove"/>
1718
<element name="removeImageButtonForExactImage" type="button" selector="[id='media_gallery_content'] img[src*='{{imageName}}'] + div[class='actions'] button[class='action-remove']" parameterized="true"/>
1819
<element name="modalOkBtn" type="button" selector="button.action-primary.action-accept"/>

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 -->

0 commit comments

Comments
 (0)