Skip to content

Commit 13ea91a

Browse files
author
Magento CICD
authored
merge magento/2.3-develop into magento-qwerty/MAGETWO-93969
2 parents c72203a + a9ff217 commit 13ea91a

File tree

16 files changed

+86
-50
lines changed

16 files changed

+86
-50
lines changed

app/code/Magento/Bundle/Test/Mftf/ActionGroup/CreateBundleProductActionGroup.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,12 @@
1515
<fillField selector="{{AdminProductFormBundleSection.productSku}}" userInput="{{BundleProduct.sku}}" stepKey="fillProductSku"/>
1616

1717
<!--Trigger SEO drop down-->
18-
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.seoDependent}}" visible="false" stepKey="OpenDropDownIfClosed"/>
19-
<waitForPageLoad stepKey="WaitForDropDownSEO"/>
18+
<scrollTo selector="{{AdminProductFormBundleSection.seoDropdown}}" stepKey="scrollToSeoDropDown"/>
19+
<conditionalClick selector="{{AdminProductFormBundleSection.seoDropdown}}" dependentSelector="{{AdminProductFormBundleSection.urlKey}}" visible="false" stepKey="openDropDownIfClosed"/>
20+
<waitForPageLoad stepKey="waitForDropDownSEO"/>
2021

2122
<!--Fill URL input-->
22-
<fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="FillsinSEOlinkExtension"/>
23+
<fillField userInput="{{BundleProduct.urlKey}}" selector="{{AdminProductFormBundleSection.urlKey}}" stepKey="fillsInSeoLinkExtension"/>
2324
</actionGroup>
2425

2526
<actionGroup name="addBundleOptionWithTwoProducts">

app/code/Magento/ConfigurableProduct/Block/Adminhtml/Product/Edit/Button/Save.php

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,14 @@
88
use Magento\Ui\Component\Control\Container;
99
use Magento\Catalog\Block\Adminhtml\Product\Edit\Button\Generic;
1010
use Magento\ConfigurableProduct\Model\Product\Type\Configurable as ConfigurableType;
11-
use Magento\Catalog\Model\Product\Type;
1211

1312
/**
1413
* Class Save
1514
*/
1615
class Save extends Generic
1716
{
1817
/**
19-
* @var array
20-
*/
21-
private static $availableProductTypes = [
22-
ConfigurableType::TYPE_CODE,
23-
Type::TYPE_SIMPLE,
24-
Type::TYPE_VIRTUAL
25-
];
26-
27-
/**
28-
* {@inheritdoc}
18+
* @inheritdoc
2919
*/
3020
public function getButtonData()
3121
{
@@ -135,7 +125,8 @@ protected function getOptions()
135125
}
136126

137127
/**
138-
* Retrieve target for button
128+
* Retrieve target for button.
129+
*
139130
* @return string
140131
*/
141132
protected function getSaveTarget()
@@ -148,7 +139,8 @@ protected function getSaveTarget()
148139
}
149140

150141
/**
151-
* Retrieve action for button
142+
* Retrieve action for button.
143+
*
152144
* @return string
153145
*/
154146
protected function getSaveAction()
@@ -161,10 +153,12 @@ protected function getSaveAction()
161153
}
162154

163155
/**
156+
* Is configurable product.
157+
*
164158
* @return boolean
165159
*/
166160
protected function isConfigurableProduct()
167161
{
168-
return in_array($this->getProduct()->getTypeId(), self::$availableProductTypes);
162+
return !$this->getProduct()->isComposite() || $this->getProduct()->getTypeId() === ConfigurableType::TYPE_CODE;
169163
}
170164
}

app/code/Magento/ConfigurableProduct/Test/Unit/Block/Adminhtml/Product/Edit/Button/SaveTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ protected function setUp()
3838
->disableOriginalConstructor()
3939
->getMock();
4040
$this->productMock = $this->getMockBuilder(ProductInterface::class)
41-
->setMethods(['isReadonly', 'isDuplicable'])
41+
->setMethods(['isReadonly', 'isDuplicable', 'isComposite'])
4242
->getMockForAbstractClass();
4343

4444
$this->registryMock->expects(static::any())

app/code/Magento/Email/view/frontend/email/header.html

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@
4343

4444
{{if logo_height}}
4545
height="{{var logo_height}}"
46-
{{else}}
47-
height="52"
4846
{{/if}}
4947

5048
src="{{var logo_url}}"
Loading

app/code/Magento/Multishipping/Model/Checkout/Type/Multishipping.php

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,6 @@ class Multishipping extends \Magento\Framework\DataObject
176176
private $dataObjectHelper;
177177

178178
/**
179-
* Constructor
180-
*
181179
* @param \Magento\Checkout\Model\Session $checkoutSession
182180
* @param \Magento\Customer\Model\Session $customerSession
183181
* @param \Magento\Sales\Model\OrderFactory $orderFactory
@@ -202,8 +200,9 @@ class Multishipping extends \Magento\Framework\DataObject
202200
* @param array $data
203201
* @param \Magento\Quote\Api\Data\CartExtensionFactory|null $cartExtensionFactory
204202
* @param AllowedCountries|null $allowedCountryReader
205-
* @param Multishipping\PlaceOrderFactory $placeOrderFactory
206-
* @param LoggerInterface $logger
203+
* @param Multishipping\PlaceOrderFactory|null $placeOrderFactory
204+
* @param LoggerInterface|null $logger
205+
* @param \Magento\Framework\Api\DataObjectHelper|null $dataObjectHelper
207206
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
208207
*/
209208
public function __construct(
@@ -272,6 +271,7 @@ public function __construct(
272271

273272
/**
274273
* Initialize multishipping checkout.
274+
*
275275
* Split virtual/not virtual items between default billing/shipping addresses
276276
*
277277
* @return \Magento\Multishipping\Model\Checkout\Type\Multishipping
@@ -337,6 +337,7 @@ protected function _init()
337337

338338
/**
339339
* Get quote items assigned to different quote addresses populated per item qty.
340+
*
340341
* Based on result array we can display each item separately
341342
*
342343
* @return array
@@ -397,7 +398,7 @@ public function removeAddressItem($addressId, $itemId)
397398
/**
398399
* Assign quote items to addresses and specify items qty
399400
*
400-
* array structure:
401+
* Array structure:
401402
* array(
402403
* $quoteItemId => array(
403404
* 'qty' => $qty,
@@ -693,6 +694,7 @@ protected function _prepareOrder(\Magento\Quote\Model\Quote\Address $address)
693694
$order->setIsVirtual(1);
694695
} else {
695696
$order->setShippingAddress($this->quoteAddressToOrderAddress->convert($address));
697+
$order->setShippingMethod($address->getShippingMethod());
696698
}
697699

698700
$order->setPayment($this->quotePaymentToOrderPayment->convert($quote->getPayment()));
@@ -927,6 +929,8 @@ public function getMinimumAmountDescription()
927929
}
928930

929931
/**
932+
* Get minimum amount error.
933+
*
930934
* @return string
931935
*/
932936
public function getMinimumAmountError()
@@ -1071,7 +1075,7 @@ public function getCustomer()
10711075
/**
10721076
* Check if specified address ID belongs to customer.
10731077
*
1074-
* @param $addressId
1078+
* @param mixed $addressId
10751079
* @return bool
10761080
*/
10771081
protected function isAddressIdApplicable($addressId)
@@ -1084,6 +1088,8 @@ protected function isAddressIdApplicable($addressId)
10841088
}
10851089

10861090
/**
1091+
* Prepare shipping assignment.
1092+
*
10871093
* @param \Magento\Quote\Model\Quote $quote
10881094
* @return \Magento\Quote\Model\Quote
10891095
*/
@@ -1104,6 +1110,8 @@ private function prepareShippingAssignment($quote)
11041110
}
11051111

11061112
/**
1113+
* Get shipping assignment processor.
1114+
*
11071115
* @return \Magento\Quote\Model\Quote\ShippingAssignment\ShippingAssignmentProcessor
11081116
*/
11091117
private function getShippingAssignmentProcessor()
@@ -1186,10 +1194,11 @@ private function searchQuoteAddressId(OrderInterface $order, array $addresses):
11861194
}
11871195

11881196
/**
1197+
* Get quote address errors.
1198+
*
11891199
* @param OrderInterface[] $orders
11901200
* @param \Magento\Quote\Model\Quote\Address[] $addresses
11911201
* @param \Exception[] $exceptionList
1192-
*
11931202
* @return string[]
11941203
* @throws NotFoundException
11951204
*/

app/code/Magento/Multishipping/Test/Unit/Model/Checkout/Type/MultishippingTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,11 +659,13 @@ private function getOrderMock(
659659
'getId',
660660
'getCanSendNewEmailFlag',
661661
'getItems',
662+
'setShippingMethod',
662663
]
663664
)->getMock();
664665
$orderMock->method('setQuote')->with($this->quoteMock);
665666
$orderMock->method('setBillingAddress')->with($orderAddressMock)->willReturnSelf();
666667
$orderMock->method('setShippingAddress')->with($orderAddressMock)->willReturnSelf();
668+
$orderMock->expects($this->once())->method('setShippingMethod')->with('carrier')->willReturnSelf();
667669
$orderMock->method('setPayment')->with($orderPaymentMock)->willReturnSelf();
668670
$orderMock->method('addItem')->with($orderItemMock)->willReturnSelf();
669671
$orderMock->method('getIncrementId')->willReturn('1');
Loading

app/design/frontend/Magento/blank/web/images/logo.svg

Lines changed: 1 addition & 1 deletion
Loading

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/ProductTypeSwitchingOnCreationTest.php

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Catalog\Test\Page\Adminhtml\CatalogProductNew;
1111
use Magento\Mtf\Fixture\FixtureFactory;
1212
use Magento\Mtf\TestCase\Injectable;
13+
use Magento\Downloadable\Test\Block\Adminhtml\Catalog\Product\Edit\Section\Downloadable;
1314

1415
/**
1516
* Test Creation for ProductTypeSwitchingOnCreation
@@ -75,18 +76,49 @@ public function __inject(
7576
*
7677
* @param string $createProduct
7778
* @param string $product
79+
* @param string $actionName
7880
* @return array
7981
*/
80-
public function test($createProduct, $product)
82+
public function test(string $createProduct, string $product, string $actionName = null): array
8183
{
8284
// Steps
8385
list($fixture, $dataset) = explode('::', $product);
8486
$product = $this->fixtureFactory->createByCode($fixture, ['dataset' => $dataset]);
8587
$this->catalogProductIndex->open();
8688
$this->catalogProductIndex->getGridPageActionBlock()->addProduct($createProduct);
89+
if ($actionName) {
90+
$this->performAction($actionName);
91+
}
8792
$this->catalogProductNew->getProductForm()->fill($product);
8893
$this->catalogProductNew->getFormPageActions()->save($product);
8994

9095
return ['product' => $product];
9196
}
97+
98+
/**
99+
* Perform action.
100+
*
101+
* @param string $actionName
102+
* @return void
103+
*/
104+
private function performAction(string $actionName): void
105+
{
106+
if (method_exists(__CLASS__, $actionName)) {
107+
$this->$actionName();
108+
}
109+
}
110+
111+
/**
112+
* Clear downloadable product data.
113+
*
114+
* @return void
115+
*/
116+
private function clearDownloadableData(): void
117+
{
118+
$this->catalogProductNew->getProductForm()->openSection('downloadable_information');
119+
/** @var Downloadable $downloadableInfoTab */
120+
$downloadableInfoTab = $this->catalogProductNew->getProductForm()->getSection('downloadable_information');
121+
$downloadableInfoTab->getDownloadableBlock('Links')->clearDownloadableData();
122+
$downloadableInfoTab->setIsDownloadable('No');
123+
}
92124
}

0 commit comments

Comments
 (0)