Skip to content

Commit

Permalink
test: refactor Pagination tests
Browse files Browse the repository at this point in the history
  • Loading branch information
viktorrusakov committed Jan 17, 2023
1 parent e2cd9f2 commit 0fbded8
Show file tree
Hide file tree
Showing 6 changed files with 186 additions and 181 deletions.
4 changes: 2 additions & 2 deletions src/DataTable/tests/TablePagination.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ describe('<TablePagination />', () => {
const dropdownChoices = wrapper.find(Dropdown.Item);
expect(dropdownChoices.length).toEqual(instance.pageCount);

const secondPageButton = dropdownChoices.at(1);
const secondPageButton = dropdownChoices.at(2);
secondPageButton.simulate('click');
expect(gotoPageSpy).toHaveBeenCalledTimes(1);
expect(gotoPageSpy).toHaveBeenCalledWith(1);
expect(gotoPageSpy).toHaveBeenCalledWith(2);
});
});
2 changes: 1 addition & 1 deletion src/Pagination/DefaultPagination.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ function PaginationPages() {
})}
</>
);
}
}
Loading

0 comments on commit 0fbded8

Please sign in to comment.