fix closing search dropdown (#1142)
* using a different library for javascript selects, fixing the closing search dropdown * fix closing dropdown for daterangepicker * added missing search button for mobile on customer page * fix meta fields with same names than existing columns
This commit is contained in:
@@ -211,7 +211,7 @@ class SystemConfigurationControllerTest extends ControllerBaseTest
|
||||
|
||||
$configService = $client->getContainer()->get(SystemConfiguration::class);
|
||||
$this->assertEquals(false, $configService->find('timesheet.markdown_content'));
|
||||
$this->assertNull($configService->find('theme.select_type'));
|
||||
$this->assertEquals('selectpicker', $configService->find('theme.select_type'));
|
||||
|
||||
$form = $client->getCrawler()->filter('form[name=system_configuration_form_theme]')->form();
|
||||
$client->submit($form, [
|
||||
|
||||
@@ -101,7 +101,7 @@ class AppExtensionTest extends TestCase
|
||||
'kimai.theme' => [
|
||||
'active_warning' => 3,
|
||||
'box_color' => 'green',
|
||||
'select_type' => null,
|
||||
'select_type' => 'selectpicker',
|
||||
'show_about' => true,
|
||||
'chart' => [
|
||||
'background_color' => 'rgba(0,115,183,0.7)',
|
||||
@@ -119,7 +119,7 @@ class AppExtensionTest extends TestCase
|
||||
'auto_reload_datatable' => false,
|
||||
'autocomplete_chars' => 3,
|
||||
],
|
||||
'kimai.theme.select_type' => null,
|
||||
'kimai.theme.select_type' => 'selectpicker',
|
||||
'kimai.theme.show_about' => true,
|
||||
'kimai.fosuser' => [
|
||||
'registration' => true,
|
||||
|
||||
@@ -279,7 +279,7 @@ class ConfigurationTest extends TestCase
|
||||
'theme' => [
|
||||
'active_warning' => 3,
|
||||
'box_color' => 'green',
|
||||
'select_type' => null,
|
||||
'select_type' => 'selectpicker',
|
||||
'auto_reload_datatable' => false,
|
||||
'show_about' => true,
|
||||
'chart' => [
|
||||
|
||||
36
tests/Event/ConfigureMainMenuEventTest.php
Normal file
36
tests/Event/ConfigureMainMenuEventTest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Event;
|
||||
|
||||
use App\Event\ConfigureMainMenuEvent;
|
||||
use KevinPapst\AdminLTEBundle\Event\SidebarMenuEvent;
|
||||
use KevinPapst\AdminLTEBundle\Model\MenuItemModel;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
/**
|
||||
* @covers \App\Event\ConfigureMainMenuEvent
|
||||
*/
|
||||
class ConfigureMainMenuEventTest extends TestCase
|
||||
{
|
||||
public function testGetterAndSetter()
|
||||
{
|
||||
$request = new Request();
|
||||
$event = new SidebarMenuEvent();
|
||||
$admin = new MenuItemModel('admin', 'admin', 'admin');
|
||||
$system = new MenuItemModel('system', 'system', 'system');
|
||||
$sut = new ConfigureMainMenuEvent($request, $event, $admin, $system);
|
||||
|
||||
self::assertSame($request, $sut->getRequest());
|
||||
self::assertSame($event, $sut->getMenu());
|
||||
self::assertSame($admin, $sut->getAdminMenu());
|
||||
self::assertSame($system, $sut->getSystemMenu());
|
||||
}
|
||||
}
|
||||
37
tests/Event/SystemConfigurationEventTest.php
Normal file
37
tests/Event/SystemConfigurationEventTest.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Event;
|
||||
|
||||
use App\Entity\Configuration;
|
||||
use App\Event\SystemConfigurationEvent;
|
||||
use App\Form\Model\SystemConfiguration;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Event\SystemConfigurationEvent
|
||||
*/
|
||||
class SystemConfigurationEventTest extends TestCase
|
||||
{
|
||||
public function testDefaultValues()
|
||||
{
|
||||
$sut = new SystemConfigurationEvent([]);
|
||||
self::assertIsArray($sut->getConfigurations());
|
||||
self::assertEmpty($sut->getConfigurations());
|
||||
self::assertInstanceOf(SystemConfigurationEvent::class, $sut->addConfiguration(new SystemConfiguration()));
|
||||
self::assertCount(1, $sut->getConfigurations());
|
||||
|
||||
$config = new Configuration();
|
||||
$config->setName('foo')->setValue('bar');
|
||||
$sysConfig = new SystemConfiguration();
|
||||
$sysConfig->setConfiguration([$config]);
|
||||
$sut = new SystemConfigurationEvent([$sysConfig]);
|
||||
self::assertEquals([$sysConfig], $sut->getConfigurations());
|
||||
}
|
||||
}
|
||||
34
tests/Event/UserPreferenceDisplayEventTest.php
Normal file
34
tests/Event/UserPreferenceDisplayEventTest.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Event;
|
||||
|
||||
use App\Entity\UserPreference;
|
||||
use App\Event\UserPreferenceDisplayEvent;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @covers \App\Event\UserPreferenceDisplayEvent
|
||||
*/
|
||||
class UserPreferenceDisplayEventTest extends TestCase
|
||||
{
|
||||
public function testGetterAndSetter()
|
||||
{
|
||||
$sut = new UserPreferenceDisplayEvent('blub');
|
||||
self::assertEquals('blub', $sut->getLocation());
|
||||
self::assertIsArray($sut->getPreferences());
|
||||
self::assertEmpty($sut->getPreferences());
|
||||
|
||||
$preference = new UserPreference();
|
||||
$preference->setName('foo')->setValue('bar');
|
||||
$sut->addPreference($preference);
|
||||
|
||||
self::assertEquals([$preference], $sut->getPreferences());
|
||||
}
|
||||
}
|
||||
29
tests/Repository/Query/TagFormTypeQueryTest.php
Normal file
29
tests/Repository/Query/TagFormTypeQueryTest.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Tests\Repository\Query;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Repository\Query\TagFormTypeQuery;
|
||||
|
||||
/**
|
||||
* @covers \App\Repository\Query\TagFormTypeQuery
|
||||
*/
|
||||
class TagFormTypeQueryTest extends BaseQueryTest
|
||||
{
|
||||
public function testQuery()
|
||||
{
|
||||
$sut = new TagFormTypeQuery();
|
||||
|
||||
$user = new User();
|
||||
self::assertNull($sut->getUser());
|
||||
self::assertInstanceOf(TagFormTypeQuery::class, $sut->setUser($user));
|
||||
self::assertSame($user, $sut->getUser());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user