fix(frontend): QUEUED badge test, touch target on dismiss button, focus ring on expand toggle
Some checks failed
CI / Unit & Component Tests (push) Failing after 2m37s
CI / OCR Service Tests (push) Successful in 40s
CI / Backend Unit Tests (push) Failing after 2m50s
CI / Unit & Component Tests (pull_request) Failing after 2m31s
CI / OCR Service Tests (pull_request) Successful in 25s
CI / Backend Unit Tests (pull_request) Failing after 2m38s
Some checks failed
CI / Unit & Component Tests (push) Failing after 2m37s
CI / OCR Service Tests (push) Successful in 40s
CI / Backend Unit Tests (push) Failing after 2m50s
CI / Unit & Component Tests (pull_request) Failing after 2m31s
CI / OCR Service Tests (pull_request) Successful in 25s
CI / Backend Unit Tests (pull_request) Failing after 2m38s
Add missing test coverage for the amber QUEUED status badge in TrainingHistory. Fix WCAG 2.2 minimum touch target (24 × 24 px) on the success-message dismiss button in OcrTrainingCard. Add focus-visible ring to the expand/collapse toggle in TrainingHistory so keyboard users get a visible focus indicator. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -82,7 +82,7 @@ async function startTraining() {
|
||||
{successMessage}
|
||||
<button
|
||||
type="button"
|
||||
class="underline hover:no-underline"
|
||||
class="ml-1 inline-flex h-6 w-6 items-center justify-center rounded-sm underline hover:no-underline focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:outline-none"
|
||||
onclick={() => (successMessage = null)}
|
||||
aria-label={m.comp_dismiss()}>×</button
|
||||
>
|
||||
|
||||
@@ -146,7 +146,7 @@ function formatCer(cer: number | undefined | null): string {
|
||||
type="button"
|
||||
aria-expanded={expanded}
|
||||
aria-controls="training-history-rows"
|
||||
class="text-xs font-medium text-ink-3 transition-colors hover:text-ink"
|
||||
class="rounded-sm py-2 text-xs font-medium text-ink-3 transition-colors hover:text-ink focus-visible:ring-2 focus-visible:ring-brand-navy focus-visible:ring-offset-1 focus-visible:outline-none"
|
||||
onclick={() => (expanded = !expanded)}
|
||||
>
|
||||
{expanded ? m.comp_expandable_show_less() : m.comp_expandable_show_more()}
|
||||
|
||||
@@ -51,6 +51,15 @@ describe('TrainingHistory — expand/collapse', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('TrainingHistory — status badges', () => {
|
||||
it('shows amber QUEUED badge for queued runs', async () => {
|
||||
const run = { ...makeRun(0), status: 'QUEUED' as const };
|
||||
render(TrainingHistory, { runs: [run] });
|
||||
|
||||
await expect.element(page.getByText(/Warteschlange/i)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
describe('TrainingHistory — type and person columns', () => {
|
||||
it('shows "Basis" for runs without personId', async () => {
|
||||
render(TrainingHistory, { runs: [makeRun(0)] });
|
||||
|
||||
Reference in New Issue
Block a user