Files
familienarchiv/frontend/e2e/help-popover.spec.ts
Marcel 03b180fe88
Some checks failed
CI / Unit & Component Tests (push) Failing after 4m29s
CI / OCR Service Tests (push) Successful in 55s
CI / Backend Unit Tests (push) Failing after 3m16s
CI / Unit & Component Tests (pull_request) Failing after 3m3s
CI / OCR Service Tests (pull_request) Successful in 39s
CI / Backend Unit Tests (pull_request) Failing after 3m4s
test(e2e): add transcribe-coach, richtlinien, and help-popover E2E specs; reducedMotion global default
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 21:39:03 +02:00

31 lines
987 B
TypeScript

import { test, expect } from '@playwright/test';
import { createEmptyDocument } from './helpers/upload-empty-document.js';
test.describe('Help chip — Read/Edit panel header', () => {
let docId: string;
test.beforeAll(async ({ request }) => {
docId = await createEmptyDocument(request);
});
test('opens popover on click, closes on Esc, returns focus to chip', async ({ page }) => {
await page.goto(`/documents/${docId}`);
await page.getByRole('button', { name: 'Transkribieren' }).click();
// Find and click the (?) help chip
const helpBtn = page.locator('button[aria-expanded]');
await expect(helpBtn).toBeVisible({ timeout: 5000 });
await helpBtn.click();
// Popover should open
await expect(page.locator('[role="tooltip"]')).toBeVisible();
// Press Esc
await page.keyboard.press('Escape');
await expect(page.locator('[role="tooltip"]')).not.toBeVisible();
// Focus should have returned to the chip
await expect(helpBtn).toBeFocused();
});
});