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:
@@ -0,0 +1,26 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
|
||||
test("cart page: increasing quantity updates the line total", async ({ page }) => {
|
||||
await page.goto("/honig/fruehtracht-2026");
|
||||
await page.getByRole("button", { name: "In den Warenkorb" }).first().click();
|
||||
|
||||
await page.goto("/warenkorb");
|
||||
|
||||
const lineTotalBefore = await page.getByText(/^\d+,\d{2}\s€$/).first().textContent();
|
||||
|
||||
await page.getByRole("button", { name: "Menge erhöhen" }).click();
|
||||
|
||||
await expect(page.getByText(/^\d+,\d{2}\s€$/).first()).not.toHaveText(lineTotalBefore ?? "");
|
||||
});
|
||||
|
||||
test("cart page: removing the only item shows the empty-cart state", async ({ page }) => {
|
||||
await page.goto("/honig/fruehtracht-2026");
|
||||
await page.getByRole("button", { name: "In den Warenkorb" }).first().click();
|
||||
|
||||
await page.goto("/warenkorb");
|
||||
await expect(page.getByText("Zwischensumme")).toBeVisible();
|
||||
|
||||
await page.getByRole("button", { name: "Entfernen" }).click();
|
||||
|
||||
await expect(page.getByText("Dein Warenkorb ist noch leer.")).toBeVisible();
|
||||
});
|
||||
Reference in New Issue
Block a user