Theme Seebad 0.4.0: menu panels; fix missing chevron icons; render test for all themes
- Menu panels: arrow next to each main menu item opens a panel with the page description (SEO text), jump links to the headed sections and a cartouche with booking and phone; Escape/outside click closes, focus returns; without JavaScript the menu stays plain links - Header: booking button hidden between 1280 and 1535 px (too narrow with the arrows), desktop phone removed - Fix: offers carousel and menu used outline chevron icons that do not exist (500 as soon as offers are shown); now mini chevrons - New test: every installed theme renders all pages with reviews and offers in every display mode - Wish: menu photo per page (ZUSAMMENARBEIT §5) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d9e52c4789
commit
d2f53ceb84
7 files changed
+178
-15
No files matched your search
@@ -0,0 +1,65 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Enums\ReviewStatus;
|
||||
use App\Models\Page;
|
||||
use App\Models\Property;
|
||||
use App\Models\Review;
|
||||
use App\Models\Site;
|
||||
use App\Models\SpecialOffer;
|
||||
use App\Themes\ThemeRegistry;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Database\Seeders\PropertySeeder;
|
||||
use Database\Seeders\SiteSeeder;
|
||||
use Database\Seeders\WebsiteContentSeeder;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
/**
|
||||
* Every installed theme must render every page with real content in every display mode – a template that only
|
||||
* breaks when data exists (e.g. offers shown as a carousel) would otherwise go unnoticed until it is live.
|
||||
*/
|
||||
class InstalledThemesRenderTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
private const PAGES = ['/', '/wohnung', '/kuehlungsborn', '/buchen', '/kontakt', '/impressum', '/datenschutz'];
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
|
||||
$this->travelTo(CarbonImmutable::parse('2026-10-22 10:00'));
|
||||
$this->seed([PropertySeeder::class, WebsiteContentSeeder::class, SiteSeeder::class]);
|
||||
$this->withoutVite();
|
||||
|
||||
$property = Property::sole();
|
||||
Review::factory()->for($property)->count(2)->create(['status' => ReviewStatus::Approved]);
|
||||
SpecialOffer::factory()->for($property)->create(['name' => 'Herbstwochen', 'is_featured' => true]);
|
||||
SpecialOffer::factory()->for($property)->create(['name' => 'Ab 5 Nächten', 'min_nights' => 5]);
|
||||
}
|
||||
|
||||
public function test_every_installed_theme_renders_all_pages_with_offers_in_every_display_mode(): void
|
||||
{
|
||||
$site = Site::sole();
|
||||
$home = Page::query()->where('slug', Page::HOME)->sole();
|
||||
|
||||
foreach (array_keys(app(ThemeRegistry::class)->all()) as $themeKey) {
|
||||
$site->update(['theme' => $themeKey]);
|
||||
|
||||
foreach (['grid', 'list', 'rotating'] as $display) {
|
||||
$home->update(['sections' => array_map(
|
||||
fn (array $section): array => $section['type'] === 'offers' ? [...$section, 'data' => [...$section['data'], 'display' => $display]] : $section,
|
||||
$home->sections,
|
||||
)]);
|
||||
|
||||
$this->get('/')->assertOk()->assertSee('Herbstwochen');
|
||||
}
|
||||
|
||||
foreach (self::PAGES as $path) {
|
||||
$this->get($path)->assertOk();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user