Skip to content

Commit 54eea38

Browse files
committed
MC-18514: API functional test to cover filterable custom attributes in layered navigation
- fix static
1 parent d8b24bd commit 54eea38

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ public function testFilterByCategoryIdAndCustomAttribute()
638638
]
639639
);
640640
}
641-
$this->assertNotEmpty($response['products']['filters'],'filters is empty');
641+
$this->assertNotEmpty($response['products']['filters'], 'filters is empty');
642642
$this->assertNotEmpty($response['products']['aggregations'], 'Aggregations should not be empty');
643643
$this->assertCount(3, $response['products']['aggregations']);
644644

@@ -1298,6 +1298,7 @@ public function testSearchAndSortByRelevance()
12981298
$this->assertNotEmpty($response['products']['filters'], 'Filters should have the Category layer');
12991299
$this->assertEquals('Colorful Category', $response['products']['filters'][0]['filter_items'][0]['label']);
13001300
$productsInResponse = ['ocean blue Shoes','Blue briefs','Navy Striped Shoes','Grey shorts'];
1301+
// phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
13011302
for ($i = 0; $i < count($response['products']['items']); $i++) {
13021303
$this->assertEquals($productsInResponse[$i], $response['products']['items'][$i]['name']);
13031304
}
@@ -1553,6 +1554,7 @@ public function testFilterWithinASpecificPriceRangeSortedByPriceDESC()
15531554
//verify that by default Price and category are the only layers available
15541555
$filterNames = ['Category', 'Price'];
15551556
$this->assertCount(2, $response['products']['filters'], 'Filter count does not match');
1557+
// phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
15561558
for ($i = 0; $i < count($response['products']['filters']); $i++) {
15571559
$this->assertEquals($filterNames[$i], $response['products']['filters'][$i]['name']);
15581560
}

dev/tests/api-functional/testsuite/Magento/GraphQl/Quote/Guest/CheckoutEndToEndTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private function findProduct(): string
9595
products (
9696
filter: {
9797
sku: {
98-
like:"simple%"
98+
eq:"simple1"
9999
}
100100
}
101101
pageSize: 1

0 commit comments

Comments
 (0)