Skip to content

Commit 5936296

Browse files
committed
Merge remote-tracking branch 'mainline/2.4-develop' into 2.4-develop-graphql-prs
2 parents aaf97a1 + 8e2d385 commit 5936296

File tree

117 files changed

+3383
-913
lines changed

Some content is hidden

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

117 files changed

+3383
-913
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AdminOpenConfigGeneralAnalyticsPageActionGroup">
12+
<annotations>
13+
<description>Open Config General Analytics Page.</description>
14+
</annotations>
15+
16+
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
17+
<waitForPageLoad stepKey="waitPageLoad"/>
18+
</actionGroup>
19+
</actionGroups>
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertAdminAdvancedReportingPageUrlActionGroup">
12+
<annotations>
13+
<description>Assert admin advanced reporting page url.</description>
14+
</annotations>
15+
16+
<switchToNextTab stepKey="switchToNewTab"/>
17+
<waitForPageLoad stepKey="waitForAdvancedReportingPageLoad"/>
18+
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
19+
</actionGroup>
20+
</actionGroups>

app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingButtonTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
<amOnPage url="{{AdminDashboardPage.url}}" stepKey="amOnDashboardPage"/>
3333
<waitForPageLoad stepKey="waitForDashboardPageLoad"/>
3434
<click selector="{{AdminAdvancedReportingSection.goToAdvancedReporting}}" stepKey="clickGoToAdvancedReporting"/>
35-
<switchToNextTab stepKey="switchToNewTab"/>
36-
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
35+
<actionGroup ref="AssertAdminAdvancedReportingPageUrlActionGroup" stepKey="assertAdvancedReportingPageUrl"/>
3736
</test>
3837
</tests>

app/code/Magento/Analytics/Test/Mftf/Test/AdminAdvancedReportingNavigateMenuTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
<argument name="menuUiId" value="{{AdminMenuReports.dataUiId}}"/>
3030
<argument name="submenuUiId" value="{{AdminMenuReportsBusinessIntelligenceAdvancedReporting.dataUiId}}"/>
3131
</actionGroup>
32-
<switchToNextTab stepKey="switchToNewTab"/>
33-
<waitForPageLoad stepKey="waitForAdvancedReportingPageLoad"/>
34-
<seeInCurrentUrl url="advancedreporting.rjmetrics.com/report" stepKey="seeAssertAdvancedReportingPageUrl"/>
32+
<actionGroup ref="AssertAdminAdvancedReportingPageUrlActionGroup" stepKey="assertAdvancedReportingPageUrl"/>
3533
</test>
3634
</tests>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationBlankIndustryTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
<testCaseId value="MAGETWO-63981"/>
1818
<group value="analytics"/>
1919
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
</before>
2023
<after>
2124
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
2225
</after>
23-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24-
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
26+
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
2527
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
2628
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
2729
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="--Please Select--" stepKey="selectAdvancedReportingIndustry"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationEnableDisableAnalyticsTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,13 @@
1717
<testCaseId value="MAGETWO-66465"/>
1818
<group value="analytics"/>
1919
</annotations>
20+
<before>
21+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
22+
</before>
2023
<after>
2124
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
2225
</after>
23-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
24-
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
26+
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
2527
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingServiceLabel}}" userInput="Advanced Reporting Service" stepKey="seeAdvancedReportingServiceLabelEnabled"/>
2628
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
2729
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationIndustryTest.xml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,13 @@
1818
<testCaseId value="MAGETWO-63898"/>
1919
<group value="analytics"/>
2020
</annotations>
21-
22-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23-
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
24+
<after>
25+
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
26+
</after>
27+
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
2428
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
2529
<see selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustryLabel}}" userInput="Industry" stepKey="seeAdvancedReportingIndustryLabel"/>
2630
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>

app/code/Magento/Analytics/Test/Mftf/Test/AdminConfigurationTimeToSendDataTest.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@
1818
<testCaseId value="MAGETWO-66464"/>
1919
<group value="analytics"/>
2020
</annotations>
21+
<before>
22+
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
23+
</before>
2124
<after>
2225
<actionGroup ref="AdminLogoutActionGroup" stepKey="logoutOfAdmin"/>
2326
</after>
24-
<actionGroup ref="AdminLoginActionGroup" stepKey="loginAsAdmin"/>
25-
<amOnPage url="{{AdminConfigGeneralAnalyticsPage.url}}" stepKey="amOnAdminConfig"/>
27+
<actionGroup ref="AdminOpenConfigGeneralAnalyticsPageActionGroup" stepKey="amOnAdminConfig"/>
2628
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingService}}" userInput="Enable" stepKey="selectAdvancedReportingServiceEnabled"/>
2729
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingIndustry}}" userInput="Apps and Games" stepKey="selectAdvancedReportingIndustry"/>
2830
<selectOption selector="{{AdminConfigAdvancedReportingSection.advancedReportingHour}}" userInput="23" stepKey="selectAdvancedReportingHour"/>

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@
5858
<argument name="categoryName" value="$$categoryN.name$$, $$categoryM.name$$"/>
5959
</actionGroup>
6060

61-
<wait stepKey="waitBeforeRunCronIndex" time="30"/>
61+
<wait stepKey="waitBeforeRunCronIndex" time="60"/>
6262
<magentoCLI stepKey="runCronIndex" command="cron:run --group=index"/>
63-
<wait stepKey="waitAfterRunCronIndex" time="60"/>
63+
<wait stepKey="waitAfterRunCronIndex" time="120"/>
6464
</before>
6565
<after>
6666
<!-- Change "Category Products" and "Product Categories" indexers to "Update on Save" mode -->
@@ -108,6 +108,8 @@
108108
<argument name="categoryName" value="$$categoryK.name$$"/>
109109
</actionGroup>
110110

111+
<wait stepKey="waitAfterAssignCategoryK" time="60"/>
112+
111113
<!-- Unassign category M from Product B -->
112114
<actionGroup ref="AdminProductPageOpenByIdActionGroup" stepKey="amOnEditCategoryPageB">
113115
<argument name="productId" value="$$productB.id$$"/>
@@ -147,8 +149,9 @@
147149
<see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="seeProductInCategoryN"/>
148150

149151
<!-- Run cron -->
150-
<wait stepKey="waitBeforeRunMagentoCron" time="30"/>
152+
<wait stepKey="waitBeforeRunMagentoCron" time="60"/>
151153
<magentoCLI stepKey="runMagentoCron" command="cron:run --group=index"/>
154+
152155
<wait stepKey="waitAfterRunMagentoCron" time="90"/>
153156

154157
<!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->
@@ -213,8 +216,9 @@
213216
<see userInput="$$productC.name$$" selector="{{StorefrontCategoryMainSection.productName}}" stepKey="productCOnCategoryN"/>
214217

215218
<!-- Run Cron once to reindex product changes -->
216-
<wait stepKey="waitBeforeRunCronIndexAfterProductAssignToCategory" time="30"/>
219+
<wait stepKey="waitBeforeRunCronIndexAfterProductAssignToCategory" time="60"/>
217220
<magentoCLI stepKey="runCronIndexAfterProductAssignToCategory" command="cron:run --group=index"/>
221+
218222
<wait stepKey="waitAfterRunCronIndexAfterProductAssignToCategory" time="90"/>
219223

220224
<!-- Open categories K, L, M, N on Storefront in order to make sure that new assigments are applied -->

app/code/Magento/Catalog/etc/db_schema.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@
154154
default="0" comment="Store ID"/>
155155
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="false"
156156
default="0" comment="Entity ID"/>
157-
<column xsi:type="text" name="value" nullable="true" comment="Value"/>
157+
<column xsi:type="mediumtext" name="value" nullable="true" comment="Value"/>
158158
<constraint xsi:type="primary" referenceId="PRIMARY">
159159
<column name="value_id"/>
160160
</constraint>
@@ -408,7 +408,7 @@
408408
default="0" comment="Store ID"/>
409409
<column xsi:type="int" name="entity_id" unsigned="true" nullable="false" identity="false"
410410
default="0" comment="Entity ID"/>
411-
<column xsi:type="text" name="value" nullable="true" comment="Value"/>
411+
<column xsi:type="mediumtext" name="value" nullable="true" comment="Value"/>
412412
<constraint xsi:type="primary" referenceId="PRIMARY">
413413
<column name="value_id"/>
414414
</constraint>

app/code/Magento/Catalog/view/adminhtml/web/js/components/product-ui-select.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
* See COPYING.txt for license details.
44
*/
55

6+
/**
7+
* @deprecated see Magento/Ui/view/base/web/js/grid/filters/elements/ui-select.js
8+
*/
69
define([
710
'Magento_Ui/js/form/element/ui-select',
811
'jquery',

app/code/Magento/Checkout/Test/Mftf/Section/CheckoutPaymentSection.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
<element name="billingNewAddressForm" type="text" selector="[data-form='billing-new-address']"/>
1616
<element name="billingAddressNotSameCheckbox" type="checkbox" selector="#billing-address-same-as-shipping-checkmo"/>
1717
<element name="editAddress" type="button" selector="button.action.action-edit-address"/>
18+
<element name="addressDropdown" type="select" selector="[name=billing_address_id]"/>
19+
<element name="addressDropdownSelected" type="select" selector="[name=billing_address_id] option:checked"/>
1820
<element name="placeOrderDisabled" type="button" selector="#checkout-payment-method-load button.disabled"/>
1921
<element name="update" type="button" selector=".payment-method._active .payment-method-billing-address .action.action-update"/>
2022
<element name="guestFirstName" type="input" selector=".payment-method._active .billing-address-form input[name='firstname']"/>

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
</createData>
2727

2828
<!-- Create customer -->
29-
<createData entity="Customer_US_UK_DE" stepKey="createCustomer"/>
29+
<createData entity="Customer_DE_UK_US" stepKey="createCustomer"/>
3030
</before>
3131
<after>
3232
<!-- Admin log out -->
@@ -70,7 +70,8 @@
7070

7171
<!-- Change the address -->
7272
<click selector="{{CheckoutPaymentSection.editAddress}}" stepKey="editAddress"/>
73-
<waitForElementVisible selector="{{CheckoutShippingSection.addressDropdown}}" stepKey="waitForDropDownToBeVisible"/>
73+
<waitForElementVisible selector="{{CheckoutPaymentSection.addressDropdown}}" stepKey="waitForDropDownToBeVisible"/>
74+
<see selector="{{CheckoutPaymentSection.addressDropdownSelected}}" userInput="{{US_Address_NY.street[0]}}" stepKey="seeDefaultBillingAddressStreet"/>
7475
<selectOption selector="{{CheckoutShippingSection.addressDropdown}}" userInput="{{UK_Not_Default_Address.street[0]}}" stepKey="addAddress"/>
7576

7677
<!-- Check order summary in checkout -->

app/code/Magento/Checkout/view/frontend/web/js/view/billing-address/list.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@ define([
2323
},
2424
addressOptions = addressList().filter(function (address) {
2525
return address.getType() === 'customer-address';
26+
}),
27+
addressDefaultIndex = addressOptions.findIndex(function (address) {
28+
return address.isDefaultBilling();
2629
});
2730

2831
return Component.extend({
@@ -53,7 +56,8 @@ define([
5356
this._super()
5457
.observe('selectedAddress isNewAddressSelected')
5558
.observe({
56-
isNewAddressSelected: !customer.isLoggedIn() || !addressOptions.length
59+
isNewAddressSelected: !customer.isLoggedIn() || !addressOptions.length,
60+
selectedAddress: this.addressOptions[addressDefaultIndex]
5761
});
5862

5963
return this;
Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,63 @@
11
<?php
22
/**
3-
*
43
* Copyright © Magento, Inc. All rights reserved.
54
* See COPYING.txt for license details.
65
*/
76
namespace Magento\Cms\Controller\Adminhtml\Wysiwyg\Images;
87

9-
class OnInsert extends \Magento\Cms\Controller\Adminhtml\Wysiwyg\Images
8+
use Magento\Backend\App\Action\Context;
9+
use Magento\Cms\Controller\Adminhtml\Wysiwyg\Images;
10+
use Magento\Cms\Model\Wysiwyg\Images\GetInsertImageContent;
11+
use Magento\Framework\App\Action\HttpPostActionInterface;
12+
use Magento\Framework\Controller\Result\RawFactory;
13+
use Magento\Framework\Controller\ResultInterface;
14+
use Magento\Framework\Registry;
15+
16+
class OnInsert extends Images implements HttpPostActionInterface
1017
{
1118
/**
12-
* @var \Magento\Framework\Controller\Result\RawFactory
19+
* @var RawFactory
1320
*/
1421
protected $resultRawFactory;
1522

1623
/**
17-
* @param \Magento\Backend\App\Action\Context $context
18-
* @param \Magento\Framework\Registry $coreRegistry
19-
* @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory
24+
* @var GetInsertImageContent
25+
*/
26+
private $getInsertImageContent;
27+
28+
/**
29+
* @param Context $context
30+
* @param Registry $coreRegistry
31+
* @param RawFactory $resultRawFactory
32+
* @param GetInsertImageContent $getInsertImageContent
2033
*/
2134
public function __construct(
22-
\Magento\Backend\App\Action\Context $context,
23-
\Magento\Framework\Registry $coreRegistry,
24-
\Magento\Framework\Controller\Result\RawFactory $resultRawFactory
35+
Context $context,
36+
Registry $coreRegistry,
37+
RawFactory $resultRawFactory,
38+
?GetInsertImageContent $getInsertImageContent = null
2539
) {
2640
$this->resultRawFactory = $resultRawFactory;
2741
parent::__construct($context, $coreRegistry);
42+
$this->getInsertImageContent = $getInsertImageContent ?: $this->_objectManager
43+
->get(GetInsertImageContent::class);
2844
}
2945

3046
/**
31-
* Fire when select image
47+
* Return a content (just a link or an html block) for inserting image to the content
3248
*
33-
* @return \Magento\Framework\Controller\ResultInterface
49+
* @return ResultInterface
3450
*/
3551
public function execute()
3652
{
37-
$imagesHelper = $this->_objectManager->get(\Magento\Cms\Helper\Wysiwyg\Images::class);
38-
$request = $this->getRequest();
39-
40-
$storeId = $request->getParam('store');
41-
42-
$filename = $request->getParam('filename');
43-
$filename = $imagesHelper->idDecode($filename);
44-
45-
$asIs = $request->getParam('as_is');
46-
47-
$forceStaticPath = $request->getParam('force_static_path');
48-
49-
$this->_objectManager->get(\Magento\Catalog\Helper\Data::class)->setStoreId($storeId);
50-
$imagesHelper->setStoreId($storeId);
51-
52-
if ($forceStaticPath) {
53-
$image = parse_url($imagesHelper->getCurrentUrl() . $filename, PHP_URL_PATH);
54-
} else {
55-
$image = $imagesHelper->getImageHtmlDeclaration($filename, $asIs);
56-
}
57-
58-
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
59-
$resultRaw = $this->resultRawFactory->create();
60-
return $resultRaw->setContents($image);
53+
$data = $this->getRequest()->getParams();
54+
return $this->resultRawFactory->create()->setContents(
55+
$this->getInsertImageContent->execute(
56+
$data['filename'],
57+
$data['force_static_path'],
58+
$data['as_is'],
59+
isset($data['store']) ? (int) $data['store'] : null
60+
)
61+
);
6162
}
6263
}

0 commit comments

Comments
 (0)