diff --git a/src/components/misc/Pagination.jsx b/src/components/misc/Pagination.jsx index afaf413..2088e5c 100644 --- a/src/components/misc/Pagination.jsx +++ b/src/components/misc/Pagination.jsx @@ -63,8 +63,16 @@ const Pagination = ({ pageNumber, handlePagination, itemCount, pageCount, allowS <>
- handlePagination(INITIAL_PAGE)} /> - handlePagination(pageNumber - 1)} /> + handlePagination(INITIAL_PAGE)} + /> + handlePagination(pageNumber - 1)} + /> {generatePageNumbers().map((pageNum, i) => { if (pageNum === "...") { return ; @@ -80,7 +88,11 @@ const Pagination = ({ pageNumber, handlePagination, itemCount, pageCount, allowS {pageCount + 1} )} - = pageCount} onClick={() => handlePagination(pageNumber + 1)} /> + = pageCount} + onClick={() => handlePagination(pageNumber + 1)} + />
{allowSizeChange && ( diff --git a/tests/__tests__/components/Pagination.spec.jsx b/tests/__tests__/components/Pagination.spec.jsx index eb9fd42..f7bb3ea 100644 --- a/tests/__tests__/components/Pagination.spec.jsx +++ b/tests/__tests__/components/Pagination.spec.jsx @@ -17,7 +17,7 @@ describe("Pagination", function () { ); const pagination = TestUtils.findRenderedDOMComponentWithClass(tree, "pagination"); expect(pagination).not.toBeNull(); - const li = TestUtils.scryRenderedDOMComponentsWithTag(tree, "li"); - expect(li.length).toEqual(4); + const li = TestUtils.scryRenderedDOMComponentsWithClass(tree, "test-pag-arrow"); + expect(li.length).toEqual(3); }); });