prepare release 1.13 (#2290)
* make voters a final class * upgrade dependencies * sort project alphabetically in dashboard widget * open detail page on row click * do not break on null tag name * added max height to scrollable widgets on dashboard * added timesheet duplicate event * allow to deactivate browser title update * improve comment box * moved role permissions to own menu * removed tabs in user screen * fix user can remove super-admin from own account
This commit is contained in:
@@ -93,32 +93,20 @@ class ProfileControllerTest extends ControllerBaseTest
|
||||
|
||||
public function getTabTestData()
|
||||
{
|
||||
$userTabs = ['#settings', '#password', '#api-token'];
|
||||
|
||||
return [
|
||||
[User::ROLE_USER, UserFixtures::USERNAME_USER, ['#settings', '#password', '#api-token']],
|
||||
[User::ROLE_SUPER_ADMIN, UserFixtures::USERNAME_SUPER_ADMIN, array_merge($userTabs, ['#teams', '#roles'])],
|
||||
[User::ROLE_USER, UserFixtures::USERNAME_USER],
|
||||
[User::ROLE_SUPER_ADMIN, UserFixtures::USERNAME_SUPER_ADMIN],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider getTabTestData
|
||||
*/
|
||||
public function testEditActionTabs($role, $username, $expectedTabs)
|
||||
public function testEditActionTabs($role, $username)
|
||||
{
|
||||
$client = $this->getClientForAuthenticatedUser($role);
|
||||
$this->request($client, '/profile/' . $username . '/edit');
|
||||
$this->assertTrue($client->getResponse()->isSuccessful());
|
||||
|
||||
$tabs = $client->getCrawler()->filter('div.nav-tabs-custom ul.nav-tabs li');
|
||||
$this->assertEquals(\count($expectedTabs), $tabs->count());
|
||||
$foundTabs = [];
|
||||
|
||||
/** @var \DOMElement $tab */
|
||||
foreach ($tabs->filter('a') as $tab) {
|
||||
$foundTabs[] = $tab->getAttribute('href');
|
||||
}
|
||||
$this->assertEmpty(array_diff($expectedTabs, $foundTabs));
|
||||
}
|
||||
|
||||
public function testIndexActionWithDifferentUsername()
|
||||
|
||||
Reference in New Issue
Block a user