mitai-jinkendo/tests/issue-audit.spec.js
Lars ae7d0ac1d9
Some checks failed
Deploy Development / deploy (push) Successful in 1m11s
Build Test / pytest-backend (push) Failing after 5s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 22s
test: stabilize Playwright smoke and issue-audit against dev
Fix nav selectors (Erfassen), shared auth via global-setup to avoid login rate limits, and desktop sidebar viewport handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-25 16:37:36 +02:00

52 lines
2.1 KiB
JavaScript

/**
* Gitea Issue-Audit — UI-Verifikation gegen dev.mitai.jinkendo.de
* Einmaliger Audit-Lauf; keine dauerhafte CI-Pflicht.
*/
const { test, expect } = require('@playwright/test');
test.describe('Issue-Audit UI', () => {
test('#40 Logout-Button im Mobile-Header sichtbar', async ({ page }) => {
await page.goto('/');
await page.waitForLoadState('networkidle');
const logoutBtn = page.locator('header.app-header--mobile button[title="Abmelden"]');
await expect(logoutBtn).toBeVisible();
});
test('#25 Goals-Seite erreichbar und rendert Inhalt', async ({ page }) => {
await page.goto('/goals');
await page.waitForLoadState('networkidle');
await expect(page.locator('body')).not.toContainText('404', { timeout: 5000 });
const hasGoalsUi =
(await page.getByText(/Ziel/i).count()) > 0 ||
(await page.locator('.card').count()) > 0;
expect(hasGoalsUi).toBeTruthy();
});
test('#65 Dashboard-Layout-Konfiguration erreichbar', async ({ page }) => {
await page.goto('/settings/dashboard-layout');
await page.waitForLoadState('networkidle');
const body = await page.locator('body').innerText();
expect(body).toMatch(/Widget|Übersicht|Layout|Dashboard/i);
});
test('#30 Desktop-Sidebar bei breitem Viewport', async ({ page }) => {
await page.goto('/');
await page.waitForLoadState('networkidle');
await page.setViewportSize({ width: 1280, height: 800 });
await expect(page.locator('aside.desktop-sidebar')).toBeVisible({ timeout: 10000 });
});
test('#38 Nutrition CSV Import — FDDB-Panel mit Usage-Integration', async ({ page }) => {
await page.goto('/nutrition');
await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: /Import/i }).click();
await page.waitForLoadState('networkidle');
const importCard = page.locator('.card').filter({ hasText: 'FDDB CSV Import' });
await expect(importCard).toBeVisible();
const titleRow = importCard.locator('.card-title.badge-container-right');
if (await titleRow.count()) {
await expect(titleRow).toBeVisible();
}
});
});