Skip to content

Commit cab3c4c

Browse files
committed
Merge branch '2.3-develop' into MAGETWO-90974-html-showing-minicart
2 parents 8bfd9b3 + a04f913 commit cab3c4c

File tree

280 files changed

+8936
-2437
lines changed

Some content is hidden

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

280 files changed

+8936
-2437
lines changed

app/code/Magento/AdminNotification/etc/adminhtml/menu.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
-->
88
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Backend:etc/menu.xsd">
99
<menu>
10-
<add id="Magento_AdminNotification::system_adminnotification" title="Notifications" translate="title" module="Magento_AdminNotification" sortOrder="10" parent="Magento_Backend::system_other_settings" action="adminhtml/notification" resource="Magento_AdminNotification::adminnotification"/>
10+
<add id="Magento_AdminNotification::system_adminnotification" title="Notifications" translate="title" module="Magento_AdminNotification" sortOrder="10" parent="Magento_Backend::system_other_settings" action="adminhtml/notification" resource="Magento_AdminNotification::adminnotification"/>
1111
</menu>
1212
</config>

app/code/Magento/AdvancedSearch/Model/ResourceModel/Index.php

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
use Magento\Catalog\Model\Indexer\Category\Product\AbstractAction;
1717
use Magento\Framework\Search\Request\IndexScopeResolverInterface as TableResolver;
1818
use Magento\Catalog\Model\Indexer\Product\Price\DimensionCollectionFactory;
19+
use Magento\Store\Model\Indexer\WebsiteDimensionProvider;
1920

2021
/**
2122
* @api
@@ -47,12 +48,17 @@ class Index extends AbstractDb
4748
*/
4849
private $dimensionCollectionFactory;
4950

51+
/**
52+
* @var int|null
53+
*/
54+
private $websiteId;
55+
5056
/**
5157
* Index constructor.
5258
* @param Context $context
5359
* @param StoreManagerInterface $storeManager
5460
* @param MetadataPool $metadataPool
55-
* @param null $connectionName
61+
* @param string|null $connectionName
5662
* @param TableResolver|null $tableResolver
5763
* @param DimensionCollectionFactory|null $dimensionCollectionFactory
5864
*/
@@ -94,12 +100,17 @@ protected function _getCatalogProductPriceData($productIds = null)
94100
$catalogProductIndexPriceSelect = [];
95101

96102
foreach ($this->dimensionCollectionFactory->create() as $dimensions) {
97-
$catalogProductIndexPriceSelect[] = $connection->select()->from(
98-
$this->tableResolver->resolve('catalog_product_index_price', $dimensions),
99-
['entity_id', 'customer_group_id', 'website_id', 'min_price']
100-
);
101-
if ($productIds) {
102-
current($catalogProductIndexPriceSelect)->where('entity_id IN (?)', $productIds);
103+
if (!isset($dimensions[WebsiteDimensionProvider::DIMENSION_NAME]) ||
104+
$this->websiteId === null ||
105+
$dimensions[WebsiteDimensionProvider::DIMENSION_NAME]->getValue() === $this->websiteId) {
106+
$select = $connection->select()->from(
107+
$this->tableResolver->resolve('catalog_product_index_price', $dimensions),
108+
['entity_id', 'customer_group_id', 'website_id', 'min_price']
109+
);
110+
if ($productIds) {
111+
$select->where('entity_id IN (?)', $productIds);
112+
}
113+
$catalogProductIndexPriceSelect[] = $select;
103114
}
104115
}
105116

@@ -123,9 +134,12 @@ protected function _getCatalogProductPriceData($productIds = null)
123134
*/
124135
public function getPriceIndexData($productIds, $storeId)
125136
{
137+
$websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();
138+
139+
$this->websiteId = $websiteId;
126140
$priceProductsIndexData = $this->_getCatalogProductPriceData($productIds);
141+
$this->websiteId = null;
127142

128-
$websiteId = $this->storeManager->getStore($storeId)->getWebsiteId();
129143
if (!isset($priceProductsIndexData[$websiteId])) {
130144
return [];
131145
}

app/code/Magento/Authorizenet/Controller/Directpost/Payment/BackendResponse.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,15 @@
1010
use Magento\Authorizenet\Model\Directpost;
1111
use Magento\Authorizenet\Model\DirectpostFactory;
1212
use Magento\Framework\App\Action\Context;
13+
use Magento\Framework\App\CsrfAwareActionInterface;
14+
use Magento\Framework\App\Request\InvalidRequestException;
15+
use Magento\Framework\App\RequestInterface;
1316
use Magento\Framework\Controller\ResultFactory;
1417
use Magento\Framework\Exception\LocalizedException;
1518
use Magento\Framework\Registry;
1619
use Psr\Log\LoggerInterface;
1720

18-
class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Payment
21+
class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Payment implements CsrfAwareActionInterface
1922
{
2023
/**
2124
* @var LoggerInterface
@@ -48,6 +51,23 @@ public function __construct(
4851
$this->logger = $logger ?: $this->_objectManager->get(LoggerInterface::class);
4952
}
5053

54+
/**
55+
* @inheritDoc
56+
*/
57+
public function createCsrfValidationException(
58+
RequestInterface $request
59+
): ?InvalidRequestException {
60+
return null;
61+
}
62+
63+
/**
64+
* @inheritDoc
65+
*/
66+
public function validateForCsrf(RequestInterface $request): ?bool
67+
{
68+
return true;
69+
}
70+
5171
/**
5272
* Response action.
5373
* Action for Authorize.net SIM Relay Request.

app/code/Magento/Authorizenet/Controller/Directpost/Payment/Response.php

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,29 @@
66
*/
77
namespace Magento\Authorizenet\Controller\Directpost\Payment;
88

9-
class Response extends \Magento\Authorizenet\Controller\Directpost\Payment
9+
use Magento\Framework\App\CsrfAwareActionInterface;
10+
use Magento\Framework\App\Request\InvalidRequestException;
11+
use Magento\Framework\App\RequestInterface;
12+
13+
class Response extends \Magento\Authorizenet\Controller\Directpost\Payment implements CsrfAwareActionInterface
1014
{
15+
/**
16+
* @inheritDoc
17+
*/
18+
public function createCsrfValidationException(
19+
RequestInterface $request
20+
): ?InvalidRequestException {
21+
return null;
22+
}
23+
24+
/**
25+
* @inheritDoc
26+
*/
27+
public function validateForCsrf(RequestInterface $request): ?bool
28+
{
29+
return true;
30+
}
31+
1132
/**
1233
* Response action.
1334
* Action for Authorize.net SIM Relay Request.

app/code/Magento/Authorizenet/Model/Directpost/Request.php

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -112,50 +112,50 @@ public function setDataFromOrder(
112112
sprintf('%.2F', $order->getBaseShippingAmount())
113113
);
114114

115-
//need to use strval() because NULL values IE6-8 decodes as "null" in JSON in JavaScript,
115+
//need to use (string) because NULL values IE6-8 decodes as "null" in JSON in JavaScript,
116116
//but we need "" for null values.
117117
$billing = $order->getBillingAddress();
118118
if (!empty($billing)) {
119-
$this->setXFirstName(strval($billing->getFirstname()))
120-
->setXLastName(strval($billing->getLastname()))
121-
->setXCompany(strval($billing->getCompany()))
122-
->setXAddress(strval($billing->getStreetLine(1)))
123-
->setXCity(strval($billing->getCity()))
124-
->setXState(strval($billing->getRegion()))
125-
->setXZip(strval($billing->getPostcode()))
126-
->setXCountry(strval($billing->getCountryId()))
127-
->setXPhone(strval($billing->getTelephone()))
128-
->setXFax(strval($billing->getFax()))
129-
->setXCustId(strval($billing->getCustomerId()))
130-
->setXCustomerIp(strval($order->getRemoteIp()))
131-
->setXCustomerTaxId(strval($billing->getTaxId()))
132-
->setXEmail(strval($order->getCustomerEmail()))
133-
->setXEmailCustomer(strval($paymentMethod->getConfigData('email_customer')))
134-
->setXMerchantEmail(strval($paymentMethod->getConfigData('merchant_email')));
119+
$this->setXFirstName((string)$billing->getFirstname())
120+
->setXLastName((string)$billing->getLastname())
121+
->setXCompany((string)$billing->getCompany())
122+
->setXAddress((string)$billing->getStreetLine(1))
123+
->setXCity((string)$billing->getCity())
124+
->setXState((string)$billing->getRegion())
125+
->setXZip((string)$billing->getPostcode())
126+
->setXCountry((string)$billing->getCountryId())
127+
->setXPhone((string)$billing->getTelephone())
128+
->setXFax((string)$billing->getFax())
129+
->setXCustId((string)$billing->getCustomerId())
130+
->setXCustomerIp((string)$order->getRemoteIp())
131+
->setXCustomerTaxId((string)$billing->getTaxId())
132+
->setXEmail((string)$order->getCustomerEmail())
133+
->setXEmailCustomer((string)$paymentMethod->getConfigData('email_customer'))
134+
->setXMerchantEmail((string)$paymentMethod->getConfigData('merchant_email'));
135135
}
136136

137137
$shipping = $order->getShippingAddress();
138138
if (!empty($shipping)) {
139139
$this->setXShipToFirstName(
140-
strval($shipping->getFirstname())
140+
(string)$shipping->getFirstname()
141141
)->setXShipToLastName(
142-
strval($shipping->getLastname())
142+
(string)$shipping->getLastname()
143143
)->setXShipToCompany(
144-
strval($shipping->getCompany())
144+
(string)$shipping->getCompany()
145145
)->setXShipToAddress(
146-
strval($shipping->getStreetLine(1))
146+
(string)$shipping->getStreetLine(1)
147147
)->setXShipToCity(
148-
strval($shipping->getCity())
148+
(string)$shipping->getCity()
149149
)->setXShipToState(
150-
strval($shipping->getRegion())
150+
(string)$shipping->getRegion()
151151
)->setXShipToZip(
152-
strval($shipping->getPostcode())
152+
(string)$shipping->getPostcode()
153153
)->setXShipToCountry(
154-
strval($shipping->getCountryId())
154+
(string)$shipping->getCountryId()
155155
);
156156
}
157157

158-
$this->setXPoNum(strval($payment->getPoNumber()));
158+
$this->setXPoNum((string)$payment->getPoNumber());
159159

160160
return $this;
161161
}

app/code/Magento/Backup/Model/BackupFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public function __construct(\Magento\Framework\ObjectManagerInterface $objectMan
3939
*/
4040
public function create($timestamp, $type)
4141
{
42-
$fsCollection = $this->_objectManager->get(\Magento\Backup\Model\Fs\Collection::class);
43-
$backupInstance = $this->_objectManager->get(\Magento\Backup\Model\Backup::class);
42+
$fsCollection = $this->_objectManager->create(\Magento\Backup\Model\Fs\Collection::class);
43+
$backupInstance = $this->_objectManager->create(\Magento\Backup\Model\Backup::class);
4444

4545
foreach ($fsCollection as $backup) {
4646
if ($backup->getTime() === (int) $timestamp && $backup->getType() === $type) {

app/code/Magento/Backup/Model/Fs/Collection.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ protected function _generateRow($filename)
115115
if (isset($row['display_name']) && $row['display_name'] == '') {
116116
$row['display_name'] = 'WebSetupWizard';
117117
}
118-
$row['id'] = $row['time'] . '_' . $row['type'] . (isset($row['display_name']) ? $row['display_name'] : '');
118+
$row['id'] = $row['time'] . '_' . $row['type']
119+
. (isset($row['display_name']) ? '_' . $row['display_name'] : '');
119120
return $row;
120121
}
121122
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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+
12+
<actionGroup name="createSystemBackup">
13+
<arguments>
14+
<argument name="backup" defaultValue="SystemBackup"/>
15+
</arguments>
16+
<click selector="{{AdminMainActionsSection.systemBackup}}" stepKey="clickCreateBackupButton"/>
17+
<waitForElementVisible selector="{{AdminCreateBackupFormSection.backupNameField}}" stepKey="waitForForm"/>
18+
<fillField selector="{{AdminCreateBackupFormSection.backupNameField}}" userInput="{{backup.name}}" stepKey="fillBackupName"/>
19+
<click selector="{{AdminCreateBackupFormSection.ok}}" stepKey="clickOk"/>
20+
<waitForElementNotVisible selector=".loading-mask" time="300" stepKey="waitForBackupProcess"/>
21+
<see selector="{{AdminMessagesSection.success}}" userInput="You created the system backup." stepKey="seeSuccessMessage"/>
22+
<see selector="{{AdminGridTableSection.backupNameColumn}}" userInput="{{backup.name}}" stepKey="seeBackupInGrid"/>
23+
<see selector="{{AdminGridTableSection.backupTypeByName(backup.name)}}" userInput="{{backup.type}}" stepKey="seeBackupType"/>
24+
</actionGroup>
25+
26+
<actionGroup name="createMediaBackup">
27+
<arguments>
28+
<argument name="backup" defaultValue="MediaBackup"/>
29+
</arguments>
30+
<click selector="{{AdminMainActionsSection.mediaBackup}}" stepKey="clickCreateBackupButton"/>
31+
<waitForElementVisible selector="{{AdminCreateBackupFormSection.backupNameField}}" stepKey="waitForForm"/>
32+
<fillField selector="{{AdminCreateBackupFormSection.backupNameField}}" userInput="{{backup.name}}" stepKey="fillBackupName"/>
33+
<click selector="{{AdminCreateBackupFormSection.ok}}" stepKey="clickOk"/>
34+
<waitForPageLoad time="120" stepKey="waitForBackupProcess"/>
35+
<see selector="{{AdminMessagesSection.success}}" userInput="You created the database and media backup." stepKey="seeSuccessMessage"/>
36+
<see selector="{{AdminGridTableSection.backupNameColumn}}" userInput="{{backup.name}}" stepKey="seeBackupInGrid"/>
37+
<see selector="{{AdminGridTableSection.backupTypeByName(backup.name)}}" userInput="{{backup.type}}" stepKey="seeBackupType"/>
38+
</actionGroup>
39+
40+
<actionGroup name="createDatabaseBackup">
41+
<arguments>
42+
<argument name="backup" defaultValue="DatabaseBackup"/>
43+
</arguments>
44+
<click selector="{{AdminMainActionsSection.databaseBackup}}" stepKey="clickCreateBackupButton"/>
45+
<waitForElementVisible selector="{{AdminCreateBackupFormSection.backupNameField}}" stepKey="waitForForm"/>
46+
<fillField selector="{{AdminCreateBackupFormSection.backupNameField}}" userInput="{{backup.name}}" stepKey="fillBackupName"/>
47+
<click selector="{{AdminCreateBackupFormSection.ok}}" stepKey="clickOk"/>
48+
<waitForPageLoad time="120" stepKey="waitForBackupProcess"/>
49+
<see selector="{{AdminMessagesSection.success}}" userInput="You created the database backup." stepKey="seeSuccessMessage"/>
50+
<see selector="{{AdminGridTableSection.backupNameColumn}}" userInput="{{backup.name}}" stepKey="seeBackupInGrid"/>
51+
<see selector="{{AdminGridTableSection.backupTypeByName(backup.name)}}" userInput="{{backup.type}}" stepKey="seeBackupType"/>
52+
</actionGroup>
53+
54+
</actionGroups>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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+
12+
<actionGroup name="deleteBackup">
13+
<arguments>
14+
<argument name="backup"/>
15+
</arguments>
16+
<see selector="{{AdminGridTableSection.backupNameColumn}}" userInput="{{backup.name}}" stepKey="seeBackupInGrid"/>
17+
<click selector="{{AdminGridTableSection.backupRowCheckbox(backup.name)}}" stepKey="selectBackupRow"/>
18+
<selectOption selector="{{AdminGridActionSection.actionSelect}}" userInput="Delete" stepKey="selectDeleteAction"/>
19+
<click selector="{{AdminGridActionSection.submitButton}}" stepKey="clickSubmit"/>
20+
<see selector="{{AdminConfirmationModalSection.message}}" userInput="Are you sure you want to delete the selected backup(s)?" stepKey="seeConfirmationModal"/>
21+
<click selector="{{AdminConfirmationModalSection.ok}}" stepKey="clickOkConfirmDelete"/>
22+
<dontSee selector="{{AdminGridTableSection.backupNameColumn}}" userInput="{{backup.name}}" stepKey="dontSeeBackupInGrid"/>
23+
</actionGroup>
24+
25+
</actionGroups>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
<entities xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:DataGenerator/etc/dataProfileSchema.xsd">
11+
<entity name="SystemBackup" type="backup">
12+
<data key="name" unique="suffix">systemBackup</data>
13+
<data key="type">System</data>
14+
</entity>
15+
<entity name="MediaBackup" type="backup">
16+
<data key="name" unique="suffix">mediaBackup</data>
17+
<data key="type">Database and Media</data>
18+
</entity>
19+
<entity name="DatabaseBackup" type="backup">
20+
<data key="name" unique="suffix">databaseBackup</data>
21+
<data key="type">Database</data>
22+
</entity>
23+
</entities>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
11+
<page name="BackupIndexPage" url="/backup/index/" area="admin" module="Magento_Backup">
12+
<section name="AdminMainActionsSection"/>
13+
<section name="AdminGridTableSection"/>
14+
<section name="AdminCreateBackupFormSection"/>
15+
</page>
16+
</pages>
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+
9+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminCreateBackupFormSection">
12+
<element name="backupNameField" type="input" selector="input[name='backup_name']"/>
13+
<element name="maintenanceModeCheckbox" type="checkbox" selector="input[name='maintenance_mode']"/>
14+
<element name="excludeMediaCheckbox" type="checkbox" selector="input[name='exclude_media']"/>
15+
<element name="ok" type="button" selector=".modal-header button.primary"/>
16+
<element name="cancel" type="button" selector=".modal-header button.cancel"/>
17+
</section>
18+
</sections>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
11+
<section name="AdminGridActionSection">
12+
<element name="actionSelect" type="select" selector="#backupsGrid_massaction-select"/>
13+
<element name="submitButton" type="button" selector="#backupsGrid_massaction button[title='Submit']"/>
14+
</section>
15+
</sections>

0 commit comments

Comments
 (0)