From 3210796139a79b3db450379a0567cf49e0d12234 Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 7 May 2026 07:51:24 +0200 Subject: [PATCH] feat: update dashboard smoke test for new UI elements - Modified the dashboard smoke test to reflect changes in the main heading and greeting text. - Updated expectations to check for the visibility of the new "Dashboard" heading and the greeting message, enhancing test accuracy. --- tests/dev-smoke-test.spec.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/dev-smoke-test.spec.js b/tests/dev-smoke-test.spec.js index 8a9eb0d..39102a0 100644 --- a/tests/dev-smoke-test.spec.js +++ b/tests/dev-smoke-test.spec.js @@ -43,10 +43,12 @@ test('2. Dashboard lädt ohne Fehler', async ({ page }) => { // Warte bis Spinner verschwunden await expect(page.locator('.spinner')).toHaveCount(0, { timeout: 10000 }); - // Zwei verschiedene "Willkommen"-Texte im Dashboard → kein ambiguity locator('text=Willkommen') - await expect( - page.getByRole('heading', { name: /Willkommen bei Shinkan/i }), - ).toBeVisible({ timeout: 5000 }); + // Dashboard: h1 „Dashboard“ + Begrüßungstext (nicht mehr „Willkommen bei Shinkan“ als Überschrift) + const main = page.locator('.app-main'); + await expect(main.getByRole('heading', { level: 1, name: 'Dashboard' })).toBeVisible({ + timeout: 5000, + }); + await expect(main.getByText(/Shinkan unterstützt dich/i)).toBeVisible({ timeout: 5000 }); await page.screenshot({ path: 'screenshots/02-dashboard.png' }); console.log('✓ Dashboard OK');