Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Add pagination testing #27

Merged
merged 8 commits into from
Jan 28, 2016
Merged

Add pagination testing #27

merged 8 commits into from
Jan 28, 2016

Conversation

edelooff
Copy link
Collaborator

This expands upon #26 and improves the existing tests for pagination (issue #12). Stuff that is tested:

  • Basic pagination enabling (either from timbles init or later in the life of the table);
  • Total page count indicators;
  • Navigating pages and the current page indicators;
  • Sorting, specifically snapping back to page 1 upon sort.

The button states aren't tested yet, though this isn't super important I think. What still does need testing is the button set for changing the page size (from clicking on the page rather than calling the enablePagination method).

Regardless, progress :-)

* Sorting is achieved by recreating the data.$records array in a sorted fashion;
* Upon completion, either the first page is shown or the array elements are added to the table;
* data.$records is now always a plain array of <tr> elements.
This suite verifies that pagination can also be enabled after timbles has been initialized.
It verifies this post-init behavior both for pagination as well as sorting.
@jennschiffer
Copy link
Owner

👍

jennschiffer added a commit that referenced this pull request Jan 28, 2016
@jennschiffer jennschiffer merged commit 141b180 into master Jan 28, 2016
@edelooff edelooff deleted the add-pagination-testing branch January 28, 2016 22:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants