Skip to content

Commit 18d53e0

Browse files
committed
Update test
1 parent 06e4d20 commit 18d53e0

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

dev/tests/api-functional/testsuite/Magento/GraphQl/Catalog/ProductViewTest.php

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -670,6 +670,35 @@ public function testProductPrices()
670670
$this->assertBaseFields($secondProduct, $response['products']['items'][1]);
671671
}
672672

673+
/**
674+
* @magentoApiDataFixture Magento/Catalog/_files/products_for_search.php
675+
*/
676+
public function testProductFilterNfinset()
677+
{
678+
$productSku = 'search_product_1';
679+
680+
$query = <<<QUERY
681+
{
682+
products(filter: {sku: {nfinset: ["$productSku"]}})
683+
{
684+
items {
685+
id
686+
name
687+
sku
688+
}
689+
}
690+
}
691+
QUERY;
692+
693+
$response = $this->graphQlQuery($query);
694+
695+
/**
696+
* @var ProductRepositoryInterface $productRepository
697+
*/
698+
$productRepository = ObjectManager::getInstance()->get(ProductRepositoryInterface::class);
699+
$this->assertNotEquals($response['products']['items'][0]['sku'], $productSku);
700+
}
701+
673702
/**
674703
* @param ProductInterface $product
675704
* @param array $actualResponse

0 commit comments

Comments
 (0)