added project detail report (#2651)

- avatars via css only
- random colors for entities
- improves print view
- added colors for teams
- added color to tag
This commit is contained in:
Kevin Papst
2021-07-06 22:01:20 +02:00
committed by GitHub
parent cc6031bfde
commit 9ddb87a6fd
122 changed files with 2736 additions and 1549 deletions

View File

@@ -60,11 +60,11 @@ class ActivityTest extends TestCase
$this->assertEquals('hello world', $sut->getComment());
self::assertFalse($sut->hasColor());
$this->assertInstanceOf(Activity::class, $sut->setColor('#fffccc'));
$sut->setColor('#fffccc');
$this->assertEquals('#fffccc', $sut->getColor());
self::assertTrue($sut->hasColor());
$this->assertInstanceOf(Activity::class, $sut->setColor(Constants::DEFAULT_COLOR));
$sut->setColor(Constants::DEFAULT_COLOR);
$this->assertNull($sut->getColor());
self::assertFalse($sut->hasColor());

View File

@@ -74,11 +74,11 @@ class CustomerTest extends TestCase
self::assertEquals('hello world', $sut->getComment());
self::assertFalse($sut->hasColor());
self::assertInstanceOf(Customer::class, $sut->setColor('#fffccc'));
$sut->setColor('#fffccc');
self::assertEquals('#fffccc', $sut->getColor());
self::assertTrue($sut->hasColor());
self::assertInstanceOf(Customer::class, $sut->setColor(Constants::DEFAULT_COLOR));
$sut->setColor(Constants::DEFAULT_COLOR);
self::assertNull($sut->getColor());
self::assertFalse($sut->hasColor());

View File

@@ -85,11 +85,11 @@ class ProjectTest extends TestCase
self::assertEquals('a comment', $sut->getComment());
self::assertFalse($sut->hasColor());
self::assertInstanceOf(Project::class, $sut->setColor('#fffccc'));
$sut->setColor('#fffccc');
self::assertEquals('#fffccc', $sut->getColor());
self::assertTrue($sut->hasColor());
self::assertInstanceOf(Project::class, $sut->setColor(Constants::DEFAULT_COLOR));
$sut->setColor(Constants::DEFAULT_COLOR);
self::assertNull($sut->getColor());
self::assertFalse($sut->hasColor());

View File

@@ -37,7 +37,7 @@ class TagTest extends TestCase
$sut->setName(null);
$this->assertNull($sut->getName());
$this->assertInstanceOf(Tag::class, $sut->setColor('#fffccc'));
$sut->setColor('#fffccc');
$this->assertEquals('#fffccc', $sut->getColor());
}

View File

@@ -9,6 +9,7 @@
namespace App\Tests\Entity;
use App\Constants;
use App\Entity\Activity;
use App\Entity\Customer;
use App\Entity\Project;
@@ -38,6 +39,21 @@ class TeamTest extends TestCase
self::assertEquals(0, $sut->getActivities()->count());
}
public function testColor()
{
$sut = new Team();
self::assertNull($sut->getColor());
self::assertFalse($sut->hasColor());
$sut->setColor(Constants::DEFAULT_COLOR);
self::assertNull($sut->getColor());
self::assertFalse($sut->hasColor());
$sut->setColor('#000000');
self::assertEquals('#000000', $sut->getColor());
self::assertTrue($sut->hasColor());
}
public function testSetterAndGetter()
{
$sut = new Team();

View File

@@ -9,6 +9,7 @@
namespace App\Tests\Entity;
use App\Constants;
use App\Entity\Team;
use App\Entity\User;
use App\Entity\UserPreference;
@@ -60,6 +61,21 @@ class UserTest extends TestCase
self::assertEquals('Mr. Code Blaster', $user->getTitle());
}
public function testColor()
{
$sut = new User();
self::assertNull($sut->getColor());
self::assertFalse($sut->hasColor());
$sut->setColor(Constants::DEFAULT_COLOR);
self::assertNull($sut->getColor());
self::assertFalse($sut->hasColor());
$sut->setColor('#000000');
self::assertEquals('#000000', $sut->getColor());
self::assertTrue($sut->hasColor());
}
public function testAuth()
{
$user = new User();
@@ -317,6 +333,7 @@ class UserTest extends TestCase
['label.active', 'boolean'],
['profile.registration_date', 'datetime'],
['label.roles', 'array'],
['label.color', 'string'],
];
self::assertCount(\count($expected), $columns);