3bfa54b4b3
- Nuxt 3 project with @nuxtjs/tailwindcss module - Tailwind CSS config with A0 Dark Theme design tokens (CSS custom properties) - AppHeader: sticky, logo, nav, phone, social icons, mobile burger menu - AppFooter: 4-column grid (Navigation, Kontakt, Rechtliches, Social) - HmsLogo: SVG with orange #EC6925 border - error.vue: 404 page with Seite nicht gefunden - robots.txt server route: Disallow: / - Meta: noindex, nofollow, noarchive, nosnippet - JSON-LD: LocalBusiness schema - OpenGraph tags - routeRules: SSR/CSR per route - Shared components: LoadingSkeleton, EmptyState, ErrorState, LegalContentPage, SpeakerIcon - 42 vitest tests passing - Build: 0 errors
28 lines
1.1 KiB
TypeScript
28 lines
1.1 KiB
TypeScript
import { test, expect } from "@playwright/test";
|
|
|
|
test.describe("Meta and Robots", () => {
|
|
test("robots.txt should contain Disallow: /", async ({ request }) => {
|
|
const response = await request.get("/robots.txt");
|
|
const text = await response.text();
|
|
expect(text).toContain("User-agent: *");
|
|
expect(text).toContain("Disallow: /");
|
|
});
|
|
|
|
test("home page should have noindex meta tag", async ({ page }) => {
|
|
await page.goto("/");
|
|
const robotsMeta = page.locator('meta[name="robots"]');
|
|
await expect(robotsMeta).toHaveAttribute("content", /noindex/);
|
|
await expect(robotsMeta).toHaveAttribute("content", /nofollow/);
|
|
await expect(robotsMeta).toHaveAttribute("content", /noarchive/);
|
|
await expect(robotsMeta).toHaveAttribute("content", /nosnippet/);
|
|
});
|
|
|
|
test("home page should contain JSON-LD LocalBusiness", async ({ page }) => {
|
|
await page.goto("/");
|
|
const jsonld = page.locator('script[type="application/ld+json"]');
|
|
const content = await jsonld.textContent();
|
|
expect(content).toContain("LocalBusiness");
|
|
expect(content).toContain("Hammerschmidt");
|
|
});
|
|
});
|