Merge remote-tracking branch 'origin/feature/kleingrafiken-symbole-tags' into HEAD
Deploy Test / test (push) Successful in 2m27s
Deploy Test / deploy (push) Successful in 28s

This commit is contained in:
Lars committed 2026-11-23 17:16:38 +01:00
commit ad03eee41f
124 files changed
+839 -2

No files matched your search

+3 -1
View File
@@ -188,7 +188,9 @@ public function test_media_card_is_public_only_as_part_of_a_public_program_and_n
// Material: eigene Darstellung mit Materialsymbol.
$this->assertStringContainsString('lf-pc lf-pc--material', $main);
$this->assertStringContainsString('lf-pc__panel lf-pc__panel--material', $main);
$this->assertStringContainsString('<p class="lf-pc__kind">Merkblatt</p>', $main);
// Ausgabeklasse pdf: die Art steht als PDF-Tag, die Beschriftung bleibt die redaktionelle Art.
$this->assertStringContainsString('brand-tag brand-tag--pdf', $main);
$this->assertMatchesRegularExpression('#<span class="brand-tag__text">\s*Merkblatt\s*</span>#', $main);
$this->assertStringContainsString('Ein Blatt für Eltern.', $main);
// Vertraulich und nicht öffentlich genannt: öffentlich nicht sichtbar.
$this->assertStringNotContainsString('Traineranleitung Abstand', $main, 'Traineranleitungen erscheinen nie öffentlich.');
@@ -84,6 +84,19 @@ public function test_a_released_website_film_shows_publicly_with_its_clip_and_wi
$this->assertStringNotContainsString('originals/', $html);
}
public function test_a_film_card_shows_its_kind_as_a_film_tag_with_text(): void
{
$teaser = $this->websiteFilm('Teaser Denkpause');
$this->release($teaser);
$this->publish('/teaser-tag', $teaser);
$html = $this->get('/teaser-tag')->assertOk()->getContent();
$this->assertStringContainsString('brand-tag brand-tag--film', $html);
$this->assertMatchesRegularExpression('#<span class="brand-tag__text">\s*Film\s*</span>#', $html, 'Das Tag trägt echten Text.');
$this->assertSame(1, substr_count($html, 'lf-pc__kind--tag'));
}
public function test_an_unreleased_website_film_stays_out_of_the_public_page_but_shows_in_the_preview(): void
{
$teaser = $this->websiteFilm('Teaser Denkpause');
+72
View File
@@ -0,0 +1,72 @@
<?php
namespace Tests\Feature;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
/**
* Favicon des Brand-Kits (15_Lara-Felix-Favicon). Der eigentliche Fehler war eine leere public/favicon.ico:
* Browser fragen sie selbst ab und bekamen nichts.
*/
class FaviconTest extends TestCase
{
use RefreshDatabase;
public function test_the_icon_files_are_real_and_not_empty(): void
{
$ico = file_get_contents(public_path('favicon.ico'));
$this->assertGreaterThan(1000, strlen($ico));
$this->assertSame("\x00\x00\x01\x00", substr($ico, 0, 4), 'favicon.ico ist keine ICO-Datei');
$svg = file_get_contents(public_path('favicon.svg'));
$this->assertStringContainsString('<svg', $svg);
$this->assertStringContainsString('Lara &amp; Felix', $svg);
$png = file_get_contents(public_path('apple-touch-icon.png'));
$this->assertSame("\x89PNG", substr($png, 0, 4));
}
public function test_public_pages_link_the_icons(): void
{
$this->get('/')->assertOk()
->assertSee('href="'.asset('favicon.ico').'" sizes="any"', false)
->assertSee('href="'.asset('favicon.svg').'" type="image/svg+xml"', false)
->assertSee('rel="apple-touch-icon" href="'.asset('apple-touch-icon.png').'"', false);
}
public function test_the_sign_in_page_links_the_icons(): void
{
$this->get(route('login'))->assertOk()
->assertSee(asset('favicon.svg'), false);
}
public function test_the_member_area_links_the_icons(): void
{
$this->actingAs(User::factory()->create())
->get(route('member.dashboard'))
->assertOk()
->assertSee(asset('favicon.svg'), false)
->assertSee(asset('apple-touch-icon.png'), false);
}
public function test_the_administration_login_uses_the_favicon(): void
{
$this->get('/verwaltung/login')->assertOk()
->assertSee('rel="icon" href="'.asset('favicon.svg').'"', false)
->assertSee('rel="apple-touch-icon"', false);
}
public function test_the_administration_icon_follows_the_opened_address_behind_a_proxy(): void
{
config(['app.url' => 'https://CHANGE-ME.example']);
$this->withHeaders(['X-Forwarded-Host' => '', 'X-Forwarded-Port' => '', 'X-Forwarded-Proto' => ''])
->get('http://192.168.2.144:3011/verwaltung/login')
->assertOk()
->assertSee('href="http://192.168.2.144:3011/favicon.svg"', false)
->assertSee('href="http://192.168.2.144:3011/apple-touch-icon.png"', false)
->assertDontSee('CHANGE-ME.example');
}
}