feat: paginate the staffing matrix preview
This commit is contained in:
1 parent
c7e0ad67e6
commit
d159cb212c
3 files changed
+36
-5
No files matched your search
@@ -100,6 +100,24 @@ class StaffingRuleControllerTest extends WebTestCase
|
||||
$this->assertStringContainsString('Ski-/Snowboardkurs (pro Stunde)', $content);
|
||||
}
|
||||
|
||||
public function testThePreviewIsPaginated(): void
|
||||
{
|
||||
$this->staffingRule($this->entityManager, 'DKIMP');
|
||||
$this->staffingRule($this->entityManager, 'DGSMP');
|
||||
$this->staffingDestination($this->entityManager, 'DKIMP110127', 'DKIMP');
|
||||
$this->staffingDestination($this->entityManager, 'DGSMP110127', 'DGSMP');
|
||||
$this->entityManager->flush();
|
||||
|
||||
// same date: ordered by product code
|
||||
$this->client->request('GET', '/admin/system/staffing-rule/preview?limit=1&page=2');
|
||||
|
||||
$content = (string) $this->client->getResponse()->getContent();
|
||||
|
||||
$this->assertSame(Response::HTTP_OK, $this->client->getResponse()->getStatusCode());
|
||||
$this->assertStringContainsString('DKIMP110127', $content);
|
||||
$this->assertStringNotContainsString('DGSMP110127', $content);
|
||||
}
|
||||
|
||||
public function testThePreviewDownloadsAsXlsx(): void
|
||||
{
|
||||
$this->staffingRule($this->entityManager, 'DKIMP');
|
||||
|
||||
Reference in new issue
Block a user