configure display of customer, project and activity in dropdown lists (#3151)

This commit is contained in:
Kevin Papst
2022-02-14 17:43:05 +01:00
committed by GitHub
parent 83a894823f
commit 7da7468965
17 changed files with 508 additions and 40 deletions

View File

@@ -43,6 +43,29 @@ class CustomerControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$this->assertAccessIsGranted($client, '/admin/customer/');
$this->assertHasDataTable($client);
$this->assertPageActions($client, [
'search' => '#',
'visibility' => '#',
'download toolbar-action' => $this->createUrl('/admin/customer/export'),
'help' => 'https://www.kimai.org/documentation/customer.html'
]);
}
public function testIndexActionAsSuperAdmin()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$this->assertAccessIsGranted($client, '/admin/customer/');
$this->assertHasDataTable($client);
$this->assertPageActions($client, [
'search' => '#',
'visibility' => '#',
'download toolbar-action' => $this->createUrl('/admin/customer/export'),
'create modal-ajax-form' => $this->createUrl('/admin/customer/create'),
'settings modal-ajax-form' => $this->createUrl('/admin/system-config/edit/customer'),
'help' => 'https://www.kimai.org/documentation/customer.html'
]);
}
public function testIndexActionWithSearchTermQuery()
@@ -61,6 +84,14 @@ class CustomerControllerTest extends ControllerBaseTest
$this->assertAccessIsGranted($client, '/admin/customer/');
$this->assertPageActions($client, [
'search' => '#',
'visibility' => '#',
'download toolbar-action' => $this->createUrl('/admin/customer/export'),
'create modal-ajax-form' => $this->createUrl('/admin/customer/create'),
'help' => 'https://www.kimai.org/documentation/customer.html'
]);
$form = $client->getCrawler()->filter('form.searchform')->form();
$client->submit($form, [
'searchTerm' => 'feature:timetracking foo',