From 093f1b9f8e900b1272d4528d2274312c4006b7d6 Mon Sep 17 00:00:00 2001 From: Alex Paliarush Date: Tue, 29 May 2018 18:29:43 -0500 Subject: [PATCH] ENGCOM-1663: Include 'products' in category query #48 - Fixed test in case when indexer mode is 'on schedule' --- .../Magento/GraphQl/Catalog/CategoryTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php index 8fa731fb0d7f2..8fc19a21421c0 100644 --- a/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php +++ b/dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/CategoryTest.php @@ -120,6 +120,18 @@ public function testCategoriesTree() */ public function testCategoryProducts() { + /** @var \Magento\Catalog\Model\Indexer\Category\Product\Processor $categoryProductIndexer */ + $categoryProductIndexer = $this->objectManager->get( + \Magento\Catalog\Model\Indexer\Category\Product\Processor::class + ); + $categoryProductIndexer->reindexAll(); + + /** @var \Magento\CatalogInventory\Model\Indexer\Stock\Processor $inventoryIndexer */ + $inventoryIndexer = $this->objectManager->get( + \Magento\CatalogInventory\Model\Indexer\Stock\Processor::class + ); + $inventoryIndexer->reindexAll(); + $categoryId = 4; $query = <<