Skip to content

Commit 85def59

Browse files
authored
Merge pull request #1134 from magento-engcom/develop-prs
[EngCom] Public Pull Requests
2 parents 076d199 + 372ea50 commit 85def59

File tree

16 files changed

+297
-22
lines changed

16 files changed

+297
-22
lines changed

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ addons:
77
- mysql-client-core-5.6
88
- mysql-client-5.6
99
- postfix
10+
firefox: "46.0"
11+
hosts:
12+
- magento2.travis
1013
language: php
1114
php:
1215
- 7.0
@@ -16,19 +19,26 @@ env:
1619
- COMPOSER_BIN_DIR=~/bin
1720
- INTEGRATION_SETS=3
1821
- NODE_JS_VERSION=6
22+
- MAGENTO_HOST_NAME="magento2.travis"
1923
matrix:
2024
- TEST_SUITE=unit
2125
- TEST_SUITE=integration INTEGRATION_INDEX=1
2226
- TEST_SUITE=integration INTEGRATION_INDEX=2
2327
- TEST_SUITE=integration INTEGRATION_INDEX=3
2428
- TEST_SUITE=static
2529
- TEST_SUITE=js
30+
- TEST_SUITE=functional ACCEPTANCE_INDEX=1
31+
- TEST_SUITE=functional ACCEPTANCE_INDEX=2
2632
matrix:
2733
exclude:
2834
- php: 7.0
2935
env: TEST_SUITE=static
3036
- php: 7.0
3137
env: TEST_SUITE=js
38+
- php: 7.0
39+
env: TEST_SUITE=functional ACCEPTANCE_INDEX=1
40+
- php: 7.0
41+
env: TEST_SUITE=functional ACCEPTANCE_INDEX=2
3242
cache:
3343
apt: true
3444
directories:

app/code/Magento/Cookie/Helper/Cookie.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,22 @@ public function __construct(
7070
public function isUserNotAllowSaveCookie()
7171
{
7272
$acceptedSaveCookiesWebsites = $this->_getAcceptedSaveCookiesWebsites();
73+
return $this->isCookieRestrictionModeEnabled() &&
74+
empty($acceptedSaveCookiesWebsites[$this->_website->getId()]);
75+
}
76+
77+
/**
78+
* Check if cookie restriction mode is enabled for this store
79+
*
80+
* @return bool
81+
*/
82+
public function isCookieRestrictionModeEnabled()
83+
{
7384
return $this->scopeConfig->getValue(
7485
self::XML_PATH_COOKIE_RESTRICTION,
7586
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
7687
$this->_currentStore
77-
) && empty($acceptedSaveCookiesWebsites[$this->_website->getId()]);
88+
);
7889
}
7990

8091
/**

app/code/Magento/Cookie/view/frontend/templates/html/notices.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/** @var \Magento\Cookie\Block\Html\Notices $block */
1010
?>
11-
<?php if ($this->helper(\Magento\Cookie\Helper\Cookie::class)->isUserNotAllowSaveCookie()): ?>
11+
<?php if ($this->helper(\Magento\Cookie\Helper\Cookie::class)->isCookieRestrictionModeEnabled()): ?>
1212
<div role="alertdialog"
1313
tabindex="-1"
1414
class="message global cookie"

app/code/Magento/Cookie/view/frontend/web/js/notices.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ define([
2424
$(this.options.cookieAllowButtonSelector).on('click', $.proxy(function () {
2525
var cookieExpires = new Date(new Date().getTime() + this.options.cookieLifetime * 1000);
2626

27-
$.mage.cookies.set(this.options.cookieName, this.options.cookieValue, {
27+
$.mage.cookies.set(this.options.cookieName, JSON.stringify(this.options.cookieValue), {
2828
expires: cookieExpires
2929
});
3030

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
// @codingStandardsIgnoreFile
8+
/**
9+
* @see \Magento\Payment\Block\Info
10+
* @var \Magento\Payment\Block\Info $block
11+
*/
12+
?>
13+
<?php echo $block->escapeHtml($block->getMethod()->getTitle()); ?>{{pdf_row_separator}}
14+
15+
<?php if ($specificInfo = $block->getSpecificInformation()):?>
16+
<?php foreach ($specificInfo as $label => $value):?>
17+
<?php echo $block->escapeHtml($label) ?>:
18+
<?php echo $block->escapeHtml(implode(' ', $block->getValueAsArray($value)));?>
19+
{{pdf_row_separator}}
20+
<?php endforeach; ?>
21+
<?php endif;?>
22+
23+
<?php echo $block->escapeHtml(implode('{{pdf_row_separator}}', $block->getChildPdfAsArray())); ?>

app/code/Magento/Sales/Model/Order/Config.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,10 @@ public function getInvisibleOnFrontStatuses()
250250
*/
251251
protected function _getStatuses($visibility)
252252
{
253-
if ($this->statuses == null) {
253+
if ($this->statuses === null) {
254+
255+
$this->statuses = [ true => [], false => [] ];
256+
254257
foreach ($this->_getCollection() as $item) {
255258
$visible = (bool) $item->getData('visible_on_front');
256259
$this->statuses[$visible][] = $item->getData('status');

app/code/Magento/Sales/view/adminhtml/web/order/create/scripts.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,8 @@ define([
12481248
params.store_id = this.storeId;
12491249
}
12501250

1251-
var currentCustomerGroupId = $(parameters.groupIdHtmlId).value;
1251+
var currentCustomerGroupId = $(parameters.groupIdHtmlId)
1252+
? $(parameters.groupIdHtmlId).value : '';
12521253

12531254
new Ajax.Request(parameters.validateUrl, {
12541255
parameters: params,

dev/tests/functional/phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@
2929
</listeners>
3030

3131
<php>
32-
<env name="app_frontend_url" value="http://localhost/" />
33-
<env name="app_backend_url" value="http://localhost/backend/" />
32+
<env name="app_frontend_url" value="http://127.0.0.1/" />
33+
<env name="app_backend_url" value="http://127.0.0.1/backend/" />
3434
<env name="testsuite_rule" value="basic" />
3535
<env name="testsuite_rule_path" value="Magento/Mtf/TestSuite/InjectableTests" />
3636
<env name="log_directory" value="var/log" />
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd">
10+
<rule scope="testsuite">
11+
<allow>
12+
<module value="Magento_AdminNotification" strict="1" />
13+
<module value="Magento_AdvancedPricingImportExport" strict="1" />
14+
<module value="Magento_Analytics" strict="1" />
15+
<module value="Magento_Authorizenet" strict="1" />
16+
<module value="Magento_Backend" strict="1" />
17+
<module value="Magento_Backup" strict="1" />
18+
<module value="Magento_Braintree" strict="1" />
19+
<module value="Magento_Bundle" strict="1" />
20+
<module value="Magento_BundleImportExport" strict="1" />
21+
<module value="Magento_Captcha" strict="1" />
22+
<module value="Magento_Catalog" strict="1" />
23+
<module value="Magento_CatalogImportExport" strict="1" />
24+
<module value="Magento_CatalogInventory" strict="1" />
25+
<module value="Magento_CatalogInventoryConfigurableProduct" strict="1" />
26+
<module value="Magento_CatalogRule" strict="1" />
27+
<module value="Magento_CatalogRuleConfigurable" strict="1" />
28+
<module value="Magento_CatalogSearch" strict="1" />
29+
<module value="Magento_CatalogUrlRewrite" strict="1" />
30+
<module value="Magento_CheckoutAgreements" strict="1" />
31+
<module value="Magento_Cms" strict="1" />
32+
<module value="Magento_Config" strict="1" />
33+
<module value="Magento_ConfigurableImportExport" strict="1" />
34+
<module value="Magento_Contact" strict="1" />
35+
<module value="Magento_CurrencySymbol" strict="1" />
36+
<module value="Magento_Customer" strict="1" />
37+
<module value="Magento_CustomerImportExport" strict="1" />
38+
<module value="Magento_Dhl" strict="1" />
39+
<module value="Magento_Directory" strict="1" />
40+
<module value="Magento_Downloadable" strict="1" />
41+
<module value="Magento_Email" strict="1" />
42+
<module value="Magento_Fedex" strict="1" />
43+
<module value="Magento_GiftMessage" strict="1" />
44+
<module value="Magento_GroupedImportExport" strict="1" />
45+
<module value="Magento_GroupedProduct" strict="1" />
46+
<module value="Magento_ImportExport" strict="1" />
47+
<module value="Magento_Indexer" strict="1" />
48+
<module value="Magento_Install" strict="1" />
49+
<module value="Magento_Integration" strict="1" />
50+
</allow>
51+
</rule>
52+
<rule scope="testcase">
53+
<allow>
54+
<tag group="test_type" value="acceptance_test" />
55+
</allow>
56+
<deny>
57+
<tag group="stable" value="no" />
58+
</deny>
59+
</rule>
60+
<rule scope="variation">
61+
<allow>
62+
<tag group="test_type" value="acceptance_test" />
63+
</allow>
64+
<deny>
65+
<tag group="stable" value="no" />
66+
</deny>
67+
</rule>
68+
</config>
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
9+
xsi:noNamespaceSchemaLocation="../../../../../vendor/magento/mtf/Magento/Mtf/TestRunner/etc/testRunner.xsd">
10+
<rule scope="testsuite">
11+
<allow>
12+
<module value="Magento_ConfigurableProduct" strict="1" />
13+
<module value="Magento_Checkout" strict="1" />
14+
<module value="Magento_LayeredNavigation" strict="1" />
15+
<module value="Magento_Msrp" strict="1" />
16+
<module value="Magento_Multishipping" strict="1" />
17+
<module value="Magento_Newsletter" strict="1" />
18+
<module value="Magento_OfflinePayments" strict="1" />
19+
<module value="Magento_OfflineShipping" strict="1" />
20+
<module value="Magento_PageCache" strict="1" />
21+
<module value="Magento_Payment" strict="1" />
22+
<module value="Magento_Paypal" strict="1" />
23+
<module value="Magento_Persistent" strict="1" />
24+
<module value="Magento_ProductVideo" strict="1" />
25+
<module value="Magento_Reports" strict="1" />
26+
<module value="Magento_Review" strict="1" />
27+
<module value="Magento_Sales" strict="1" />
28+
<module value="Magento_SalesRule" strict="1" />
29+
<module value="Magento_Search" strict="1" />
30+
<module value="Magento_Security" strict="1" />
31+
<module value="Magento_Setup" strict="1" />
32+
<module value="Magento_Shipping" strict="1" />
33+
<module value="Magento_Sitemap" strict="1" />
34+
<module value="Magento_Store" strict="1" />
35+
<module value="Magento_Swagger" strict="1" />
36+
<module value="Magento_Swatches" strict="1" />
37+
<module value="Magento_Tax" strict="1" />
38+
<module value="Magento_Theme" strict="1" />
39+
<module value="Magento_Ui" strict="1" />
40+
<module value="Magento_Ups" strict="1" />
41+
<module value="Magento_UrlRewrite" strict="1" />
42+
<module value="Magento_User" strict="1" />
43+
<module value="Magento_Usps" strict="1" />
44+
<module value="Magento_Variable" strict="1" />
45+
<module value="Magento_Vault" strict="1" />
46+
<module value="Magento_Weee" strict="1" />
47+
<module value="Magento_Widget" strict="1" />
48+
<module value="Magento_Wishlist" strict="1" />
49+
</allow>
50+
</rule>
51+
<rule scope="testcase">
52+
<allow>
53+
<tag group="test_type" value="acceptance_test" />
54+
</allow>
55+
<deny>
56+
<tag group="stable" value="no" />
57+
</deny>
58+
</rule>
59+
<rule scope="variation">
60+
<allow>
61+
<tag group="test_type" value="acceptance_test" />
62+
</allow>
63+
<deny>
64+
<tag group="stable" value="no" />
65+
</deny>
66+
</rule>
67+
</config>

0 commit comments

Comments
 (0)