added avatars, show user teams in list, new team dashboard widgets (#1150)
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
namespace App\Tests\Controller;
|
||||
|
||||
use App\DataFixtures\UserFixtures;
|
||||
use App\Entity\User;
|
||||
|
||||
/**
|
||||
@@ -29,6 +30,19 @@ class DashboardControllerTest extends ControllerBaseTest
|
||||
$this->assertMainContentClass($client, 'dashboard');
|
||||
}
|
||||
|
||||
public function testIndexActionForUserWithTeams()
|
||||
{
|
||||
$client = self::createClient([], [
|
||||
'PHP_AUTH_USER' => 'test_user_1',
|
||||
'PHP_AUTH_PW' => UserFixtures::DEFAULT_PASSWORD,
|
||||
]);
|
||||
$this->request($client, '/dashboard/');
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
self::assertEquals(1, $client->getCrawler()->filter('section.content .WidgetUserTeams')->count());
|
||||
// team 1 has no project assignment right now
|
||||
self::assertEquals(0, $client->getCrawler()->filter('section.content .WidgetUserTeamProjects')->count());
|
||||
}
|
||||
|
||||
public function testIndexActionForAdmin()
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser(User::ROLE_ADMIN);
|
||||
|
||||
Reference in New Issue
Block a user