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>
52 lines
2.1 KiB
JavaScript
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();
|
|
}
|
|
});
|
|
});
|