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

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