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

@@ -37,4 +37,25 @@ class DashboardControllerTest extends ControllerBaseTest
$this->assertTrue($client->getResponse()->isSuccessful());
$this->assertMainContentClass($client, 'dashboard');
}
/**
* This is not a test for the dashbaord, but for the general layout
*/
public function testUserMenuIsAvailable()
{
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$em = $client->getContainer()->get('doctrine.orm.entity_manager');
$user = $this->getUserByRole($em, User::ROLE_USER);
$this->request($client, '/dashboard/');
$this->assertTrue($client->getResponse()->isSuccessful());
$content = $client->getResponse()->getContent();
$this->assertContains('<li class="dropdown user-menu">', $content);
$this->assertContains('<a href="/en/profile/' . $user->getUsername() . '">', $content);
$this->assertContains('<a href="/en/profile/' . $user->getUsername() . '/prefs">', $content);
$this->assertContains('<a href="/en/logout">', $content);
}
}