+ {{-- The card carries only the entry price; the full tier scale
+ lives in a dialog. Inline, the four rows made this card far
+ taller than the one beside it and left a hole in the grid. --}}
+
+ {{-- Label, tier trigger and price share one row, so this card's
+ price line sits at the same height as the one beside it. --}}
+
@foreach($solutions as $solution)
-
+
{{-- Two lines reserved for the title so the body copy starts on
the same baseline in all three cards — «Platzersparnis» is
one line, the other two wrap. --}}
diff --git a/tests/Feature/Zunscan/ZunscanPagesTest.php b/tests/Feature/Zunscan/ZunscanPagesTest.php
index fc38ceb..911e842 100644
--- a/tests/Feature/Zunscan/ZunscanPagesTest.php
+++ b/tests/Feature/Zunscan/ZunscanPagesTest.php
@@ -42,7 +42,7 @@
$response = get('http://zunscan.codebar.ch/de-ch');
$response->assertOk();
- $response->assertSee('Herzlich Willkommen');
+ $response->assertSee('Wir bieten dir folgende Lösungen an');
$response->assertSee('Kontakt');
})->group('zunscan');
@@ -50,7 +50,7 @@
$response = get('http://zunscan.codebar.ch/en-ch');
$response->assertOk();
- $response->assertSee('Welcome');
+ $response->assertSee('Here is what we can do for you');
$response->assertSee('Contact');
})->group('zunscan');
@@ -122,7 +122,7 @@
it('suffixes the page title with the brand', function () {
get('http://zunscan.codebar.ch/de-ch/kontakt')
->assertOk()
- ->assertSee('Kontakt | zunscan.ch', false);
+ ->assertSee('Kontakt und Standorte | zunscan.ch', false);
})->group('zunscan');
it('emits a valid json-ld graph describing the joint venture', function () {
@@ -201,6 +201,111 @@
expect($footer)->not->toContain('mailto:');
})->group('zunscan');
+it('gives every page a descriptive title within the search-result limit', function () {
+ // "Herzlich Willkommen" told a crawler nothing about the business. Titles
+ // have to lead with the service, and still fit a result snippet.
+ foreach (['/de-ch', '/de-ch/services/scanning', '/de-ch/kontakt', '/en-ch', '/en-ch/services/scanning'] as $path) {
+ $html = (string) get('http://zunscan.codebar.ch'.$path)->assertOk()->getContent();
+
+ preg_match('/(.*?)<\/title>/s', $html, $matches);
+ $title = $matches[1] ?? '';
+
+ expect($title)->toEndWith('| zunscan.ch');
+ expect(mb_strlen($title))->toBeLessThanOrEqual(60);
+ expect($title)->not->toContain('Herzlich Willkommen');
+ }
+})->group('zunscan');
+
+it('keeps descriptions inside the length social previews render', function (string $path) {
+ $html = (string) get('http://zunscan.codebar.ch'.$path)->assertOk()->getContent();
+
+ preg_match('/toBeGreaterThan(50)->toBeLessThanOrEqual(125);
+})->with(['/de-ch', '/de-ch/about', '/de-ch/kontakt', '/en-ch', '/en-ch/about'])->group('zunscan');
+
+it('ships a share card sized as the markup declares', function () {
+ $html = (string) get('http://zunscan.codebar.ch/de-ch')->assertOk()->getContent();
+
+ expect($html)->toContain('og-zunscan-de.jpg');
+ expect($html)->toContain('');
+ expect($html)->toContain('');
+ expect($html)->toContain('name="twitter:card" content="summary_large_image"');
+
+ // Both files must exist at the declared 1200×630, or the dimensions lie.
+ foreach (['de', 'en'] as $locale) {
+ $file = public_path("images/seo/og-zunscan-{$locale}.jpg");
+ expect(file_exists($file))->toBeTrue();
+ expect(getimagesize($file))->toMatchArray([0 => 1200, 1 => 630]);
+ }
+})->group('zunscan');
+
+it('serves the english share card on english pages', function () {
+ get('http://zunscan.codebar.ch/en-ch')->assertOk()->assertSee('og-zunscan-en.jpg', false);
+})->group('zunscan');
+
+it('links a complete favicon set', function () {
+ $html = (string) get('http://zunscan.codebar.ch/de-ch')->assertOk()->getContent();
+
+ foreach (['favicon-96x96.png', 'favicon.svg', 'apple-touch-icon.png', 'site.webmanifest'] as $asset) {
+ expect($html)->toContain("favicons/zunscan/{$asset}");
+ expect(file_exists(public_path("favicons/zunscan/{$asset}")))->toBeTrue();
+ }
+})->group('zunscan');
+
+it('describes the business as a local business with a breadcrumb on inner pages', function () {
+ $html = (string) get('http://zunscan.codebar.ch/de-ch/kontakt')->assertOk()->getContent();
+
+ preg_match('/