Skip to content

Commit

Permalink
Merge pull request #6032 from magento-performance/MC-36671
Browse files Browse the repository at this point in the history
MC-36671: Extend catalog GraphQl tests coverage
  • Loading branch information
slavvka authored Aug 15, 2020
2 parents 2dc2a50 + 26f5a92 commit 4930963
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 112 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class ProductSearchAggregationsTest extends GraphQlAbstract
*/
public function testAggregationBooleanAttribute()
{
$this->reindex();
$this->markTestSkipped(
'MC-22184: Elasticsearch returns incorrect aggregation options for booleans'
. 'MC-36768: Custom attribute not appears in elasticsearch'
);

$skus= '"search_product_1", "search_product_2", "search_product_3", "search_product_4" ,"search_product_5"';
$query = <<<QUERY
Expand Down Expand Up @@ -61,21 +64,9 @@ function ($a) {
$this->assertEquals('boolean_attribute', $booleanAggregation['attribute_code']);
$this->assertContainsEquals(['label' => '1', 'value'=> '1', 'count' => '3'], $booleanAggregation['options']);

$this->markTestIncomplete('MC-22184: Elasticsearch returns incorrect aggregation options for booleans');
$this->markTestSkipped('MC-22184: Elasticsearch returns incorrect aggregation options for booleans');
$this->assertEquals(2, $booleanAggregation['count']);
$this->assertCount(2, $booleanAggregation['options']);
$this->assertContainsEquals(['label' => '0', 'value'=> '0', 'count' => '2'], $booleanAggregation['options']);
}

/**
* Reindex
*
* @throws \Magento\Framework\Exception\LocalizedException
*/
private function reindex()
{
$appDir = dirname(Bootstrap::getInstance()->getAppTempDir());
// phpcs:ignore Magento2.Security.InsecureFunction
exec("php -f {$appDir}/bin/magento indexer:reindex");
}
}
Loading

0 comments on commit 4930963

Please sign in to comment.