Skip to content

Commit 4edafcf

Browse files
author
Daniël van der Linden
committed
Fix 2 api GQL API tests with expected exception messages
1 parent 5f05572 commit 4edafcf

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -381,13 +381,13 @@ public function testSearchWithFilterWithPageSizeEqualTotalCount()
381381
}
382382
QUERY;
383383
$this->expectException(\Exception::class);
384-
$this->expectExceptionMessage('GraphQL response contains errors: currentPage value 1 specified is greater ' .
385-
'than the number of pages available.');
384+
$this->expectExceptionMessage('GraphQL response contains errors: currentPage value 2 specified is greater ' .
385+
'than the 1 page(s) available');
386386
$this->graphQlQuery($query);
387387
}
388388

389389
/**
390-
* The query returns a total_count of 2 records; setting the pageSize = 1 and currentPage2
390+
* The query returns a total_count of 2 records; setting the pageSize = 1 and currentPage = 2
391391
* Expected result is to get the second product on the list on the second page
392392
*
393393
* @magentoApiDataFixture Magento/Catalog/_files/multiple_products.php
@@ -449,7 +449,7 @@ public function testSearchWithFilterPageSizeLessThanCurrentPage()
449449
* @var ProductRepositoryInterface $productRepository
450450
*/
451451
$productRepository = ObjectManager::getInstance()->get(ProductRepositoryInterface::class);
452-
// when pagSize =1 and currentPage = 2, it should have simple2 on first page and simple1 on 2nd page
452+
// when pageSize = 1 and currentPage = 2, it should have simple2 on first page and simple1 on 2nd page
453453
// since sorting is done on price in the DESC order
454454
$product = $productRepository->get('simple1');
455455
$filteredProducts = [$product];
@@ -1132,8 +1132,8 @@ public function testQueryPageOutOfBoundException()
11321132
QUERY;
11331133

11341134
$this->expectException(\Exception::class);
1135-
$this->expectExceptionMessage('GraphQL response contains errors: currentPage value 1 specified is greater ' .
1136-
'than the number of pages available.');
1135+
$this->expectExceptionMessage('GraphQL response contains errors: currentPage value 2 specified is greater ' .
1136+
'than the 1 page(s) available.');
11371137
$this->graphQlQuery($query);
11381138
}
11391139

0 commit comments

Comments
 (0)