support multiple teamleads in each team (#2702)

* fix jumping avatars
* fix line-break after color dot for long names
This commit is contained in:
Kevin Papst
2021-08-07 18:05:41 +02:00
committed by GitHub
parent e9986c92d6
commit b2d3272151
101 changed files with 1952 additions and 649 deletions

View File

@@ -364,11 +364,7 @@ abstract class ControllerBaseTest extends WebTestCase
*/
protected function assertHasFlashSuccess(HttpKernelBrowser $client, string $message = null)
{
$content = $client->getResponse()->getContent();
self::assertStringContainsString('ALERT.success(\'', $content, 'Could not find flash success message');
if (null !== $message) {
self::assertStringContainsString($message, $content);
}
$this->assertHasFlashMessage($client, 'success', $message);
}
/**
@@ -376,10 +372,18 @@ abstract class ControllerBaseTest extends WebTestCase
* @param string|null $message
*/
protected function assertHasFlashError(HttpKernelBrowser $client, string $message = null)
{
$this->assertHasFlashMessage($client, 'error', $message);
}
private function assertHasFlashMessage(HttpKernelBrowser $client, string $type, string $message = null)
{
$content = $client->getResponse()->getContent();
self::assertStringContainsString('ALERT.error(\'', $content, 'Could not find flash error message');
self::assertStringContainsString('ALERT.' . $type . '(\'', $content, 'Could not find flash ' . $type . ' message');
if (null !== $message) {
// this is a lazy workaround, the templates use the javascript escape filter: |e('js')
// if you ever want to test more complex strings, this logic has to be enhanced
$message = str_replace([' ', ':'], ['\u0020', '\u003A'], $message);
self::assertStringContainsString($message, $content);
}
}