Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit 57e8b7f

Browse files
committed
Merge remote-tracking branch 'origin/2.3-develop' into MAGETWO-96760
2 parents d630168 + 93df863 commit 57e8b7f

File tree

8 files changed

+24
-15
lines changed

8 files changed

+24
-15
lines changed

app/code/Magento/Braintree/Test/Mftf/Test/CretateAdminOrderWithOnlinePaymentIncludingTaxAndDiscount.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<test name="CreateAdminOrderPayedWithOnlinePaymentIncludingTaxAndDiscount">
1212
<annotations>
1313
<features value="Braintree"/>
14-
<stories value="Get access to a New Credit Memo Page from Invocie for Order payed with online payment via Admin"/>
14+
<stories value="Get access to a New Credit Memo Page from Invoice for Order payed with online payment via Admin"/>
1515
<title value="Admin should be able to open a New Credit Memo Page from Invoice Page for Order with tax and discount and payed using online payment method"/>
1616
<description value="Admin should be able to open a New Credit Memo Page from Invoice Page for Order with tax and discount and payed using online payment method"/>
1717
<severity value="CRITICAL"/>
@@ -123,4 +123,4 @@
123123
<waitForPageLoad stepKey="waitForLoadNewCreditMemoPage"/>
124124
<see selector="{{AdminCreditMemoOrderInformationSection.orderStatus}}" userInput="Processing" stepKey="seeNewCreditMemo"/>
125125
</test>
126-
</tests>
126+
</tests>

app/code/Magento/Catalog/Model/Product.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ public function getIdBySku($sku)
727727
public function getCategoryId()
728728
{
729729
$category = $this->_registry->registry('current_category');
730-
if ($category) {
730+
if ($category && in_array($category->getId(), $this->getCategoryIds())) {
731731
return $category->getId();
732732
}
733733
return false;

app/code/Magento/Catalog/Test/Unit/Model/ProductTest.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ public function testSetCategoryCollection()
549549

550550
public function testGetCategory()
551551
{
552+
$this->model->setData('category_ids', [10]);
552553
$this->category->expects($this->any())->method('getId')->will($this->returnValue(10));
553554
$this->registry->expects($this->any())->method('registry')->will($this->returnValue($this->category));
554555
$this->categoryRepository->expects($this->any())->method('get')->will($this->returnValue($this->category));
@@ -557,14 +558,23 @@ public function testGetCategory()
557558

558559
public function testGetCategoryId()
559560
{
560-
$this->category->expects($this->once())->method('getId')->will($this->returnValue(10));
561+
$this->model->setData('category_ids', [10]);
562+
$this->category->expects($this->any())->method('getId')->will($this->returnValue(10));
561563

562564
$this->registry->expects($this->at(0))->method('registry');
563565
$this->registry->expects($this->at(1))->method('registry')->will($this->returnValue($this->category));
564566
$this->assertFalse($this->model->getCategoryId());
565567
$this->assertEquals(10, $this->model->getCategoryId());
566568
}
567569

570+
public function testGetCategoryIdWhenProductNotInCurrentCategory()
571+
{
572+
$this->model->setData('category_ids', [12]);
573+
$this->category->expects($this->once())->method('getId')->will($this->returnValue(10));
574+
$this->registry->expects($this->any())->method('registry')->will($this->returnValue($this->category));
575+
$this->assertFalse($this->model->getCategoryId());
576+
}
577+
568578
public function testGetIdBySku()
569579
{
570580
$this->resource->expects($this->once())->method('getIdBySku')->will($this->returnValue(5));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
// set the root node
8181
this.root = new Ext.tree.TreeNode({
8282
text: 'ROOT',
83-
allowDrug:false,
83+
allowDrag:false,
8484
allowDrop:true,
8585
id:'1'
8686
});

app/code/Magento/Ui/view/base/web/js/lib/knockout/bindings/bootstrap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ define(function (require) {
2626
mageInit: require('./mage-init'),
2727
keyboard: require('./keyboard'),
2828
optgroup: require('./optgroup'),
29-
aferRender: require('./after-render'),
29+
afterRender: require('./after-render'),
3030
autoselect: require('./autoselect'),
3131
datepicker: require('./datepicker'),
3232
outerClick: require('./outer_click'),

app/design/adminhtml/Magento/backend/Magento_Backend/web/css/source/module/main/actions-bar/_store-switcher.less

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
// Main elements -> Actions bar -> Store Switcher
88
// _____________________________________________
99

10-
// ToDo UI: Consist old styles, should be changed with new design
10+
// ToDo UI: Consist old styles, should be changed with new design
1111

1212
.store-switcher {
13-
color: @text__color; // ToDo UI: Delete with admin scope
13+
color: @text__color;
1414
float: left;
1515
font-size: round(@font-size__base - .1rem, 1);
16-
margin-top: .7rem;
16+
margin-top: .59rem;
1717

1818
.admin__action-dropdown {
1919
background-color: @page-main-actions__background-color;
@@ -47,8 +47,8 @@
4747
width: 7px;
4848
}
4949
&::-webkit-scrollbar-thumb {
50-
border-radius: 4px;
5150
background-color: rgba(0, 0, 0, .5);
51+
border-radius: 4px;
5252
}
5353

5454
li {
@@ -239,7 +239,6 @@
239239

240240
.store-switcher-label {
241241
display: inline-block;
242-
margin-top: @indent__s;
243242
}
244243
}
245244

app/design/frontend/Magento/luma/Magento_Checkout/web/css/source/module/_minicart.less

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,9 +110,9 @@
110110
@_toggle-selector: ~'.action.showcart',
111111
@_options-selector: ~'.block-minicart',
112112
@_dropdown-list-width: 320px,
113-
@_dropdown-list-position-right: 0,
113+
@_dropdown-list-position-right: -10px,
114114
@_dropdown-list-pointer-position: right,
115-
@_dropdown-list-pointer-position-left-right: 26px,
115+
@_dropdown-list-pointer-position-left-right: 12px,
116116
@_dropdown-list-z-index: 101,
117117
@_dropdown-toggle-icon-content: @icon-cart,
118118
@_dropdown-toggle-active-icon-content: @icon-cart,
@@ -415,7 +415,6 @@
415415
margin-left: 13px;
416416

417417
.block-minicart {
418-
right: -15px;
419418
width: 390px;
420419
}
421420
}

dev/tests/integration/testsuite/Magento/Catalog/Model/ProductExternalTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function testGetCategoryId()
6969
{
7070
$this->assertFalse($this->_model->getCategoryId());
7171
$category = new \Magento\Framework\DataObject(['id' => 5]);
72-
72+
$this->_model->setCategoryIds([5]);
7373
$this->objectManager->get(\Magento\Framework\Registry::class)->register('current_category', $category);
7474
try {
7575
$this->assertEquals(5, $this->_model->getCategoryId());
@@ -83,6 +83,7 @@ public function testGetCategoryId()
8383
public function testGetCategory()
8484
{
8585
$this->assertEmpty($this->_model->getCategory());
86+
$this->_model->setCategoryIds([3]);
8687

8788
$this->objectManager->get(\Magento\Framework\Registry::class)
8889
->register('current_category', new \Magento\Framework\DataObject(['id' => 3]));

0 commit comments

Comments
 (0)