Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3 - Missing Tests - Pagination Related Tests #1363

Merged
merged 2 commits into from
Sep 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to `laravel-livewire-tables` will be documented in this file

## [Unreleased] - 3.x - Missing pagination tests
- Add missing pagination tests

## [Unreleased] - 3.x - Beta Fixes (beta-1)
- Removal of setSearchLazy
- Fix for setSearchDebounce
Expand Down
14 changes: 14 additions & 0 deletions tests/Traits/Helpers/PaginationHelpersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,18 @@ public function can_check_and_set_pagination_method(): void

$this->assertTrue($this->basicTable->isPaginationMethod('standard'));
}

/** @test */
public function can_check_per_page_displayed_item_count(): void
{
$this->assertSame(5, $this->basicTable->getPerPageDisplayedItemCount());

}

/** @test */
public function can_check_per_page_displayed_items(): void
{
$this->assertSame([1, 2, 3, 4, 5], $this->basicTable->getPerPageDisplayedItemIds());

}
}