Skip to content

Commit 99a5e20

Browse files
authored
Add Tests for Pagination UpdatedPerPage (rappasoft#2048)
* Remove Waiting For Tests ---------
1 parent c8b7b4e commit 99a5e20

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.github/workflows/run-tests-pcov-pull.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,6 @@ jobs:
2626
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pcov,pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
2727

2828
steps:
29-
- name: Wait for tests to finish
30-
uses: lewagon/[email protected]
31-
with:
32-
ref: ${{ github.ref }}
33-
running-workflow-name: 'Run Tests Pull'
34-
repo-token: ${{ secrets.GITHUB_TOKEN }}
35-
wait-interval: 20
36-
3729
- name: Checkout code
3830
uses: actions/checkout@v4
3931

@@ -100,7 +92,7 @@ jobs:
10092
env:
10193
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
10294
with:
103-
token: ${{ secrets.CODE_COV_TOKEN }}
95+
token: ${{ secrets.CODECOV_TOKEN }}
10496
files: ./coverage.xml
10597
verbose: true
10698

tests/Unit/Traits/Helpers/PaginationHelpersTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,17 @@ public function test_can_get_pagination_wrapper_attributes_bag(): void
202202
$this->assertSame((new \Illuminate\View\ComponentAttributeBag(['class' => 'text-lg', 'testval' => '123']))->getAttributes(), $this->basicTable->getPaginationWrapperAttributesBag()->getAttributes());
203203

204204
}
205+
206+
public function test_check_updated_per_page_returns_correctly(): void
207+
{
208+
$rows = $this->basicTable->getRows();
209+
$this->basicTable->setPerPageAccepted([5, 10, 15, 25, 50]);
210+
211+
$this->basicTable->setPerPage(5);
212+
$this->assertSame(5, $this->basicTable->getPerPage());
213+
214+
$this->basicTable->updatedPerPage(15);
215+
$this->assertSame(15, $this->basicTable->getPerPage());
216+
217+
}
205218
}

0 commit comments

Comments
 (0)