limit amount of items in calendar drag and drop boxes (#2291)

This commit is contained in:
Kevin Papst
2021-07-11 15:03:18 +02:00
committed by GitHub
parent 2583fdf20e
commit a1f90ffaba
13 changed files with 178 additions and 82 deletions

View File

@@ -128,6 +128,19 @@ class ConfigurationTest extends TestCase
$this->assertConfig($config, []);
}
public function testValidateCalendarDragDropMaxEntries()
{
$this->expectException(InvalidConfigurationException::class);
$this->expectExceptionMessage('Invalid configuration for path "kimai.calendar.dragdrop_amount": The dragdrop_amount must be between 0 and 20');
$config = $this->getMinConfig();
$config['calendar'] = [
'dragdrop_amount' => 50,
];
$this->assertConfig($config, []);
}
public function testValidateLdapFilterInvalidParenthesisCounter()
{
$this->expectException(InvalidConfigurationException::class);
@@ -346,6 +359,7 @@ class ConfigurationTest extends TestCase
],
],
'weekends' => true,
'dragdrop_amount' => 10,
],
'theme' => [
'active_warning' => 3,