configure display of customer, project and activity in dropdown lists (#3151)
This commit is contained in:
@@ -41,6 +41,30 @@ class ActivityControllerTest extends ControllerBaseTest
|
||||
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
|
||||
$this->assertAccessIsGranted($client, '/admin/activity/');
|
||||
$this->assertHasDataTable($client);
|
||||
|
||||
$this->assertPageActions($client, [
|
||||
'search' => '#',
|
||||
'visibility' => '#',
|
||||
'download toolbar-action' => $this->createUrl('/admin/activity/export'),
|
||||
'create modal-ajax-form' => $this->createUrl('/admin/activity/create'),
|
||||
'help' => 'https://www.kimai.org/documentation/activity.html'
|
||||
]);
|
||||
}
|
||||
|
||||
public function testIndexActionAsSuperAdmin()
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
|
||||
$this->assertAccessIsGranted($client, '/admin/activity/');
|
||||
$this->assertHasDataTable($client);
|
||||
|
||||
$this->assertPageActions($client, [
|
||||
'search' => '#',
|
||||
'visibility' => '#',
|
||||
'download toolbar-action' => $this->createUrl('/admin/activity/export'),
|
||||
'create modal-ajax-form' => $this->createUrl('/admin/activity/create'),
|
||||
'settings modal-ajax-form' => $this->createUrl('/admin/system-config/edit/activity'),
|
||||
'help' => 'https://www.kimai.org/documentation/activity.html'
|
||||
]);
|
||||
}
|
||||
|
||||
public function testIndexActionWithSearchTermQuery()
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -76,6 +76,8 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
|
||||
['form[name=system_configuration_form_authentication]', $this->createUrl('/admin/system-config/update/authentication')],
|
||||
['form[name=system_configuration_form_rounding]', $this->createUrl('/admin/system-config/update/rounding')],
|
||||
['form[name=system_configuration_form_customer]', $this->createUrl('/admin/system-config/update/customer')],
|
||||
['form[name=system_configuration_form_project]', $this->createUrl('/admin/system-config/update/project')],
|
||||
['form[name=system_configuration_form_activity]', $this->createUrl('/admin/system-config/update/activity')],
|
||||
['form[name=system_configuration_form_user]', $this->createUrl('/admin/system-config/update/user')],
|
||||
['form[name=system_configuration_form_theme]', $this->createUrl('/admin/system-config/update/theme')],
|
||||
['form[name=system_configuration_form_calendar]', $this->createUrl('/admin/system-config/update/calendar')],
|
||||
|
||||
Reference in New Issue
Block a user