Skip to content

Commit 0504bed

Browse files
committed
MAGETWO-61962: Pagination broken in the storefront category page when Flat Category is enabled
1 parent 2e8ee81 commit 0504bed

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

dev/tests/functional/tests/app/Magento/Catalog/Test/Block/Product/ProductList/BottomToolbar.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class BottomToolbar extends Block
2323
private $nextPageSelector = '.item.current + .item a';
2424

2525
/**
26-
* Selector previous element
26+
* Selector first element
2727
*
2828
* @var string
2929
*/
30-
private $previousPageSelector = '.item.pages-item-previous';
30+
private $firstPageSelector = '.item>.page';
3131

3232
/**
3333
* Selector option element
@@ -52,15 +52,15 @@ public function nextPage()
5252
}
5353

5454
/**
55-
* Go to the previous page
55+
* Go to the first page
5656
*
5757
* @return bool
5858
*/
59-
public function previousPage()
59+
public function firstPage()
6060
{
61-
$previousPageItem = $this->_rootElement->find($this->previousPageSelector);
62-
if ($previousPageItem->isVisible()) {
63-
$previousPageItem->click();
61+
$firstPageItem = $this->_rootElement->find($this->firstPageSelector);
62+
if ($firstPageItem->isVisible()) {
63+
$firstPageItem->click();
6464
return true;
6565
}
6666
return false;

dev/tests/functional/tests/app/Magento/Catalog/Test/Constraint/AssertPaginationCorrectOnStoreFront.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function processAssert(
5656
$catalogCategoryView->getListProductBlock()->getProductsCount(),
5757
'Count of products on 2 page does not equivalent with declared in pagination (default value)'
5858
);
59-
$catalogCategoryView->getBottomToolbar()->previousPage();
59+
$catalogCategoryView->getBottomToolbar()->firstPage();
6060
$catalogCategoryView->getBottomToolbar()->setLimiterValueByIndex(1);
6161
\PHPUnit_Framework_Assert::assertEquals(
6262
$catalogCategoryView->getBottomToolbar()->getLimitedValueByIndex(1),

0 commit comments

Comments
 (0)