feat: Wabenhain Honig-Shop Anwendung

Vollstaendige Next.js/Prisma-E-Commerce-Anwendung fuer eine Imkerei:
Shop, Warenkorb, Stripe-Checkout, Kundenkonto mit 2FA, Admin-Bereich
(Produkte, Ernten, Chargen, Bestellungen, Gutscheine, admin-editierbare
Website-Inhalte), i18n (DE/EN), Rate-Limiting/CSP/Audit-Log-Haertung,
PostgreSQL- und MySQL-Unterstuetzung ueber austauschbare Prisma-
Treiber-Adapter, Unit-/Komponenten-/E2E-Tests.
This commit is contained in:
Nick Szaunig
2026-08-17 14:30:28 +02:00
parent 5c76fcc266
commit c7927f2883
240 changed files with 26096 additions and 137 deletions
+22
View File
@@ -0,0 +1,22 @@
import { test, expect } from "@playwright/test";
test("shop overview lists products", async ({ page }) => {
await page.goto("/shop");
await expect(page.getByRole("heading", { name: "Unser Sortiment" })).toBeVisible();
await expect(page.getByRole("link", { name: /Zum Honig|Zum Produkt/i }).first()).toBeVisible();
});
test("adding a product to the cart updates the cart count", async ({ page }) => {
await page.goto("/honig/fruehtracht-2026");
// "In den Warenkorb" erscheint mehrfach auf der Seite (Haupt-CTA oben,
// weitere in der "Das koennte dir auch gefallen"-Produktkarten-Sektion
// weiter unten) — .first() greift gezielt den Haupt-CTA des Produkts.
const cartButton = page.getByRole("button", { name: /Warenkorb öffnen/ });
const initialLabel = await cartButton.getAttribute("aria-label");
await page.getByRole("button", { name: "In den Warenkorb" }).first().click();
await expect(cartButton).not.toHaveAttribute("aria-label", initialLabel ?? "");
});