Skip to content

Commit daa8a3a

Browse files
Merge branch '2.2-develop_SPRINT-41_V1' into 'SPRINT-41'
2.2 develop sprint 41 v1 See merge request !276
2 parents a5f0a26 + ec8868a commit daa8a3a

File tree

7 files changed

+45
-12
lines changed

7 files changed

+45
-12
lines changed

app/code/Magento/CatalogInventory/Model/Stock/StockItemRepository.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ class StockItemRepository implements StockItemRepositoryInterface
7777

7878
/**
7979
* @var Processor
80+
* @deprecated
8081
*/
8182
protected $indexProcessor;
8283

@@ -181,8 +182,6 @@ public function save(\Magento\CatalogInventory\Api\Data\StockItemInterface $stoc
181182
$stockItem->setStockId($stockItem->getStockId());
182183

183184
$this->resource->save($stockItem);
184-
185-
$this->indexProcessor->reindexRow($stockItem->getProductId());
186185
} catch (\Exception $exception) {
187186
throw new CouldNotSaveException(__('Unable to save Stock Item'), $exception);
188187
}

app/code/Magento/CatalogInventory/Test/Unit/Model/Stock/StockItemRepositoryTest.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ public function testSave()
304304
->method('save')
305305
->with($this->stockItemMock)
306306
->willReturnSelf();
307-
$this->indexProcessorMock->expects($this->once())->method('reindexRow')->with($productId);
308307

309308
$this->assertEquals($this->stockItemMock, $this->model->save($this->stockItemMock));
310309
}

dev/tests/functional/tests/app/Magento/AdvancedPricingImportExport/Test/TestCase/ExportAdvancedPricingTest.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@
4848
</data>
4949
<constraint name="Magento\AdvancedPricingImportExport\Test\Constraint\AssertExportAdvancedPricing"/>
5050
</variation>
51-
<variation name="ExportAdvancedPricingTestVariation4" summary="Trying export product data for product available on main website with default currency and custom website with different currency" ticketId="MAGETWO-48298">
52-
<data name="issue" xsi:type="string">MAGETWO-65703: Fatal error on creation simple product with tier price in custom website via webapi handler</data>
51+
<variation name="ExportAdvancedPricingTestVariation4" summary="Trying export product data for product available on main website with default currency and custom website with different currency" ticketId="MAGETWO-46153">
5352
<data name="configData" xsi:type="string">price_scope_website</data>
5453
<data name="exportData" xsi:type="string">csv_with_advanced_pricing</data>
5554
<data name="products/0" xsi:type="array">

dev/tests/functional/tests/app/Magento/Catalog/Test/Handler/CatalogProductSimple/Webapi.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ protected function prepareTierPrice()
288288
$priceInfo['qty'] = $priceInfo['price_qty'];
289289
unset($priceInfo['price_qty']);
290290

291-
unset($priceInfo['website_id']);
291+
if (isset($priceInfo['website_id'])) {
292+
$priceInfo['extension_attributes']['website_id'] = $priceInfo['website_id'];
293+
unset($priceInfo['website_id']);
294+
}
295+
292296
unset($priceInfo['delete']);
293297

294298
$this->fields['product']['tier_prices'][$key] = $priceInfo;

dev/tests/functional/tests/app/Magento/Catalog/Test/Repository/Product/CustomOptions.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<item name="price" xsi:type="string">20</item>
5656
<item name="price_type" xsi:type="string">Percent</item>
5757
<item name="sku" xsi:type="string">sku_drop_down_row_2</item>
58-
<item name="sort_order" xsi:type="string">0</item>
58+
<item name="sort_order" xsi:type="string">1</item>
5959
</item>
6060
</item>
6161
</field>

dev/tests/functional/tests/app/Magento/Catalog/Test/TestCase/Product/CreateSimpleProductEntityPartOneTest.xml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,7 @@
115115
<constraint name="Magento\Catalog\Test\Constraint\AssertProductPage" />
116116
<constraint name="Magento\Catalog\Test\Constraint\AssertProductTierPriceOnProductPage" />
117117
</variation>
118-
<variation name="CreateSimpleProductEntityTestVariation18">
119-
<data name="issue" xsi:type="string">MAGETWO-60470: [Import Custom options] An error occurs on attempt to save the product with imported options</data>
118+
<variation name="CreateSimpleProductEntityTestVariation18" summary="Create simple product with imported options" ticketId="MAGETWO-71386">
120119
<data name="description" xsi:type="string">Create product wit suite of custom options</data>
121120
<data name="product/data/url_key" xsi:type="string">simple-product-%isolation%</data>
122121
<data name="product/data/name" xsi:type="string">Simple Product %isolation%</data>
@@ -129,7 +128,6 @@
129128
<data name="product/data/custom_options/dataset" xsi:type="string">options_suite</data>
130129
<data name="product/data/checkout_data/dataset" xsi:type="string">simple_options_suite</data>
131130
<data name="product/data/custom_options/import_products" xsi:type="string">catalogProductSimple::with_two_custom_option,catalogProductSimple::with_all_custom_option</data>
132-
<data name="issue" xsi:type="string">MAGETWO-58181: All kind of Custom Options have dynamic view on Bamboo</data>
133131
<constraint name="Magento\Catalog\Test\Constraint\AssertProductSaveMessage" />
134132
<constraint name="Magento\Catalog\Test\Constraint\AssertProductInGrid" />
135133
<constraint name="Magento\Catalog\Test\Constraint\AssertProductForm" />

dev/tests/functional/tests/app/Magento/CatalogRule/Test/Block/Adminhtml/Promo/Catalog/Edit/PromoForm.php

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,24 @@
66

77
namespace Magento\CatalogRule\Test\Block\Adminhtml\Promo\Catalog\Edit;
88

9-
use \Magento\Ui\Test\Block\Adminhtml\FormSections;
10-
use Magento\Mtf\Client\Element\SimpleElement;
9+
use Magento\Backend\Test\Block\Template;
10+
use Magento\Mtf\Client\Locator;
1111
use Magento\Mtf\Fixture\FixtureInterface;
12+
use Magento\Mtf\Client\Element\SimpleElement;
13+
use Magento\Ui\Test\Block\Adminhtml\FormSections;
1214

1315
/**
1416
* Form for creation of a Catalog Price Rule.
1517
*/
1618
class PromoForm extends FormSections
1719
{
20+
/**
21+
* Selector for template block.
22+
*
23+
* @var string
24+
*/
25+
private $templateBlockSelector = './ancestor::body';
26+
1827
/**
1928
* Fill form with tabs.
2029
*
@@ -25,6 +34,7 @@ class PromoForm extends FormSections
2534
*/
2635
public function fill(FixtureInterface $fixture, SimpleElement $element = null, array $replace = null)
2736
{
37+
$this->waitPageToLoad();
2838
$sections = $this->getFixtureFieldsByContainers($fixture);
2939
if ($replace) {
3040
$sections = $this->prepareData($sections, $replace);
@@ -55,4 +65,28 @@ protected function prepareData(array $tabs, array $replace)
5565

5666
return $tabs;
5767
}
68+
69+
/**
70+
* Wait page to load.
71+
*
72+
* @return void
73+
*/
74+
protected function waitPageToLoad()
75+
{
76+
$this->waitForElementVisible($this->header);
77+
$this->getTemplateBlock()->waitLoader();
78+
}
79+
80+
/**
81+
* Get template block.
82+
*
83+
* @return Template
84+
*/
85+
private function getTemplateBlock()
86+
{
87+
return $this->blockFactory->create(
88+
Template::class,
89+
['element' => $this->_rootElement->find($this->templateBlockSelector, Locator::SELECTOR_XPATH)]
90+
);
91+
}
5892
}

0 commit comments

Comments
 (0)