Skip to content

Commit 4988ed6

Browse files
committed
Merge pull request #149 from magento-vanilla/PR
TestCase\CreateCatalogRuleTest fails as on mainline/develop branch.
2 parents f85e691 + 3ad2afd commit 4988ed6

File tree

17 files changed

+214
-96
lines changed

17 files changed

+214
-96
lines changed

app/code/Magento/Backend/view/adminhtml/layout/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" layout="admin-1column" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
99
<head>
1010
<title>Magento Admin</title>
11-
<meta name="viewport" content="width=device-width"/>
11+
<meta name="viewport" content="width=1024, initial-scale=1"/>
1212
<link src="requirejs/require.js"/>
1313
<css src="extjs/resources/css/ext-all.css"/>
1414
<css src="extjs/resources/css/ytheme-magento.css"/>

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/options.phtml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
/** @var $block \Magento\Eav\Block\Adminhtml\Attribute\Edit\Options\Options */
1010
?>
11-
<fieldset class="fieldset ignore-validate">
11+
<fieldset class="fieldset">
1212
<legend class="legend"><span><?php /* @escapeNotVerified */ echo __('Manage Options (values of your attribute)') ?></span></legend>
1313
<div id="manage-options-panel">
1414
<table class="admin__control-table">
@@ -27,8 +27,14 @@
2727
<th class="col-delete">&nbsp;</th>
2828
</tr>
2929
</thead>
30-
<tbody data-role="options-container"></tbody>
30+
<tbody data-role="options-container" class="ignore-validate"></tbody>
3131
<tfoot>
32+
<tr>
33+
<th colspan="<?php /* @escapeNotVerified */ echo $storetotal; ?>" class="validation">
34+
<input type="hidden" class="required-dropdown-attribute-entry" name="dropdown_attribute_validation"/>
35+
</th>
36+
</tr>
37+
<tr>
3238
<th colspan="<?php /* @escapeNotVerified */ echo $storetotal; ?>" class="col-actions-add">
3339
<?php if (!$block->getReadOnly() && !$block->canManageOptionDefaultOnly()):?>
3440
<button id="add_new_option_button" title="<?php /* @escapeNotVerified */ echo __('Add Option'); ?>"
@@ -37,6 +43,7 @@
3743
</button>
3844
<?php endif; ?>
3945
</th>
46+
</tr>
4047
</tfoot>
4148
</table>
4249
<input type="hidden" id="option-count-check" value="" />

app/code/Magento/Catalog/view/adminhtml/web/catalog/product-attributes.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ define([
2424
type: 'slide',
2525
buttons: [],
2626
opened: function () {
27+
$(this).parent().addClass('modal-content-new-attribute');
2728
self.iframe = $('<iframe id="create_new_attribute_container">').attr({
2829
src: self._prepareUrl(),
2930
frameborder: 0

app/code/Magento/Paypal/Model/Hostedpro/Request.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ protected function _getShippingAddress(\Magento\Framework\DataObject $address)
267267
'city' => $address->getCity(),
268268
'state' => $region ? $region : $address->getCity(),
269269
'zip' => $address->getPostcode(),
270-
'country' => $address->getCountry(),
270+
'country' => $address->getCountryId(),
271271
];
272272

273273
// convert streets to tow lines format
@@ -295,7 +295,7 @@ protected function _getBillingAddress(\Magento\Framework\DataObject $address)
295295
'billing_city' => $address->getCity(),
296296
'billing_state' => $region ? $region : $address->getCity(),
297297
'billing_zip' => $address->getPostcode(),
298-
'billing_country' => $address->getCountry(),
298+
'billing_country' => $address->getCountryId(),
299299
];
300300

301301
// convert streets to tow lines format

app/code/Magento/Paypal/Test/Unit/Model/Hostedpro/RequestTest.php

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
namespace Magento\Paypal\Test\Unit\Model\Hostedpro;
77

8+
use Magento\Framework\DataObject;
89
use Magento\Sales\Model\Order;
910
use Magento\Sales\Model\Order\Payment;
1011

@@ -47,75 +48,82 @@ protected function setUp()
4748
}
4849

4950
/**
51+
* @param $billing
52+
* @param $shipping
53+
* @param $billingState
54+
* @param $state
55+
* @param $countryId
5056
* @dataProvider addressesDataProvider
5157
*/
52-
public function testSetOrderAddresses($billing, $shipping, $billingState, $state)
58+
public function testSetOrderAddresses($billing, $shipping, $billingState, $state, $countryId)
5359
{
54-
$payment = $this->getMock('Magento\Sales\Model\Order\Payment', ['__wakeup'], [], '', false);
55-
$order = $this->getMock(
56-
'Magento\Sales\Model\Order',
57-
['getPayment', '__wakeup', 'getBillingAddress', 'getShippingAddress'],
58-
[],
59-
'',
60-
false
61-
);
62-
$order->expects($this->any())
60+
$payment = $this->getMockBuilder(Payment::class)
61+
->disableOriginalConstructor()
62+
->setMethods(['__wakeup'])
63+
->getMock();
64+
$order = $this->getMockBuilder(Order::class)
65+
->disableOriginalConstructor()
66+
->setMethods(['getPayment', '__wakeup', 'getBillingAddress', 'getShippingAddress'])
67+
->getMock();
68+
$order->expects(static::any())
6369
->method('getPayment')
6470
->will($this->returnValue($payment));
65-
$order->expects($this->any())
71+
$order->expects(static::any())
6672
->method('getBillingAddress')
6773
->will($this->returnValue($billing));
68-
$order->expects($this->any())
74+
$order->expects(static::any())
6975
->method('getShippingAddress')
7076
->will($this->returnValue($shipping));
7177
$this->_model->setOrder($order);
72-
$this->assertEquals($billingState, $this->_model->getData('billing_state'));
73-
$this->assertEquals($state, $this->_model->getData('state'));
78+
static::assertEquals($billingState, $this->_model->getData('billing_state'));
79+
static::assertEquals($state, $this->_model->getData('state'));
80+
static::assertEquals($countryId, $this->_model->getData('billing_country'));
81+
static::assertEquals($countryId, $this->_model->getData('country'));
7482
}
7583

7684
/**
7785
* @return array
7886
*/
7987
public function addressesDataProvider()
8088
{
81-
$billing = new \Magento\Framework\DataObject([
89+
$billing = new DataObject([
8290
'firstname' => 'Firstname',
8391
'lastname' => 'Lastname',
8492
'city' => 'City',
8593
'region_code' => 'CA',
8694
'postcode' => '12346',
87-
'country' => 'United States',
88-
'Street' => '1 Ln Ave',
95+
'country_id' => 'US',
96+
'street' => '1 Ln Ave',
8997
]);
90-
$shipping = new \Magento\Framework\DataObject([
98+
$shipping = new DataObject([
9199
'firstname' => 'ShipFirstname',
92100
'lastname' => 'ShipLastname',
93101
'city' => 'ShipCity',
94102
'region' => 'olala',
95103
'postcode' => '12346',
96-
'country' => 'United States',
97-
'Street' => '1 Ln Ave',
104+
'country_id' => 'US',
105+
'street' => '1 Ln Ave',
98106
]);
99-
$billing2 = new \Magento\Framework\DataObject([
107+
$billing2 = new DataObject([
100108
'firstname' => 'Firstname',
101109
'lastname' => 'Lastname',
102-
'city' => 'City',
103-
'region_code' => 'muuuu',
110+
'city' => 'Culver City',
111+
'region_code' => 'CA',
104112
'postcode' => '12346',
105-
'country' => 'United States',
106-
'Street' => '1 Ln Ave',
113+
'country_id' => 'US',
114+
'street' => '1 Ln Ave',
107115
]);
108-
$shipping2 = new \Magento\Framework\DataObject([
116+
$shipping2 = new DataObject([
109117
'firstname' => 'ShipFirstname',
110118
'lastname' => 'ShipLastname',
111119
'city' => 'ShipCity',
112120
'postcode' => '12346',
113-
'country' => 'United States',
114-
'Street' => '1 Ln Ave',
121+
'country_id' => 'US',
122+
'street' => '1 Ln Ave',
115123
]);
116124
return [
117-
[$billing, $shipping, 'CA', 'olala'],
118-
[$billing2, $shipping2, 'muuuu', 'ShipCity']
125+
[$billing, $shipping, 'CA', 'olala', 'US'],
126+
[$billing2, $shipping2, 'CA', 'ShipCity', 'US']
119127
];
120128
}
121129

app/code/Magento/Paypal/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<paypal>
1111
<bncode>Magento_Cart_Community</bncode>
1212
<style>
13-
<logo>nowAccepting_150x60</logo>
13+
<logo></logo>
1414
</style>
1515
<wpp>
1616
<api_password backend_model="Magento\Config\Model\Config\Backend\Encrypted" />

app/code/Magento/ProductVideo/view/frontend/web/js/fotorama-add-video-events.js

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ define([
142142
}, this));
143143
$(this.element).on('fotorama:fullscreenexit', $.proxy(function () {
144144
this.inFullscreen = false;
145+
$(this.element).find('.' + this.PV).parent().find('img:not(".fotorama__img--full")').show();
145146
}, this));
146147
},
147148

@@ -363,7 +364,9 @@ define([
363364
thumbsParent,
364365
thumbs,
365366
t,
366-
tmpVideoData;
367+
tmpVideoData,
368+
currentItem,
369+
iconClass = 'video-thumb-icon';
367370

368371
if (!fotorama.activeFrame.$navThumbFrame) {
369372
$(this.element).on('fotorama:showend', $.proxy(function (evt, fotoramaData) {
@@ -375,14 +378,19 @@ define([
375378
return null;
376379
}
377380

378-
thumbsParent = fotorama.activeFrame.$navThumbFrame.parent(),
379-
thumbs = thumbsParent.find('.fotorama__nav__frame');
381+
thumbsParent = fotorama.activeFrame.$navThumbFrame.parent();
382+
thumbs = thumbsParent.find('.fotorama__nav__frame:visible');
380383

381384
for (t = 0; t < thumbs.length; t++) {
382385
tmpVideoData = this.options.VideoData[t];
386+
currentItem = thumbs.eq(t);
387+
388+
if (fotorama.options.nav === 'dots' && currentItem.hasClass(iconClass)) {
389+
currentItem.removeClass(iconClass);
390+
}
383391

384-
if (tmpVideoData.mediaType === this.VID) {
385-
thumbsParent.find('.fotorama__nav__frame:eq(' + t + ')').addClass('video-thumb-icon');
392+
if (tmpVideoData.mediaType === this.VID && fotorama.options.nav === 'thumbs') {
393+
currentItem.addClass(iconClass);
386394
}
387395
}
388396
$(this.element).on('fotorama:showend', $.proxy(function (evt, fotoramaData) {
@@ -513,6 +521,7 @@ define([
513521

514522
$(this).removeClass('video-unplayed');
515523
$(this).find('.' + PV).productVideoLoader();
524+
$(this).find('img').hide();
516525

517526
if (!self.isFullscreen) {
518527
self._showCloseVideo();
@@ -592,12 +601,17 @@ define([
592601
cloneVideoDiv,
593602
iframeElement = $(this).find('iframe'),
594603
currentIndex,
595-
itemIndex;
604+
itemIndex,
605+
videoPreview = $item.find('img').not('.fotorama__img--full');
596606

597607
if (iframeElement.length === 0) {
598608
return;
599609
}
600610

611+
if (!videoPreview.is(':visible') && !self.inFullscreen) {
612+
videoPreview.show();
613+
}
614+
601615
currentIndex = current.activeFrame.$stageFrame.index();
602616
itemIndex = $item.index();
603617

@@ -619,6 +633,7 @@ define([
619633
self._hideCloseVideo();
620634

621635
});
636+
622637
$('.' + this.FTAR).removeClass('hidden-video');
623638
}
624639
});

app/code/Magento/Swatches/view/adminhtml/templates/catalog/product/attribute/text.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<tfoot>
3838
<tr>
3939
<th colspan="<?php /* @escapeNotVerified */ echo $storetotal; ?>">
40-
<input type="hidden" class="required-swatch-entry"/>
40+
<input type="hidden" class="required-text-swatch-entry" name="text_swatch_validation"/>
4141
</th>
4242
</tr>
4343
<tr>

app/code/Magento/Swatches/view/adminhtml/templates/catalog/product/attribute/visual.phtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<tfoot>
3434
<tr>
3535
<th colspan="<?php /* @escapeNotVerified */ echo $storetotal; ?>">
36-
<input type="hidden" class="required-swatch-entry"/>
36+
<input type="hidden" class="required-visual-swatch-entry" name="visual_swatch_validation"/>
3737
</th>
3838
</tr>
3939
<tr>

app/design/adminhtml/Magento/backend/Magento_Catalog/web/css/source/_module.less

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ div.removed,
6969
// ---------------------------------------------
7070

7171
.catalog-product-attribute-edit {
72+
min-width: 0;
73+
7274
&.attribute-popup {
7375
.page-wrapper {
7476
width: 100%;

app/design/adminhtml/Magento/backend/web/css/source/_structure.less

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,6 @@ body {
4141
}
4242
}
4343

44-
// Scroll bar appearing compensation
45-
@media (min-width: @window__min-width) {
46-
html {
47-
width: 100vw;
48-
}
49-
body {
50-
overflow-x: hidden;
51-
}
52-
}
53-
5444
.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
5545
.page-layout-admin-2columns-left {
5646
.page-columns {

app/design/adminhtml/Magento/backend/web/css/source/components/_modals_extend.less

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,11 @@
140140
}
141141

142142
.modal-slide {
143+
.modal-content-new-attribute {
144+
overflow: auto;
145+
-webkit-overflow-scrolling: touch;
146+
}
147+
143148
.modal-title {
144149
font-size: @modal-slide-title__font-size;
145150
margin-right: @modal-slide-title__font-size + @modal-slide__padding + 1rem;

app/design/adminhtml/Magento/backend/web/css/source/components/_popups.less

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,28 @@
429429
}
430430
}
431431

432+
.ie9 {
433+
.catalog-product-attribute-edit {
434+
&.attribute-popup {
435+
min-width: 0;
436+
437+
.menu-wrapper {
438+
display: none;
439+
}
440+
441+
.page-actions {
442+
button {
443+
float: none;
444+
}
445+
446+
.primary {
447+
float: right;
448+
}
449+
}
450+
}
451+
}
452+
}
453+
432454
//
433455
// Prototype popup window
434456
// _____________________________________________

app/design/adminhtml/Magento/backend/web/css/source/forms/fields/_control-table.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@
3232
tfoot {
3333
th {
3434
padding-bottom: @control-table-cell__padding-vertical;
35+
&.validation {
36+
padding-bottom: 0;
37+
padding-top: 0;
38+
}
3539
}
3640
}
3741
tr {

0 commit comments

Comments
 (0)