Bug Fixing Kombi-Übungen - Performance Update 1 (Phase 0-2) #33

Merged
Lars merged 18 commits from develop into main 2026-05-14 09:09:55 +02:00
Showing only changes of commit 14cf8a1a53 - Show all commits

View File

@ -59,15 +59,30 @@ test('2. Dashboard lädt ohne Fehler', async ({ page }) => {
test('3. Navigation zu Übungen', async ({ page }) => { test('3. Navigation zu Übungen', async ({ page }) => {
await login(page); await login(page);
await expect(page.locator('.spinner')).toHaveCount(0, { timeout: 10000 });
// Bei Viewport ≥1024px ist .bottom-nav versteckt — Mobile garantieren wie in playwright.config.js // Bei Viewport ≥1024px ist .bottom-nav versteckt — Mobile garantieren wie in playwright.config.js
await page.setViewportSize({ width: 390, height: 844 }); await page.setViewportSize({ width: 390, height: 844 });
// Desktop-Sidebar enthält ebenfalls Übungen nur Mobile-Bottom-Nav klicken (sichtbarer Link) // Bottom-Nav: Navigation und URL gemeinsam abwarten (vermeidet race mit networkidle)
await page.locator('.bottom-nav a[href="/exercises"]').click(); const exercisesLink = page.locator('.bottom-nav').getByRole('link', { name: /Übungen/i });
await Promise.all([
page.waitForURL(
(u) => {
const path = u.pathname.replace(/\/$/, '') || '/'
return path === '/exercises'
},
{ timeout: 15000 },
),
exercisesLink.click(),
]);
await page.waitForLoadState('networkidle'); await page.waitForLoadState('networkidle');
// Prüfe ob Übungen-Seite geladen // Wie Test 4 (Vereine): eine eindeutige h1 — nicht h1,h2-Kombi (Strict Mode + mehrere Treffer)
await expect(page.locator('h1, h2, .page-title')).toContainText(/übungen/i, { timeout: 5000 }); const main = page.locator('.app-main');
await expect(main.getByRole('heading', { level: 1, name: /Übungen/i })).toBeVisible({
timeout: 10000,
});
await page.screenshot({ path: 'screenshots/03-uebungen.png' }); await page.screenshot({ path: 'screenshots/03-uebungen.png' });
console.log('✓ Übungen-Seite erreichbar'); console.log('✓ Übungen-Seite erreichbar');