UI updates - new user menu, updated about and profile screen and more (#723)

This commit is contained in:
Kevin Papst
2019-04-25 17:50:28 +02:00
committed by GitHub
parent 28801bf1ea
commit 56fe14c451
83 changed files with 1067 additions and 1089 deletions

View File

@@ -7,12 +7,11 @@
* file that was distributed with this source code.
*/
namespace App\Tests\Controller\Admin;
namespace App\Tests\Controller;
use App\Entity\Timesheet;
use App\Entity\User;
use App\Form\Type\DateRangeType;
use App\Tests\Controller\ControllerBaseTest;
use App\Tests\DataFixtures\TimesheetFixtures;
/**
@@ -48,19 +47,20 @@ class TimesheetTeamControllerTest extends ControllerBaseTest
public function testIndexActionWithQuery()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$start = new \DateTime('first day of this month');
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $this->getUserByRole($em, User::ROLE_USER);
$fixture = new TimesheetFixtures();
$fixture->setAmount(10);
$fixture->setUser($user);
$fixture->setStartDate(new \DateTime('-10 days'));
$fixture->setStartDate($start);
$this->importFixture($em, $fixture);
$this->request($client, '/team/timesheet/');
$this->assertTrue($client->getResponse()->isSuccessful());
$dateRange = (new \DateTime('-10 days'))->format('Y-m-d') . DateRangeType::DATE_SPACER . (new \DateTime())->format('Y-m-d');
$dateRange = ($start)->format('Y-m-d') . DateRangeType::DATE_SPACER . (new \DateTime('last day of this month'))->format('Y-m-d');
$form = $client->getCrawler()->filter('form.navbar-form')->form();
$client->submit($form, [