0
0
Fork 0
mirror of https://github.com/kevinpapst/kimai2.git synced 2025-04-03 21:15:26 +00:00
This commit is contained in:
Kevin Papst 2021-11-11 16:56:52 +01:00
parent 615b105915
commit b37318fafd
11 changed files with 43 additions and 43 deletions

View file

@ -57,7 +57,7 @@ class ProjectDateRangeControllerTest extends ControllerBaseTest
$this->importFixture($timesheets);
$this->assertAccessIsGranted($client, '/reporting/project_daterange');
self::assertStringContainsString('<div class="box-body project_daterange_reporting-box', $client->getResponse()->getContent());
self::assertStringContainsString('<div class=" card-body project_daterange_reporting-box', $client->getResponse()->getContent());
$rows = $client->getCrawler()->filterXPath("//table[contains(@class, 'dataTable')]/tbody/tr[not(@class='summary')]");
self::assertGreaterThan(0, $rows->count());
}

View file

@ -53,7 +53,7 @@ class ProjectInactiveControllerTest extends ControllerBaseTest
$this->importFixture($timesheets);
$this->assertAccessIsGranted($client, '/reporting/project_inactive');
self::assertStringContainsString('<div class="box-body inactive_project_reporting-box', $client->getResponse()->getContent());
self::assertStringContainsString('<div class=" card-body inactive_project_reporting-box', $client->getResponse()->getContent());
$rows = $client->getCrawler()->filterXPath("//table[contains(@class, 'dataTable')]/tbody/tr[not(@class='summary')]");
self::assertGreaterThan(0, $rows->count());
}

View file

@ -53,7 +53,7 @@ class ProjectViewControllerTest extends ControllerBaseTest
$this->importFixture($timesheets);
$this->assertAccessIsGranted($client, '/reporting/project_view');
self::assertStringContainsString('<div class="box-body project_view_reporting-box', $client->getResponse()->getContent());
self::assertStringContainsString('<div class=" card-body project_view_reporting-box', $client->getResponse()->getContent());
$rows = $client->getCrawler()->filterXPath("//table[contains(@class, 'dataTable')]/tbody/tr[not(@class='summary')]");
self::assertGreaterThan(0, $rows->count());
}

View file

@ -43,7 +43,7 @@ class ReportByUserControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_SUPER_ADMIN);
$this->importReportingFixture(User::ROLE_SUPER_ADMIN);
$this->assertAccessIsGranted($client, '/reporting/week_by_user?user=4&date=12999119191');
self::assertStringContainsString('<div class="box-body user-week-reporting-box', $client->getResponse()->getContent());
self::assertStringContainsString('<div class=" card-body user-week-reporting-box', $client->getResponse()->getContent());
$option = $client->getCrawler()->filterXPath("//select[@id='user']/option[@selected]");
self::assertEquals(4, $option->attr('value'));
}
@ -53,7 +53,7 @@ class ReportByUserControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_USER);
$this->importReportingFixture(User::ROLE_USER);
$this->assertAccessIsGranted($client, '/reporting/month_by_user?user=4&date=12999119191');
self::assertStringContainsString('<div class="box-body user-month-reporting-box', $client->getResponse()->getContent());
self::assertStringContainsString('<div class=" card-body user-month-reporting-box', $client->getResponse()->getContent());
$select = $client->getCrawler()->filterXPath("//select[@id='user']");
self::assertEquals(0, $select->count());
}

View file

@ -63,7 +63,7 @@ class ReportUsersListControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$this->importReportingFixture(User::ROLE_TEAMLEAD);
$this->assertAccessIsGranted($client, '/reporting/yearly_users_list');
self::assertStringContainsString('<div class="box-body yearly-user-list-reporting-box', $client->getResponse()->getContent());
self::assertStringContainsString('<div class=" card-body yearly-user-list-reporting-box', $client->getResponse()->getContent());
$select = $client->getCrawler()->filterXPath("//select[@id='user']");
self::assertEquals(0, $select->count());
}
@ -73,7 +73,7 @@ class ReportUsersListControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$this->importReportingFixture(User::ROLE_TEAMLEAD);
$this->assertAccessIsGranted($client, '/reporting/weekly_users_list');
self::assertStringContainsString('<div class="box-body weekly-user-list-reporting-box', $client->getResponse()->getContent());
self::assertStringContainsString('<div class=" card-body weekly-user-list-reporting-box', $client->getResponse()->getContent());
$select = $client->getCrawler()->filterXPath("//select[@id='user']");
self::assertEquals(0, $select->count());
}
@ -83,7 +83,7 @@ class ReportUsersListControllerTest extends ControllerBaseTest
$client = $this->getClientForAuthenticatedUser(User::ROLE_TEAMLEAD);
$this->importReportingFixture(User::ROLE_TEAMLEAD);
$this->assertAccessIsGranted($client, '/reporting/monthly_users_list');
self::assertStringContainsString('<div class="box-body monthly-user-list-reporting-box', $client->getResponse()->getContent());
self::assertStringContainsString('<div class=" card-body monthly-user-list-reporting-box', $client->getResponse()->getContent());
$select = $client->getCrawler()->filterXPath("//select[@id='user']");
self::assertEquals(0, $select->count());
}

View file

@ -115,36 +115,36 @@ class ThemeEventExtensionTest extends TestCase
public function getProgressbarColors()
{
yield ['progress-bar-danger', 100, false];
yield ['progress-bar-danger', 91, false];
yield ['progress-bar-warning', 90, false];
yield ['progress-bar-warning', 80, false];
yield ['progress-bar-warning', 71, false];
yield ['progress-bar-success', 70, false];
yield ['progress-bar-success', 60, false];
yield ['progress-bar-success', 51, false];
yield ['progress-bar-primary', 50, false];
yield ['progress-bar-primary', 40, false];
yield ['progress-bar-primary', 31, false];
yield ['progress-bar-info', 30, false];
yield ['progress-bar-info', 20, false];
yield ['progress-bar-info', 10, false];
yield ['progress-bar-info', 0, false];
yield ['progress-bar-primary', 100, true];
yield ['progress-bar-primary', 91, true];
yield ['progress-bar-success', 90, true];
yield ['progress-bar-success', 80, true];
yield ['progress-bar-success', 71, true];
yield ['progress-bar-warning', 70, true];
yield ['progress-bar-warning', 60, true];
yield ['progress-bar-warning', 51, true];
yield ['progress-bar-danger', 50, true];
yield ['progress-bar-danger', 40, true];
yield ['progress-bar-danger', 31, true];
yield ['progress-bar-info', 30, true];
yield ['progress-bar-info', 20, true];
yield ['progress-bar-info', 10, true];
yield ['progress-bar-info', 0, true];
yield ['bg-red', 100, false];
yield ['bg-red', 91, false];
yield ['bg-warning', 90, false];
yield ['bg-warning', 80, false];
yield ['bg-warning', 71, false];
yield ['bg-green', 70, false];
yield ['bg-green', 60, false];
yield ['bg-green', 51, false];
yield ['bg-green', 50, false];
yield ['bg-green', 40, false];
yield ['bg-green', 31, false];
yield ['', 30, false];
yield ['', 20, false];
yield ['', 10, false];
yield ['', 0, false];
yield ['bg-green', 100, true];
yield ['bg-green', 91, true];
yield ['bg-green', 90, true];
yield ['bg-green', 80, true];
yield ['bg-green', 71, true];
yield ['bg-warning', 70, true];
yield ['bg-warning', 60, true];
yield ['bg-warning', 51, true];
yield ['bg-red', 50, true];
yield ['bg-red', 40, true];
yield ['bg-red', 31, true];
yield ['', 30, true];
yield ['', 20, true];
yield ['', 10, true];
yield ['', 0, true];
}
/**

View file

@ -37,7 +37,7 @@ class ActiveUsersYearTest extends AbstractWidgetTypeTest
{
return [
'dataType' => 'int',
'icon' => 'user',
'icon' => 'users',
'color' => 'yellow',
];
}

View file

@ -53,7 +53,7 @@ class TotalsActivityTest extends AbstractWidgetTypeTest
return [
'route' => 'admin_activity',
'icon' => 'activity',
'color' => 'primary',
'color' => 'red',
'dataType' => 'int',
'user' => $this->user,
];

View file

@ -53,7 +53,7 @@ class TotalsCustomerTest extends AbstractWidgetTypeTest
return [
'route' => 'admin_customer',
'icon' => 'customer',
'color' => 'primary',
'color' => 'red',
'dataType' => 'int',
'user' => $this->user,
];

View file

@ -53,7 +53,7 @@ class TotalsProjectTest extends AbstractWidgetTypeTest
return [
'route' => 'admin_project',
'icon' => 'project',
'color' => 'primary',
'color' => 'red',
'dataType' => 'int',
'user' => $this->user,
];

View file

@ -53,7 +53,7 @@ class TotalsUserTest extends AbstractWidgetTypeTest
return [
'route' => 'admin_user',
'icon' => 'user',
'color' => 'primary',
'color' => 'red',
'dataType' => 'int',
'user' => $this->user,
];