Skip to content

Commit c89b23a

Browse files
committed
Merge remote-tracking branch 'upstream/develop' into pr
2 parents 9c60400 + 7ef0730 commit c89b23a

File tree

15 files changed

+174
-42
lines changed

15 files changed

+174
-42
lines changed

app/code/Magento/Catalog/Test/Unit/Model/Indexer/Product/Flat/FlatTableBuilderTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ public function testBuild()
141141
[$tableName],
142142
['catalog_product_website']
143143
)
144-
->willReturn(
144+
->willReturnOnConsecutiveCalls(
145145
$tableName,
146146
'catalog_product_website'
147147
);
@@ -184,12 +184,12 @@ public function testBuild()
184184
],
185185
[
186186
$temporaryTableName,
187-
"e.{$linkField} = ${temporaryTableName}.{$linkField}",
187+
"e.{$linkField} = {$temporaryTableName}.{$linkField}",
188188
[$linkField]
189189
],
190190
[
191191
$temporaryValueTableName,
192-
"e.${linkField} = " . $temporaryValueTableName . ".${linkField}",
192+
"e.{$linkField} = " . $temporaryValueTableName . ".{$linkField}",
193193
[$linkField]
194194
]
195195
)->willReturnSelf();
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
namespace Magento\Indexer\Setup;
8+
9+
use Magento\Framework\Setup\InstallDataInterface;
10+
use Magento\Framework\Setup\ModuleContextInterface;
11+
use Magento\Framework\Setup\ModuleDataSetupInterface;
12+
use Magento\Indexer\Model\IndexerFactory;
13+
use Magento\Framework\Indexer\ConfigInterface;
14+
15+
/**
16+
* Recurring data upgrade for indexer module
17+
*/
18+
class RecurringData implements InstallDataInterface
19+
{
20+
/**
21+
* @var IndexerFactory
22+
*/
23+
private $indexerFactory;
24+
25+
/**
26+
* @var ConfigInterface
27+
*/
28+
private $configInterface;
29+
30+
/**
31+
* RecurringData constructor.
32+
*
33+
* @param IndexerFactory $indexerFactory
34+
* @param ConfigInterface $configInterface
35+
*/
36+
public function __construct(
37+
IndexerFactory $indexerFactory,
38+
ConfigInterface $configInterface
39+
) {
40+
$this->indexerFactory = $indexerFactory;
41+
$this->configInterface = $configInterface;
42+
}
43+
44+
/**
45+
* {@inheritdoc}
46+
*/
47+
public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context)
48+
{
49+
foreach (array_keys($this->configInterface->getIndexers()) as $indexerId) {
50+
$indexer = $this->indexerFactory->create()->load($indexerId);
51+
if ($indexer->isScheduled()) {
52+
$indexer->getView()->unsubscribe()->subscribe();
53+
}
54+
}
55+
}
56+
}

app/code/Magento/Rule/Model/Condition/Product/AbstractProduct.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,9 @@ public function getBindArgumentValue()
602602
*/
603603
public function getMappedSqlField()
604604
{
605-
if (!$this->isAttributeSetOrCategory()) {
605+
if ($this->getAttribute() == 'sku') {
606+
$mappedSqlField = 'e.sku';
607+
} elseif (!$this->isAttributeSetOrCategory()) {
606608
$mappedSqlField = $this->getEavAttributeTableAlias() . '.value';
607609
} elseif ($this->getAttribute() == 'category_ids') {
608610
$mappedSqlField = 'e.entity_id';

dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/TestCase/CreateConfigurableProductEntityTest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
<constraint name="Magento\ConfigurableProduct\Test\Constraint\AssertConfigurableProductPage" />
111111
</variation>
112112
<variation name="CreateConfigurableProductEntityTestVariation6" summary="Create Configurable Product with Creating New Category and New Attribute (Required Fields Only)" ticketId="MAGETWO-13361">
113-
<data name="tag" xsi:type="string">test_type:acceptance_test, test_type:extended_acceptance_test, stable:no</data>
113+
<data name="tag" xsi:type="string">test_type:acceptance_test, test_type:extended_acceptance_test</data>
114114
<data name="product/data/configurable_attributes_data/dataset" xsi:type="string">two_searchable_options</data>
115115
<data name="product/data/name" xsi:type="string">Configurable Product %isolation%</data>
116116
<data name="product/data/sku" xsi:type="string">configurable_sku_%isolation%</data>

dev/tests/functional/tests/app/Magento/Customer/Test/etc/testcase.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
<step name="createProducts" module="Magento_Catalog" next="addProducts"/>
1414
<step name="addProducts" module="Magento_Sales" next="updateProductsData"/>
1515
<step name="updateProductsData" module="Magento_Sales" next="fillBillingAddress"/>
16-
<step name="fillBillingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder"/>
16+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress"/>
17+
<step name="fillShippingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder"/>
1718
<step name="selectPaymentMethodForOrder" module="Magento_Sales" next="selectShippingMethodForOrder"/>
1819
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="submitOrder"/>
1920
<step name="submitOrder" module="Magento_Sales"/>

dev/tests/functional/tests/app/Magento/Paypal/Test/etc/testcase.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@
7979
<step name="selectStore" module="Magento_Sales" next="addProducts" />
8080
<step name="addProducts" module="Magento_Sales" next="fillAccountInformation" />
8181
<step name="fillAccountInformation" module="Magento_Sales" next="fillBillingAddress" />
82-
<step name="fillBillingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
82+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress" />
83+
<step name="fillShippingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
8384
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="saveCreditCardOnBackend" />
8485
<step name="saveCreditCardOnBackend" module="Magento_Vault" next="submitOrderNegative" />
8586
<step name="submitOrderNegative" module="Magento_Sales" />

dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create.php

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -291,29 +291,28 @@ public function fillBillingAddress(
291291
$saveAddress = 'No',
292292
$setShippingAddress = true
293293
) {
294-
if ($setShippingAddress) {
294+
if ($setShippingAddress !== false) {
295295
$this->getShippingAddressBlock()->uncheckSameAsBillingShippingAddress();
296296
}
297297
$this->getBillingAddressBlock()->fill($billingAddress);
298298
$this->getBillingAddressBlock()->saveInAddressBookBillingAddress($saveAddress);
299299
$this->getTemplateBlock()->waitLoader();
300+
if ($setShippingAddress) {
301+
$this->getShippingAddressBlock()->setSameAsBillingShippingAddress();
302+
$this->getTemplateBlock()->waitLoader();
303+
}
300304
}
301305

302306
/**
303307
* Fill Shipping Address.
304308
*
305-
* @param FixtureInterface $shippingAddress [optional]
309+
* @param FixtureInterface $shippingAddress
306310
* @return void
307311
*/
308-
public function fillShippingAddress(FixtureInterface $shippingAddress = null)
312+
public function fillShippingAddress(FixtureInterface $shippingAddress)
309313
{
310-
if (!$shippingAddress) {
311-
$this->getShippingAddressBlock()->setSameAsBillingShippingAddress();
312-
$this->getTemplateBlock()->waitLoader();
313-
} else {
314-
$this->getShippingAddressBlock()->fill($shippingAddress);
315-
$this->getTemplateBlock()->waitLoader();
316-
}
314+
$this->getShippingAddressBlock()->fill($shippingAddress);
315+
$this->getTemplateBlock()->waitLoader();
317316
}
318317

319318
/**

dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/FillBillingAddressStep.php

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,13 @@ class FillBillingAddressStep implements TestStepInterface
2929
*/
3030
protected $billingAddress;
3131

32+
/**
33+
* Shipping Address fixture.
34+
*
35+
* @var Address
36+
*/
37+
protected $shippingAddress;
38+
3239
/**
3340
* Save Address.
3441
*
@@ -46,17 +53,20 @@ class FillBillingAddressStep implements TestStepInterface
4653
/**
4754
* @param OrderCreateIndex $orderCreateIndex
4855
* @param Address $billingAddress
49-
* @param string $saveAddress
56+
* @param Address $shippingAddress [optional]
57+
* @param string $saveAddress [optional]
5058
* @param bool $setShippingAddress [optional]
5159
*/
5260
public function __construct(
5361
OrderCreateIndex $orderCreateIndex,
5462
Address $billingAddress,
63+
Address $shippingAddress = null,
5564
$saveAddress = 'No',
5665
$setShippingAddress = true
5766
) {
5867
$this->orderCreateIndex = $orderCreateIndex;
5968
$this->billingAddress = $billingAddress;
69+
$this->shippingAddress = $shippingAddress;
6070
$this->saveAddress = $saveAddress;
6171
$this->setShippingAddress = $setShippingAddress;
6272
}
@@ -68,6 +78,9 @@ public function __construct(
6878
*/
6979
public function run()
7080
{
81+
if ($this->shippingAddress !== null) {
82+
$this->setShippingAddress = null;
83+
}
7184
$this->orderCreateIndex->getCreateBlock()
7285
->fillBillingAddress($this->billingAddress, $this->saveAddress, $this->setShippingAddress);
7386

dev/tests/functional/tests/app/Magento/Sales/Test/TestStep/FillShippingAddressStep.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public function __construct(
4848
*/
4949
public function run()
5050
{
51-
$this->orderCreateIndex->getCreateBlock()->fillShippingAddress($this->shippingAddress);
51+
if ($this->shippingAddress !== null) {
52+
$this->orderCreateIndex->getCreateBlock()->fillShippingAddress($this->shippingAddress);
53+
}
5254
}
5355
}

dev/tests/functional/tests/app/Magento/Sales/Test/etc/testcase.xml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
<step name="createOrder" module="Magento_Sales" next="openOrder" />
1212
<step name="openOrder" module="Magento_Sales" next="reorder" />
1313
<step name="reorder" module="Magento_Sales" next="fillBillingAddress" />
14-
<step name="fillBillingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder" />
14+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress" />
15+
<step name="fillShippingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder" />
1516
<step name="selectPaymentMethodForOrder" module="Magento_Sales" next="selectShippingMethodForOrder" />
1617
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="submitOrder" />
1718
<step name="submitOrder" module="Magento_Sales" />
@@ -42,7 +43,8 @@
4243
<step name="selectCustomerOrder" module="Magento_Sales" next="selectStore" />
4344
<step name="selectStore" module="Magento_Sales" next="addProducts" />
4445
<step name="addProducts" module="Magento_Sales" next="fillBillingAddress" />
45-
<step name="fillBillingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder" />
46+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress" />
47+
<step name="fillShippingAddress" module="Magento_Sales" next="selectPaymentMethodForOrder" />
4648
<step name="selectPaymentMethodForOrder" module="Magento_Sales" next="selectShippingMethodForOrder" />
4749
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="submitOrder" />
4850
<step name="submitOrder" module="Magento_Sales" next="openSalesOrderOnFrontendForGuest" />
@@ -61,7 +63,8 @@
6163
<step name="addProducts" module="Magento_Sales" next="updateProductsData" />
6264
<step name="updateProductsData" module="Magento_Sales" next="fillAccountInformation" />
6365
<step name="fillAccountInformation" module="Magento_Sales" next="fillBillingAddress" />
64-
<step name="fillBillingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
66+
<step name="fillBillingAddress" module="Magento_Sales" next="fillShippingAddress" />
67+
<step name="fillShippingAddress" module="Magento_Sales" next="selectShippingMethodForOrder" />
6568
<step name="selectShippingMethodForOrder" module="Magento_Sales" next="selectPaymentMethodForOrder" />
6669
<step name="selectPaymentMethodForOrder" module="Magento_Sales" next="submitOrder" />
6770
<step name="submitOrder" module="Magento_Sales" next="createInvoice" />

0 commit comments

Comments
 (0)