Skip to content

Commit 3ec755e

Browse files
mslabkole0n4ik
authored andcommitted
ECP-515: Storefront Get API
- fix test
1 parent ad70be9 commit 3ec755e

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/AbstractEavTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,13 @@ protected function getOptionValueByLabel(string $attributeCode, string $label):
220220
/**
221221
* Returns product for testing.
222222
*
223+
* @param bool $forceReload
223224
* @return ProductInterface
225+
* @throws \Magento\Framework\Exception\NoSuchEntityException
224226
*/
225-
protected function getProduct(): ProductInterface
227+
protected function getProduct($forceReload = false): ProductInterface
226228
{
227-
return $this->productRepository->get('simple', false, Store::DEFAULT_STORE_ID);
229+
return $this->productRepository->get('simple', false, Store::DEFAULT_STORE_ID, $forceReload);
228230
}
229231

230232
/**

dev/tests/integration/testsuite/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav/DefaultAttributesTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public function testModifyMeta(): void
3333
public function testModifyData(): void
3434
{
3535
$expectedData = include __DIR__ . '/../_files/eav_expected_data_output.php';
36-
$this->callModifyDataAndAssert($this->getProduct(), $expectedData);
36+
// force load: ProductRepositoryInterface::getList does not add stock item, prices, categories to product
37+
$this->callModifyDataAndAssert($this->getProduct(true), $expectedData);
3738
}
3839

3940
/**

0 commit comments

Comments
 (0)