get($path)->assertSuccessful()->getContent()); expect($hero)->toContain('bg-hero-container hero-frame') ->toContain('data-hero-eyebrow') ->toContain($eyebrow); })->with([ 'brands' => ['/marken', 'B2in Interior'], 'about' => ['/about', 'Über B2in'], 'contact' => ['/contact', 'Kontakt'], ]); it('sets the hero images off with a white hairline', function (string $path) { expect(pageHeroHtml($this->get($path)->assertSuccessful()->getContent()))->toContain('border border-white!'); })->with(['/marken', '/about']); it('limits the gold frame to the interior world', function () { $css = file_get_contents(resource_path('css/web/theme-b2in.css')); expect($css)->toContain('.world-interior .variante-glass-flow div.hero-frame') ->not->toContain("\ndiv.bg-hero-container.hero-frame"); }); it('adds the eyebrow to stored heroes without overwriting a maintained one', function () { CmsContent::create(['group' => 'marken', 'key' => 'hero', 'type' => 'json', 'order' => 0, 'value' => ['de' => ['title' => 'Marken', 'eyebrow' => 'Unsere Marken'], 'en' => ['title' => 'Brands', 'eyebrow' => 'Own']]]); CmsContent::create(['group' => 'about', 'key' => 'hero', 'type' => 'json', 'order' => 0, 'value' => ['de' => ['title' => 'Über B2in: Unsere Mission']]]); CmsContent::create(['group' => 'contact', 'key' => 'contact_form', 'type' => 'json', 'order' => 0, 'value' => ['de' => ['hero' => ['title' => 'Kontakt'], 'form' => ['x' => 1]]]]); $this->seed(PageHeroEyebrowSeeder::class); $this->seed(PageHeroEyebrowSeeder::class); $marken = CmsContent::where('group', 'marken')->where('key', 'hero')->first()->getTranslations('value'); $contact = CmsContent::where('group', 'contact')->where('key', 'contact_form')->first()->getTranslation('value', 'de'); $about = CmsContent::where('group', 'about')->where('key', 'hero')->first()->getTranslation('value', 'de'); expect($marken['de']['eyebrow'])->toBe('B2in Interior') ->and($about)->toBe(['title' => 'Unsere Mission', 'eyebrow' => 'Über B2in']) ->and($marken['en']['eyebrow'])->toBe('Own') ->and($contact['hero'])->toBe(['title' => 'Kontakt', 'eyebrow' => 'Kontakt']) ->and($contact['form'])->toBe(['x' => 1]); }); it('shows the eyebrow without capitals and drops the prefix from the about headline', function () { $about = pageHeroHtml($this->get('/about')->assertSuccessful()->getContent()); expect($about)->not->toContain('Über B2in:') ->toContain('Unsere Mission') ->not->toMatch('/
get($path)->assertSuccessful()->getContent(); $hero = substr($html, (int) strpos($html, 'data-hero-trust'), 3000); foreach ($items as $item) { expect($hero)->toContain($item); } expect($hero)->not->toContain('Premium-Marken'); })->with([ 'home' => ['/', ['Deutsche Manufakturen', 'Planung bis Montage', 'Zwei Showrooms in Bielefeld']], 'brands' => ['/marken', ['Maßarbeit vom Handwerk', 'Werk und Ausstellung erlebbar', 'Küche, Einbau, Arbeitsplatz']], ]); it('replaces only the former home trust items and fills empty brand ones', function () { CmsContent::create(['group' => 'home', 'key' => 'hero', 'type' => 'json', 'order' => 0, 'value' => [ 'de' => ['title' => 'Home', 'stats' => HeroTrustItemsSeeder::FORMER_HOME_STATS['de']], 'en' => ['title' => 'Home', 'stats' => ['Own point']], ]]); CmsContent::create(['group' => 'marken', 'key' => 'hero', 'type' => 'json', 'order' => 0, 'value' => [ 'de' => ['title' => 'Marken'], ]]); $this->seed(HeroTrustItemsSeeder::class); $this->seed(HeroTrustItemsSeeder::class); $home = CmsContent::where('group', 'home')->where('key', 'hero')->first()->getTranslations('value'); $marken = CmsContent::where('group', 'marken')->where('key', 'hero')->first()->getTranslation('value', 'de'); expect($home['de']['stats'])->toBe(['Deutsche Manufakturen', 'Planung bis Montage', 'Zwei Showrooms in Bielefeld']) ->and($home['en']['stats'])->toBe(['Own point']) ->and($marken['stats'])->toBe(['Maßarbeit vom Handwerk', 'Werk und Ausstellung erlebbar', 'Küche, Einbau, Arbeitsplatz']); });