Skip to content

Commit 81340cb

Browse files
authored
Merge pull request #7470 from magento-gl/L3_Arrows_PR_20220221
L3 arrows pr 20220221
2 parents 67ee5ff + f1ab50f commit 81340cb

File tree

22 files changed

+507
-39
lines changed

22 files changed

+507
-39
lines changed

app/code/Magento/Config/Test/Mftf/Section/AdminConfigSection.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,9 @@
2323
<element name="collapsibleSectionByTitle" type="text" selector="//form[@id='config-edit-form']//div[@class='section-config'][contains(.,'{{sectionTitle}}')]" parameterized="true" />
2424
<element name="expandedSectionByTitle" type="text" selector="//form[@id='config-edit-form']//div[@class='section-config active'][contains(.,'{{sectionTitle}}')]" parameterized="true" />
2525
<element name="errorElement" type="text" selector="#{{inputId}}-error" parameterized="true" />
26+
<element name="defaultCurrency" type="select" selector="#currency_options_default" />
27+
<element name="allowedCurrencies" type="multiselect" selector="#currency_options_allow" />
28+
<element name="defaultCurrencyCheckbox" type="checkbox" selector="#currency_options_default_inherit"/>
29+
<element name="allowedCurrencyCheckbox" type="checkbox" selector="#currency_options_allow_inherit"/>
2630
</section>
2731
</sections>

app/code/Magento/Customer/Block/Account/AuthenticationPopup.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public function __construct(
4242
}
4343

4444
/**
45+
* Returns serialize jsLayout
46+
*
4547
* @return string
4648
*/
4749
public function getJsLayout()
@@ -60,7 +62,8 @@ public function getConfig()
6062
'autocomplete' => $this->escapeHtml($this->isAutocompleteEnabled()),
6163
'customerRegisterUrl' => $this->escapeUrl($this->getCustomerRegisterUrlUrl()),
6264
'customerForgotPasswordUrl' => $this->escapeUrl($this->getCustomerForgotPasswordUrl()),
63-
'baseUrl' => $this->escapeUrl($this->getBaseUrl())
65+
'baseUrl' => $this->escapeUrl($this->getBaseUrl()),
66+
'customerLoginUrl' => $this->getUrl('customer/ajax/login'),
6467
];
6568
}
6669

app/code/Magento/Customer/Test/Unit/Block/Account/AuthenticationPopupTest.php

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function ($string) {
102102
*
103103
* @dataProvider dataProviderGetConfig
104104
*/
105-
public function testGetConfig($isAutocomplete, $baseUrl, $registerUrl, $forgotUrl, array $result)
105+
public function testGetConfig($isAutocomplete, $baseUrl, $registerUrl, $forgotUrl, $loginUrl, array $result)
106106
{
107107
$this->scopeConfigMock->expects($this->any())
108108
->method('getValue')
@@ -129,6 +129,7 @@ public function testGetConfig($isAutocomplete, $baseUrl, $registerUrl, $forgotUr
129129
[
130130
['customer/account/create', [], $registerUrl],
131131
['customer/account/forgotpassword', [], $forgotUrl],
132+
['customer/ajax/login', [], $loginUrl],
132133
]
133134
);
134135

@@ -146,47 +147,55 @@ public function dataProviderGetConfig()
146147
'base',
147148
'reg',
148149
'forgot',
150+
'loginUrl',
149151
[
150152
'autocomplete' => 'escapeHtmloff',
151153
'customerRegisterUrl' => 'escapeUrlreg',
152154
'customerForgotPasswordUrl' => 'escapeUrlforgot',
153155
'baseUrl' => 'escapeUrlbase',
156+
'customerLoginUrl'=>'loginUrl',
154157
],
155158
],
156159
[
157160
1,
158161
'',
159162
'reg',
160163
'forgot',
164+
'loginUrl',
161165
[
162166
'autocomplete' => 'escapeHtmlon',
163167
'customerRegisterUrl' => 'escapeUrlreg',
164168
'customerForgotPasswordUrl' => 'escapeUrlforgot',
165169
'baseUrl' => 'escapeUrl',
170+
'customerLoginUrl'=>'loginUrl',
166171
],
167172
],
168173
[
169174
'',
170175
'base',
171176
'',
172177
'forgot',
178+
'loginUrl',
173179
[
174180
'autocomplete' => 'escapeHtmloff',
175181
'customerRegisterUrl' => 'escapeUrl',
176182
'customerForgotPasswordUrl' => 'escapeUrlforgot',
177183
'baseUrl' => 'escapeUrlbase',
184+
'customerLoginUrl'=>'loginUrl',
178185
],
179186
],
180187
[
181188
true,
182189
'base',
183190
'reg',
184191
'',
192+
'loginUrl',
185193
[
186194
'autocomplete' => 'escapeHtmlon',
187195
'customerRegisterUrl' => 'escapeUrlreg',
188196
'customerForgotPasswordUrl' => 'escapeUrl',
189197
'baseUrl' => 'escapeUrlbase',
198+
'customerLoginUrl'=>'loginUrl',
190199
],
191200
],
192201
];
@@ -202,8 +211,14 @@ public function dataProviderGetConfig()
202211
*
203212
* @dataProvider dataProviderGetConfig
204213
*/
205-
public function testGetSerializedConfig($isAutocomplete, $baseUrl, $registerUrl, $forgotUrl, array $result)
206-
{
214+
public function testGetSerializedConfig(
215+
$isAutocomplete,
216+
$baseUrl,
217+
$registerUrl,
218+
$forgotUrl,
219+
$loginUrl,
220+
array $result
221+
) {
207222
$this->scopeConfigMock->expects($this->any())
208223
->method('getValue')
209224
->with(Form::XML_PATH_ENABLE_AUTOCOMPLETE, ScopeInterface::SCOPE_STORE, null)
@@ -229,6 +244,7 @@ public function testGetSerializedConfig($isAutocomplete, $baseUrl, $registerUrl,
229244
[
230245
['customer/account/create', [], $registerUrl],
231246
['customer/account/forgotpassword', [], $forgotUrl],
247+
['customer/ajax/login', [], $loginUrl],
232248
]
233249
);
234250
$this->serializerMock->expects($this->any())->method('serialize')

app/code/Magento/Customer/view/frontend/web/js/action/login.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,15 @@ define([
2222
*/
2323
action = function (loginData, redirectUrl, isGlobal, messageContainer) {
2424
messageContainer = messageContainer || globalMessageList;
25+
let customerLoginUrl = 'customer/ajax/login';
26+
27+
if (loginData.customerLoginUrl) {
28+
customerLoginUrl = loginData.customerLoginUrl;
29+
delete loginData.customerLoginUrl;
30+
}
2531

2632
return storage.post(
27-
'customer/ajax/login',
33+
customerLoginUrl,
2834
JSON.stringify(loginData),
2935
isGlobal
3036
).done(function (response) {

app/code/Magento/Customer/view/frontend/web/js/view/authentication-popup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ define([
8080
formDataArray.forEach(function (entry) {
8181
loginData[entry.name] = entry.value;
8282
});
83-
83+
loginData['customerLoginUrl'] = window.authenticationPopup.customerLoginUrl;
8484
if (formElement.validation() &&
8585
formElement.validation('isValid')
8686
) {

app/code/Magento/Reports/Block/Adminhtml/Sales/Coupons/Grid.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid
2121
protected $_columnGroupBy = 'period';
2222

2323
/**
24-
* {@inheritdoc}
24+
* @inheritdoc
2525
* @codeCoverageIgnore
2626
*/
2727
protected function _construct()
@@ -32,7 +32,7 @@ protected function _construct()
3232
}
3333

3434
/**
35-
* {@inheritdoc}
35+
* @inheritdoc
3636
*/
3737
public function getResourceCollectionName()
3838
{
@@ -44,7 +44,7 @@ public function getResourceCollectionName()
4444
}
4545

4646
/**
47-
* {@inheritdoc}
47+
* @inheritdoc
4848
* @SuppressWarnings(PHPMD.ExcessiveMethodLength)
4949
*/
5050
protected function _prepareColumns()
@@ -100,9 +100,7 @@ protected function _prepareColumns()
100100
]
101101
);
102102

103-
if ($this->getFilterData()->getStoreIds()) {
104-
$this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
105-
}
103+
$this->setStoreIds($this->_getStoreIds());
106104
$currencyCode = $this->getCurrentCurrencyCode();
107105
$rate = $this->getRate($currencyCode);
108106

app/code/Magento/Reports/Block/Adminhtml/Sales/Invoiced/Grid.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid
2222
protected $_columnGroupBy = 'period';
2323

2424
/**
25-
* {@inheritdoc}
25+
* @inheritdoc
2626
* @codeCoverageIgnore
2727
*/
2828
protected function _construct()
@@ -32,7 +32,7 @@ protected function _construct()
3232
}
3333

3434
/**
35-
* {@inheritdoc}
35+
* @inheritdoc
3636
*/
3737
public function getResourceCollectionName()
3838
{
@@ -42,7 +42,7 @@ public function getResourceCollectionName()
4242
}
4343

4444
/**
45-
* {@inheritdoc}
45+
* @inheritdoc
4646
*/
4747
protected function _prepareColumns()
4848
{
@@ -87,9 +87,7 @@ protected function _prepareColumns()
8787
]
8888
);
8989

90-
if ($this->getFilterData()->getStoreIds()) {
91-
$this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
92-
}
90+
$this->setStoreIds($this->_getStoreIds());
9391
$currencyCode = $this->getCurrentCurrencyCode();
9492
$rate = $this->getRate($currencyCode);
9593

app/code/Magento/Reports/Block/Adminhtml/Sales/Refunded/Grid.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid
2222
protected $_columnGroupBy = 'period';
2323

2424
/**
25-
* {@inheritdoc}
25+
* @inheritdoc
2626
* @codeCoverageIgnore
2727
*/
2828
protected function _construct()
@@ -32,7 +32,7 @@ protected function _construct()
3232
}
3333

3434
/**
35-
* {@inheritdoc}
35+
* @inheritdoc
3636
*/
3737
public function getResourceCollectionName()
3838
{
@@ -42,7 +42,7 @@ public function getResourceCollectionName()
4242
}
4343

4444
/**
45-
* {@inheritdoc}
45+
* @inheritdoc
4646
*/
4747
protected function _prepareColumns()
4848
{
@@ -74,9 +74,7 @@ protected function _prepareColumns()
7474
]
7575
);
7676

77-
if ($this->getFilterData()->getStoreIds()) {
78-
$this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
79-
}
77+
$this->setStoreIds($this->_getStoreIds());
8078
$currencyCode = $this->getCurrentCurrencyCode();
8179
$rate = $this->getRate($currencyCode);
8280

app/code/Magento/Reports/Block/Adminhtml/Sales/Shipping/Grid.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid
2222
protected $_columnGroupBy = 'period';
2323

2424
/**
25-
* {@inheritdoc}
25+
* @inheritdoc
2626
* @codeCoverageIgnore
2727
*/
2828
protected function _construct()
@@ -33,7 +33,7 @@ protected function _construct()
3333
}
3434

3535
/**
36-
* {@inheritdoc}
36+
* @inheritdoc
3737
*/
3838
public function getResourceCollectionName()
3939
{
@@ -43,7 +43,7 @@ public function getResourceCollectionName()
4343
}
4444

4545
/**
46-
* {@inheritdoc}
46+
* @inheritdoc
4747
*/
4848
protected function _prepareColumns()
4949
{
@@ -87,10 +87,7 @@ protected function _prepareColumns()
8787
]
8888
);
8989

90-
if ($this->getFilterData()->getStoreIds()) {
91-
$this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
92-
}
93-
90+
$this->setStoreIds($this->_getStoreIds());
9491
$currencyCode = $this->getCurrentCurrencyCode();
9592
$rate = $this->getRate($currencyCode);
9693

app/code/Magento/Reports/Block/Adminhtml/Sales/Tax/Grid.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ class Grid extends \Magento\Reports\Block\Adminhtml\Grid\AbstractGrid
2222
protected $_columnGroupBy = 'period';
2323

2424
/**
25-
* Config factory
26-
*
2725
* @var \Magento\Sales\Model\Order\ConfigFactory
2826
*/
2927
protected $_configFactory;
@@ -131,9 +129,7 @@ protected function _prepareColumns()
131129
]
132130
);
133131

134-
if ($this->getFilterData()->getStoreIds()) {
135-
$this->setStoreIds(explode(',', $this->getFilterData()->getStoreIds()));
136-
}
132+
$this->setStoreIds($this->_getStoreIds());
137133
$currencyCode = $this->getCurrentCurrencyCode();
138134

139135
$this->addColumn(
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="CouponReportPage" url="reports/report_sales/coupons/" area="admin" module="Reports">
10+
<section name="OrderReportFilterSection"/>
11+
<section name="OrderReportMainSection"/>
12+
<section name="GeneratedReportSection" />
13+
</page>
14+
</pages>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="InvoiceReportPage" url="reports/report_sales/invoiced/" area="admin" module="Reports">
10+
<section name="OrderReportFilterSection"/>
11+
<section name="OrderReportMainSection"/>
12+
<section name="GeneratedReportSection" />
13+
</page>
14+
</pages>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="RefundReportPage" url="reports/report_sales/refunded/" area="admin" module="Reports">
10+
<section name="OrderReportFilterSection"/>
11+
<section name="OrderReportMainSection"/>
12+
<section name="GeneratedReportSection" />
13+
</page>
14+
</pages>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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+
<pages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
9+
<page name="ShipmentReportPage" url="reports/report_sales/shipping/" area="admin" module="Reports">
10+
<section name="OrderReportFilterSection"/>
11+
<section name="OrderReportMainSection"/>
12+
<section name="GeneratedReportSection" />
13+
</page>
14+
</pages>

0 commit comments

Comments
 (0)