Skip to content

Commit eb85ca6

Browse files
committed
Merge remote-tracking branch 'github-magento2ce/2.3-develop' into MAGETWO-96413
2 parents 74cff1d + ba7fc81 commit eb85ca6

File tree

31 files changed

+896
-228
lines changed

31 files changed

+896
-228
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/ConfigurableProduct/Test/Unit/Model/Product/Type/ConfigurableTest.php

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,13 @@
1111
use Magento\Catalog\Model\Product\Configuration\Item\Option\OptionInterface;
1212
use Magento\ConfigurableProduct\Model\Product\Type\Collection\SalableProcessor;
1313
use Magento\ConfigurableProduct\Model\Product\Type\Configurable;
14+
use Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute;
1415
use Magento\ConfigurableProduct\Model\Product\Type\Configurable\AttributeFactory;
1516
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Attribute\Collection;
1617
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Attribute\CollectionFactory;
1718
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Product\Collection as ProductCollection;
19+
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Product\CollectionFactory
20+
as ProductCollectionFactory;
1821
use Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\ConfigurableFactory;
1922
use Magento\Customer\Model\Session;
2023
use Magento\Eav\Model\Entity\Attribute\Frontend\AbstractFrontend;
@@ -27,7 +30,6 @@
2730
* @SuppressWarnings(PHPMD.LongVariable)
2831
* @SuppressWarnings(PHPMD.CouplingBetweenObjects)
2932
* @SuppressWarnings(PHPMD.TooManyFields)
30-
* @codingStandardsIgnoreFile
3133
*/
3234
class ConfigurableTest extends \PHPUnit\Framework\TestCase
3335
{
@@ -154,8 +156,7 @@ protected function setUp()
154156
->disableOriginalConstructor()
155157
->setMethods(['create'])
156158
->getMock();
157-
$this->productCollectionFactory = $this->getMockBuilder(
158-
\Magento\ConfigurableProduct\Model\ResourceModel\Product\Type\Configurable\Product\CollectionFactory::class)
159+
$this->productCollectionFactory = $this->getMockBuilder(ProductCollectionFactory::class)
159160
->disableOriginalConstructor()
160161
->setMethods(['create'])
161162
->getMock();
@@ -281,8 +282,7 @@ public function testSave()
281282
$product->expects($this->atLeastOnce())
282283
->method('getData')
283284
->willReturnMap($dataMap);
284-
$attribute = $this->getMockBuilder(
285-
\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute::class)
285+
$attribute = $this->getMockBuilder(Attribute::class)
286286
->disableOriginalConstructor()
287287
->setMethods(['addData', 'setStoreId', 'setProductId', 'save', '__wakeup', '__sleep'])
288288
->getMock();
@@ -464,8 +464,7 @@ public function testGetConfigurableAttributesAsArray($productStore)
464464
$eavAttribute->expects($this->once())->method('getSource')->willReturn($attributeSource);
465465
$eavAttribute->expects($this->atLeastOnce())->method('getStoreLabel')->willReturn('Store Label');
466466

467-
$attribute = $this->getMockBuilder(
468-
\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute::class)
467+
$attribute = $this->getMockBuilder(Attribute::class)
469468
->disableOriginalConstructor()
470469
->setMethods(['getProductAttribute', '__wakeup', '__sleep'])
471470
->getMock();
@@ -524,7 +523,7 @@ public function testGetConfigurableAttributesNewProduct()
524523
$this->assertEquals([], $this->model->getConfigurableAttributes($product));
525524
}
526525

527-
public function testGetConfigurableAttributes()
526+
public function testGetConfigurableAttributes()
528527
{
529528
$configurableAttributes = '_cache_instance_configurable_attributes';
530529

@@ -591,8 +590,7 @@ public function testHasOptionsConfigurableAttribute()
591590
->setMethods(['__wakeup', 'getAttributeCode', 'getOptions', 'hasData', 'getData'])
592591
->disableOriginalConstructor()
593592
->getMock();
594-
$attributeMock = $this->getMockBuilder(
595-
\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute::class)
593+
$attributeMock = $this->getMockBuilder(Attribute::class)
596594
->disableOriginalConstructor()
597595
->getMock();
598596

@@ -698,7 +696,7 @@ function ($value) {
698696
->disableOriginalConstructor()
699697
->getMock();
700698
$usedAttributeMock = $this->getMockBuilder(
701-
\Magento\ConfigurableProduct\Model\Product\Type\Configurable\Attribute::class
699+
Attribute::class
702700
)
703701
->setMethods(['getProductAttribute'])
704702
->disableOriginalConstructor()

app/code/Magento/Payment/Test/Unit/Observer/SalesOrderBeforeSaveObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public function testSalesOrderBeforeSaveSetForced()
160160
* The method should check that the payment is available, as this is not always the case.
161161
*
162162
* @expectedException \Magento\Framework\Exception\LocalizedException
163-
* @exceptedExceptionMessage Please provide payment for the order.
163+
* @expectedExceptionMessage Please provide payment for the order.
164164
*/
165165
public function testDoesNothingWhenNoPaymentIsAvailable()
166166
{

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
}

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,13 @@
8484
"require-dev": {
8585
"friendsofphp/php-cs-fixer": "~2.13.0",
8686
"lusitanian/oauth": "~0.8.10",
87-
"magento/magento2-functional-testing-framework": "2.3.11",
87+
"magento/magento2-functional-testing-framework": "~2.3.12",
8888
"pdepend/pdepend": "2.5.2",
8989
"phpmd/phpmd": "@stable",
9090
"phpunit/phpunit": "~6.5.0",
9191
"sebastian/phpcpd": "~3.0.0",
92-
"squizlabs/php_codesniffer": "3.3.1"
92+
"squizlabs/php_codesniffer": "3.3.1",
93+
"allure-framework/allure-phpunit": "~1.2.0"
9394
},
9495
"suggest": {
9596
"ext-pcntl": "Need for run processes in parallel mode"

0 commit comments

Comments
 (0)