Skip to content

Commit 35a6f95

Browse files
committed
B2B-2469: Improve category children loading
- review changes
1 parent 9ee75fa commit 35a6f95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@ public function testCategoryListPaginationLimitsNotAppliedToChildren()
10091009
$response = $this->graphQlQuery($this->getQueryForPage(1));
10101010
$this->assertArrayNotHasKey('errors', $response);
10111011
$this->assertArrayHasKey('categoryList', $response);
1012+
$this->assertCount(1, $response['categoryList']);
10121013
$baseCategory = $response['categoryList'][0];
10131014
$this->assertEquals('Category 1', $baseCategory['name']);
10141015
$this->assertCount(2, $baseCategory['children']);
@@ -1019,13 +1020,15 @@ public function testCategoryListPaginationLimitsNotAppliedToChildren()
10191020
$response = $this->graphQlQuery($this->getQueryForPage(2));
10201021
$this->assertArrayNotHasKey('errors', $response);
10211022
$this->assertArrayHasKey('categoryList', $response);
1023+
$this->assertCount(1, $response['categoryList']);
10221024
$baseCategory = $response['categoryList'][0];
10231025
$this->assertEquals('Category 2', $baseCategory['name']);
10241026
$this->assertCount(0, $baseCategory['children']);
10251027

10261028
$response = $this->graphQlQuery($this->getQueryForPage(3));
10271029
$this->assertArrayNotHasKey('errors', $response);
10281030
$this->assertArrayHasKey('categoryList', $response);
1031+
$this->assertCount(1, $response['categoryList']);
10291032
$baseCategory = $response['categoryList'][0];
10301033
$this->assertEquals('Movable', $baseCategory['name']);
10311034
$this->assertCount(0, $baseCategory['children']);

0 commit comments

Comments
 (0)